-
Notifications
You must be signed in to change notification settings - Fork 297
Move experimental equalise_attributes #3527
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
Conversation
new = "iris.util.equalise_attributes" | ||
emsg = ( | ||
f'The function "{old}" has been moved.\n' | ||
f'Please replace "{old}(<cubes>)" with "{new}(<cubes>)".' |
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.
Ohhh our first f-string
🎉
Welcome to the wonderful world of Python3 (finally!)
@@ -0,0 +1,2 @@ | |||
* The :func:`iris.experimental.equalise_cubes.equalise_attributes` function has been migrated into | |||
the core of Iris. Please use the :func:`iris.util.equalise_attributes` function instead. |
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.
I'm not sure "core of Iris" means that much to someone outside the dev team.
Maybe it is clearer to say:
- The :func:
iris.experimental.equalise_cubes.equalise_attributes
function has been moved from the :mod:iris.experimental
module into :mod:iris.util
module. Please use the :func:iris.util.equalise_attributes
function instead.
# before importing anything else. | ||
import iris.tests as tests | ||
|
||
import numpy as np |
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.
The doc string in the file header still references "experimental". I think it should be iris.util.equalise_attributes:
"""
Unit tests for the :func:iris.experimental.equalise_cubes.equalise_attributes
function.
"""
cube.data = ma.masked_array(cube.data) | ||
cube.data[points_to_mask] = ma.masked | ||
return cube | ||
|
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.
I checked this file: It is identical to before, except for syntax over multiple lines :)
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.
@abooton Yup, that's the magic of black
... or should I say, black
magic?! 😉
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 PR moves the
iris.experimental.equalise_cubes.equalise_attributes
function toiris.util.equalise_attributes
.Reference #3515