-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config with pydantic #334
Closed
Closed
Config with pydantic #334
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
f72339e
Use pydantic for config validation
sverhoeven 7337be3
Drop unused validator
sverhoeven 81ad761
Fix available_parameter_sets()
sverhoeven eb58985
Drop tests for non-existing code
sverhoeven f09f794
Move tests for parametersetdb to own sub dir
sverhoeven 6157666
Move test fixtures for parametersetdb to own file
sverhoeven ad838bd
Implement overwrite
sverhoeven 9ab9107
Add tests for Config
sverhoeven d957464
Numba 0.56.4 does not support Python 3.11
sverhoeven ce3bf18
Bump versions of pre-commit
sverhoeven 8d5d7b4
Use CFG.bla instead of CFG['bla']
sverhoeven 0c0081b
Prepend parameterset_dir to parameter set paths
sverhoeven 1d61441
Make ParameterSet and ExampleParameterSet pydantic models
sverhoeven df3466c
Fix tests
sverhoeven 2fad561
Fix tests even more
sverhoeven 5382cd4
Merge remote-tracking branch 'origin/apptainer' into config-with-pyda…
sverhoeven bcb5d74
Update changelog
sverhoeven 08bb34c
Test docs
sverhoeven 9a7be33
Mention pydantic in changelog
sverhoeven 61bdbaf
Remember py3.11 is not supported due to mamba
sverhoeven 6abc991
Add expand user for paths + forbid extra attribs
sverhoeven File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to move documentation to the user guide, and reduce the config to a single-file module called
config.py
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the content of src/ewatercycle/config/_config_object.py to src/ewatercycle/config/init.py in c86f3b7.
I also added a link from docs/system_setup.rst to api docs.
To not increase the public API I prefixed private things with underscore.
Moving it to src/ewatercycle/config.py could be done once src/ewatercycle/config/_lisflood_versions.py has been moved to its own plugin/repo.