Skip to content
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

Configuration file validation not working #319

Open
forsyth2 opened this issue Oct 5, 2022 · 2 comments
Open

Configuration file validation not working #319

forsyth2 opened this issue Oct 5, 2022 · 2 comments
Labels
semver: bug Bug fix (will increment patch version)

Comments

@forsyth2
Copy link
Collaborator

forsyth2 commented Oct 5, 2022

It looks like the configuration file validation (https://github.com/E3SM-Project/zppy/blob/main/zppy/__main__.py#L169) isn't working anymore.

While working on #281, I tried removing a trailing comma and the validator passed, even though it has historically failed in such cases -- see #290. I tried setting active = 4, which I would have expected to fail since active expects a bool value; however validation passed and a ValueError: Invalid value 4 for 'active' appeared during runtime.

It appears that something has changed in the validation process.

@forsyth2 forsyth2 added the semver: bug Bug fix (will increment patch version) label Oct 5, 2022
@forsyth2
Copy link
Collaborator Author

forsyth2 commented Oct 5, 2022

I tried going back to v2.0.0 (Feb. 2022 -- https://github.com/E3SM-Project/zppy/releases/tag/v2.0.0):

$ git checkout -b test-validation 00828089733cc3ad9351e4a98902bd20fce5c163
$ emacs tests/integration/test_complete_run.cfg
# Set `active = 4`, remove a trailing comma for `years`
$ pip install .
$ zppy -c tests/integration/test_complete_run.cfg
# Behavior is the same as above.

This occurs regardless of using a conda environment from July 2022 or from building a conda environment based on the setup of the code in Feb. 2022.

@forsyth2 forsyth2 modified the milestone: December 2022 Requirements Oct 6, 2022
@forsyth2 forsyth2 mentioned this issue Nov 1, 2022
@forsyth2
Copy link
Collaborator Author

forsyth2 commented Nov 1, 2022

#338 will at least fix the trailing comma error, so this is not urgent for the December 2022 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver: bug Bug fix (will increment patch version)
Projects
None yet
Development

No branches or pull requests

1 participant