From 85841dd616bc8336b9f1aa973209930f87793fc1 Mon Sep 17 00:00:00 2001 From: Kwabena N Amponsah Date: Tue, 14 Nov 2023 08:36:01 +0000 Subject: [PATCH] #3 Simplify imports --- chaste_codegen_sbml/filewriters.py | 3 --- chaste_codegen_sbml/generator.py | 4 +--- chaste_codegen_sbml/translator.py | 4 ---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/chaste_codegen_sbml/filewriters.py b/chaste_codegen_sbml/filewriters.py index 337f212..13acc79 100644 --- a/chaste_codegen_sbml/filewriters.py +++ b/chaste_codegen_sbml/filewriters.py @@ -1,6 +1,3 @@ -import sys -import os.path -from libsbml import * from . import translator # Script with functions that will write all the necessary SBML info into Chaste .cpp diff --git a/chaste_codegen_sbml/generator.py b/chaste_codegen_sbml/generator.py index 7ffb76d..c9d6fb2 100644 --- a/chaste_codegen_sbml/generator.py +++ b/chaste_codegen_sbml/generator.py @@ -1,6 +1,4 @@ -import sys import os -from os.path import basename from libsbml import SBMLReader from . import translator from . import filewriters @@ -57,7 +55,7 @@ def Generate(sbml_file, output_filename=None, output_directory=None): #Get Name of file if not output_filename: - output_filename = basename(sbml_file).split('.')[0] + output_filename = os.path.basename(sbml_file).split('.')[0] # If there are events in the model, we define the class as a cell cycle model. # Otherwise, the model is assumed to be a subcellular reaction network model. diff --git a/chaste_codegen_sbml/translator.py b/chaste_codegen_sbml/translator.py index a74d747..3b503ad 100644 --- a/chaste_codegen_sbml/translator.py +++ b/chaste_codegen_sbml/translator.py @@ -1,7 +1,3 @@ -import sys -import os.path -from libsbml import * - # Script with useful functions to extract the relevant information from an # SBML file needed to define an ODE Model in Chaste