-
Notifications
You must be signed in to change notification settings - Fork 61
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
Resampling indicator #927
Resampling indicator #927
Conversation
@bzah With this PR, I modified the way one can specifiy which input frequencies are accepted. See the The good part is that one can now inherit from an indicator created from |
Pull Request Test Coverage Report for Build 1481920829
💛 - Coveralls |
Thank you for your concern (and for the feature!) @aulemahal, it won't break my code I'm using atmos daily indicators directly and I have simply disabled the daily check for now on icc v5. |
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.
Good for me.
Co-authored-by: David Huard <[email protected]>
…s/heat_index * 'indices/heat_index' of github.com:UCL/xclim: (42 commits) Added french metadata for heat index. Apply changes to fraction indicator [sdba] Re-write of Extreme's adjustment (Ouranosinc#914) update history Update history [Ouranosinc#931] Fix indicator for Rxxp index Add missing type for `threshold_count` Add dev notes - add indexer example - other small changes run all available tests in one call for slow builds update makefile target black, only install coveralls in tox if coveralls is needed Indexing within indicators (Ouranosinc#934) Update history finish needs doctests Remove unnecessary keep_attrs Adapt to CF conventions 1.9 - remove gregorian calendar (Ouranosinc#935) Bump version: 0.31.2-beta → 0.31.3-beta update HISTORY.rst suggested corrections Apply suggestions from code review Resampling indicator (Ouranosinc#927) ...
Pull Request Checklist:
number
) and pull request (:pull:number
) has been added.bumpversion patch
has been called on this branch.zenodo.json
What kind of change does this PR introduce?
ResamplingIndicator
subclass. I did this by creating private pre- and post-processing methods that are called in__call__
. This makes it easy to "inject" functionalities in the indicator's processing. The "resampling-related functionalities" are : checking for the allowed "freq" arg and handling of missing values.Does this PR introduce a breaking change?
I don't think so.
Other information:
I think that with this change it becomes a bit clearer what are the uses cases for conventional subclassing of the
Indicator
class:context
,src_freq
,realm
,title
,abstract
,keywords
,references
,notes
andallowed_periods
.In both cases, the goal is to create a new base class and then to create multiple indicators.
I'll put this in a "developer's note" section of the doc in a further PR.
This is also a first step towards a way to inject the
indexer
kwargs as planned in #899.