brendanjmeade / celeri

Next generation earthquake cycle kinematics
BSD 3-Clause "New" or "Revised" License
24 stars 6 forks source link

Change RUN_NAME from creation in global name space to being created when the command file is read in. #96

Closed brendanjmeade closed 2 years ago

brendanjmeade commented 2 years ago

If I re-run the first cell that loads the command file, I get an error because the runs/2022-03-07-13-45-12/ already exists. This is because the RUN_NAME variable is being set globally on import. It would be nice to move it to be set when the command file is loaded. The current design means that you would not be able to run two separate block models in the same Python process. This is almost certainly going to be something you or others will want to do at some point and will be more painful to change the longer we wait to support it. It'll also be nice because I can re-run cells without restarting the notebook kernel.

brendanjmeade commented 2 years ago

Close with: https://github.com/brendanjmeade/celeri/commit/3fca54d008e5bec4d68440ad62dc1de4ae669e91