-
Notifications
You must be signed in to change notification settings - Fork 41
Using ESMVALTOOL_CONFIG_DIR
will force the usage of new configuration system and ignore old configuration
#2736
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2736 +/- ##
=======================================
Coverage 95.20% 95.20%
=======================================
Files 259 259
Lines 15211 15217 +6
=======================================
+ Hits 14481 14488 +7
+ Misses 730 729 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Instead of adding a new environmental variable, could we use the new config system exclusively if |
Done! |
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 be possible to update the documentation at https://docs.esmvaltool.org/projects/ESMValCore/en/latest/quickstart/configure.html#yaml-files to be very explicit that:
- Using
--config_dir
does not override the configuration in the default location (~/.config/esmvaltool
) - Configuration files in
~/.esmvaltool
are also included
please? 😊
Would you have a suggestion for that? I think it already (kind of) says that ("ESMValCore searches for all YAML files within each of these directories [...]"):
Not all files in there are included, only |
When I was reading before, I didn't quite make it to the end of this sentence:
Would it be possible to add this to the first sentence in the Specify configuration for
Also, I'm wondering if it would be clearer to moving the "but this can be changed with the Also, the documentation states:
I don't believe this is true. In the RTW we had provided a configuration file via
Ah, I can confirm that removing the
I understand not wanting to advertise this, but I feel it may cause issues if people don't realise that the old configuration is merged with the new configuration (the RTW is now failing because of this!) 😭 How would you feel about adding another "Warning" admonition (or extending the current one) to explain this? It would be less of an advertisement if it's shown as a warning! 😊 |
I tried to improve this in 9885393, could you please have a look? 😊 Here is the rendered version.
No, this will NOT override all configuration. Setting this variable just changes the location where ESMValCore looks for the "user configuration". By default this is The behavior that changes with this PR is that the old configuration files are completely ignored if
I would certainly hope this is true, otherwise our tests would not be set up correctly 😬 Could you please post your configuration files and the problem you're having? Sometimes the merge can be a bit counterintuitive. For example, I had an issue where I specified a CMIP6
If an old configuration file is found (i.e., either the file With this PR, setting |
ESMVALTOOL_CONFIG_DIR
will force the usage of new configuration system and ignore old configuration
062853e
to
cae7539
Compare
807a9e4
to
cae7539
Compare
Many thanks @schlunma 🎉
This is great, thank you! 😊
Just to check my understanding, if I don't provide anything via the
To clarify, when I said "the configuration in my home area took precedence" I meant "the configuration in the
OK, so if I'm finally catching up now, this is what my example above is demonstrating: if an |
Description
This PR makes it possible to force using our new configuration system via the environment variable
ESMVALTOOL_CONFIG_DIR
.This is important feature for "encapsulated" ESMValTool runs that should work independently from the user's personal ESMValTool configuration. This is also relevant for the REF (see Climate-REF/climate-ref#315).
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: