-
Notifications
You must be signed in to change notification settings - Fork 59
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
mypy
compliance
#1721
mypy
compliance
#1721
Conversation
There seems to be a handful of trip-falls that we keep running into:
Changes as of this comment have us hovering at around 1050 errors total. |
Additional comment: Due to the way that |
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.
This looks good, but there are a lot of cases where it seems an annotation shouldn't be necessary ? I've commented on a few, but not all.
This is just missing the updates to the changelog about breaking changes, but I think we're better off now. Lots of small improvements. |
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.
Thanks @Zeitsperre! This was a lot of work.
I have a last conservative comment, but this looks like a very good start for type-checked xclim.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
<!--Please ensure the PR fulfills the following requirements! --> <!-- If this is your first PR, make sure to add your details to the AUTHORS.rst! --> ### Pull Request Checklist: - [ ] This PR addresses an already opened issue (for bug fixes / features) - This PR fixes #xyz - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] (If applicable) Documentation has been added / updated (for bug fixes / features) - [x] CHANGELOG.rst has been updated (with summary of main changes) - [x] Link to issue (:issue:`number`) and pull request (:pull:`number`) has been added ### What kind of change does this PR introduce? * I am casting `high` to be a float, not an array. In the new version of dask, if `high` is an array, there are memory problems and we are unable to run jitter_under on the ESPO regions. * I see that it was made explictly an array in #1721. @Zeitsperre do you remember why ? ### Does this PR introduce a breaking change? no ### Other information: This is only a problem when using dask.
Pull Request Checklist:
mypy
and stronger enforcement ofpylint
#1719number
) and pull request (:pull:number
) has been addedWhat kind of change does this PR introduce?
Indicator.__getitem__
method has been retired (to reduce instances of class methods returningAny
)noqa
exceptions, mostly for functions based onsfcWind
variable).wrapped_partial
function wrapper has been removed.Does this PR introduce a breaking change?
Yes. The Indicator
__getitem__
method has been removed. This has downstream impacts onfinch
and possibly other projects. Additionally, the obsoletewrapped_partial
function (was previously used in Indicator construction) has also been removed.Other information:
@aulemahal
We currently use the
Quantified
type alias in almost all the threshold-based indicators to specify that this variable should conform to something resembling a string with units (str | pint.Quantity
), but this alias also includesxarray.DataArray
. Does this mean that we can pass (or would like to enable passing)DataArrays
of grids denoting thresholds? If not, we may need to create a new, more constrained custom variable (str2pint
often takes variables of this type but does not supportpint.Quantity
orxarray.DataArray
). Solving this issue alone will address +250 errors.