-
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
Add public Config.update_from_dirs()
method
#2538
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 #2538 +/- ##
==========================================
+ Coverage 94.90% 94.91% +0.01%
==========================================
Files 251 251
Lines 14295 14301 +6
==========================================
+ Hits 13566 13574 +8
+ Misses 729 727 -2 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Bouwe Andela <[email protected]>
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.
noicee! Just one (possible offbeat) comment from me, can merge right after Manu bothers giving me an answer to that 🍺
|
||
""" | ||
new_config_dict = self._get_config_dict_from_dirs(dirs) | ||
merged_config_dict = dask.config.merge(self, new_config_dict) |
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.
when this throws a wobbly, do you want to catch and release that or filter it through our own custom exception? Just looked at both merge
and update
from Dask, and they're really basic, and do not account for any possible exception, so if there are exceptions, then those will be cryptic AF
Description
While working on making ESMValTool with the new configuration (#2448) I noticed that we are missing a simple public function to update the configuration from one or more directories.
This PR adds that.
Related to #2371
Link to documentation: https://esmvaltool--2538.org.readthedocs.build/projects/ESMValCore/en/2538/api/esmvalcore.config.html#esmvalcore.config.Config.update_from_dirs
Before you get started
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: