diff --git a/src/acom_music_box/__init__.py b/src/acom_music_box/__init__.py index 942cfb65..7f8329a3 100644 --- a/src/acom_music_box/__init__.py +++ b/src/acom_music_box/__init__.py @@ -4,7 +4,7 @@ This package contains modules for handling various aspects of a music box, including species, products, reactants, reactions, and more. """ -__version__ = "2.2.1" +__version__ = "2.2.2" from .utils import convert_time, convert_pressure, convert_temperature, convert_concentration from .species import Species diff --git a/src/acom_music_box/evolving_conditions.py b/src/acom_music_box/evolving_conditions.py index 589f4337..eaa8ded7 100644 --- a/src/acom_music_box/evolving_conditions.py +++ b/src/acom_music_box/evolving_conditions.py @@ -129,11 +129,11 @@ def from_config_JSON( if 'evolving conditions' in config_JSON: if len(config_JSON['evolving conditions'].keys()) > 0: # Construct the path to the evolving conditions file - evolving_conditions_path = ( - os.path.dirname(path_to_json) + - "/" + - list( - config_JSON['evolving conditions'].keys())[0]) + + evolving_conditions_path = os.path.join( + os.path.dirname(path_to_json), + list(config_JSON['evolving conditions'].keys())[0]) + evolving_conditions = EvolvingConditions.read_conditions_from_file( evolving_conditions_path, species_list, reaction_list) diff --git a/src/acom_music_box/main.py b/src/acom_music_box/main.py index b6dd522f..d3f1c01c 100644 --- a/src/acom_music_box/main.py +++ b/src/acom_music_box/main.py @@ -76,6 +76,7 @@ def main(): # create and load a MusicBox object myBox = MusicBox() + logging.info("configuration file = {}".format(musicBoxConfigFile)) myBox.readConditionsFromJson(musicBoxConfigFile) logger.info("myBox = {}".format(myBox)) @@ -87,7 +88,7 @@ def main(): myBox.create_solver(campConfig) logger.info("myBox.solver = {}".format(myBox.solver)) mySolution = myBox.solve(os.path.join(musicBoxOutputDir, "mySolution.csv")) - logger.info("mySolution = {}".format(mySolution)) + # logger.info("mySolution = {}".format(mySolution)) logger.info("End time: {}".format(datetime.datetime.now())) sys.exit(0) diff --git a/src/acom_music_box/reaction_list.py b/src/acom_music_box/reaction_list.py index 247e279a..a7592caf 100644 --- a/src/acom_music_box/reaction_list.py +++ b/src/acom_music_box/reaction_list.py @@ -71,8 +71,9 @@ def from_config_JSON(cls, path_to_json, config_JSON, species_list): list_name = None # gets config file path - config_file_path = os.path.dirname( - path_to_json) + "/" + config_JSON['model components'][0]['configuration file'] + config_file_path = os.path.join( + os.path.dirname(path_to_json), + config_JSON['model components'][0]['configuration file']) # opnens config path to read reaction file with open(config_file_path, 'r') as json_file: