-
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
Combined offline
and always_search_esgf
into a single option search_esgf
#1935
Conversation
- Use configuration from experimental Output file is now a Path fx file facets are now correctly set when parsing the recipe, no need to do it in data finder anymore
This is weird, I am only getting it once (tested with every combination of However, I also noticed to other problems:
|
@remi-kazeroni and I found the reason for this! I don't use a user config file called This has not been introduced with this PR. If you use the I have no idea what's going on there. Since the warning is raised twice from the exact same location, it should only be printed once. If no one has an idea about this, I suggest we simply ignore this. Two warnings is better than no warning. |
The warning was issued twice because it is first issued from the Maybe you already know about this, but I found the code import traceback
traceback.print_stack() very useful to find out from where the function that raised the deprecation warning was getting called. |
I found a really simple way to print the warnings issued from loading the configuration file again and added it in a05c7d1. Please feel free to not use that if you find it doesn't do a good job. |
Ahh, that makes sense. I missed the part about "once per module" 🤦 Unfortunately, your change didn't work for me. I am still getting two warnings with Maybe we should simply use the filter option
That worked great for me! Maybe trying to solve this for all deprecation warnings was overly enthusiastic 😃 |
Will have another look.. |
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.
review of docstrings, and docs, bud
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.
couple more minor comments from me 🍺
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.
you're a ⭐ Manu! Cheers for all this wonderful work - together with @bouweandela I nominate you guys for the Contributors of the Version Award for 2.8 🏆
It only works when you specify no configuration file, i.e. with the command |
I suggest we just live with multiple warnings then, I also tried to solve this with If there are no further comments I suggest to merge this by noon tomorrow. Thanks everyone for reviewing!! |
This reverts commit 5eeed56.
aren't the warnings being generated by different, multiple, tasks? I couldn't care less for multiple warning TBF - if at all, show them more often, maybe somebody decides to pay attention to them 😆 |
I think they are all issues from the same process (all the reading of the config file happens at the very beginning of the run where we only have a single process as far as I am aware). |
Thanks a lot @schlunma for your nice work and @valeriupredoi and @bouweandela for reviewing it. I would really like to move on with the feature freeze and the release. It looks to me that issue #1931 is fully addressed by this PR. Should you want to improve the handling of the warnings, I would recommend to open an issue based on findings made in this PR to keep track of things. |
awesome 🥳 |
Description
Deprecation
This PR adds a new config option
search_esgf
, which replaces the old optionsoffline
andalways_search_esgf
.offline
has been deprecated (scheduled for removal in v2.10.0),always_search_esgf
is simply removed (has not been included in a release yet). The following table shows the usage of the new option:offline
always_search_esgf
search_esgf
False
False
'when_missing'
False
True
'always'
True
False
'never'
True
True
'never'
In addition, this PR cleans and unifies the code to deprecate configuration options in order to allow changing one configuration option (e.g.,
search_esgf
) based on another (deprecated) option (e.g.,offline
). In addition, now a deprecation warning is always raised when that option is use. Previously, only a warning was raised when the option was different to the default.Closes #1931
Link to documentation:
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: