-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…275) Previously, the run parameters were stored in a global dictionary called `params`. This solution was sub-optimal, as it was very tricky to do multiple runs to avoid "contamination" of parameters by the previous run. In this PR I introduce the parameters class `PpafmParameters`. Now, every run will have its set of parameters. Moving forward, we can simplify the signature of many functions relying on the parameters provided by the `PpafmParameters` object. The original `params` dictionary is now completely removed. Previously, the default values for parameters were scattered around. Now, all the default values are set by the `PpafmParameters`, which allows the removal of the `params.ini` file which was part of the package distribution. The infrastructure built here offers an easy way to switch input format from `ini` to `toml`, as suggested in the issue #153. To allow easy switching `to_file` method is implemented. It allows dumping the current parameters to the `toml` format. Finally, tests were added to make sure the `PpafmParameters` class behaves as expected.
- Loading branch information
1 parent
6f741fc
commit b86d105
Showing
27 changed files
with
596 additions
and
580 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.