-
Notifications
You must be signed in to change notification settings - Fork 38
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 check subcommand #789
Comments
good idea @nielsdrost 🍺 |
We now have a working configuration validator (see this comment). However, this only checks the validity of the options, not the values (i.e., no paths are checked). I propose we close this, feel free to re-open if necessary 👍 |
I think this is still a bit open. @schlunma, do you know the PR in which this was added? In any case, I think adding the checking of paths as suggested by @nielsdrost would be very nice and useful. |
I think in #1300, the validation happens here: ESMValCore/esmvalcore/_config/_config.py Lines 179 to 183 in e9daad3
I'm not 100% convinced of this check for existence. Maybe a warning is okay, but definitely not an error. If I'm using a configuration file written by someone else and they remove the path to CORDEX, I don't want my recipe to fail even though I'm not using any CORDEX data. |
I guess this can easily be added here: ESMValCore/esmvalcore/experimental/config/_config_validators.py Lines 121 to 130 in e9daad3
|
I just realized that we have a already show a warning if a ESMValCore/esmvalcore/_data_finder.py Lines 394 to 396 in 2d3df9d
|
While doing the tutorial, one error encountered was an invalid config file. This leads to all sorts of parser and "data not found" errors. Perhaps we could add a sub command specifically to check the configuration for validity (#125), and perhaps check if all the paths exist.
Once we have an importable config object (#785) this should not be hard to implement.
The text was updated successfully, but these errors were encountered: