Skip to content

Commit

Permalink
Moved the configuration check to within readConditionsFromJson(), and…
Browse files Browse the repository at this point in the history
… at the end.
  • Loading branch information
carl-drews committed Sep 20, 2024
1 parent 6b8bc64 commit bbf551c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/acom_music_box/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def main():
myBox = MusicBox()
logger.debug(f"Configuration file = {musicBoxConfigFile}")
myBox.readConditionsFromJson(musicBoxConfigFile)
myBox.check_config(os.path.join(os.getcwd(), musicBoxConfigFile))

# Create solver and solve
config_path = os.path.join(
Expand Down
3 changes: 3 additions & 0 deletions src/acom_music_box/music_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ def readConditionsFromJson(self, path_to_json):
self.evolving_conditions = EvolvingConditions.from_config_JSON(
path_to_json, data, self.species_list, self.reaction_list)

self.check_config(os.path.join(os.getcwd(), path_to_json))


def speciesOrdering(self):
"""
Retrieves the ordering of species used in the solver.
Expand Down

0 comments on commit bbf551c

Please sign in to comment.