-
Notifications
You must be signed in to change notification settings - Fork 300
Add string arguments for Cube methods #3931
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 string arguments for Cube methods #3931
Conversation
|
Hi @gcaria, thanks for the contribution! I’m not sure about that specific error, but I can see that your branch is a couple of commits behind the master branch. The most recent commit to master incorporates a switch from Travis-CI to Cirrus-CI to run the tests within the PR. So I suggest rebasing to pick up that change, and then we can see your test output here. So something like: |
|
Depending how and exactly when you created your python environment, it may be also be worth worth re-doing that. cftime v1.3 was recently released, and caused all sorts of failures within Iris. We’ve temporarily pinned the cftime version (#3927), but that was also after you created your branch. So if you rebase, then create a new environment from the source, then run the tests again, you might get a different result. |
f122829 to
f5104d4
Compare
343cdf7 to
9aef112
Compare
9aef112 to
8a65182
Compare
|
Thanks @rcomer for the useful feedback ! In addition to changing the I see that in #3295 the docstring for the |
|
Hi @gcaria, glad you got the tests working! I don't think I'm the best person to advise on this specific change as I haven't done anything with this part of the code. Looks like @stephenworsley has done a lot in this area so hopefully he can advise. |
bjlittle
left a comment
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.
@gcaria Awesome contribution! Thanks for taking the time to push this fix to iris. Much appreciated 😄
Could I ask you to also make a whatsnew entry to accompany this pull-request?
Simply make the following addition to the <root-dir>/docs/iris/src/whatsnew/latest.rst file, under the section "🐛 Bugs Fixed", with something along the lines of:
* `@gcaria`_ fixed :meth:`~iris.cube.Cube.cell_measure_dims` to also accept the string name of a :class:`~iris.coords.CellMeasure`. (:pull:`3931`)
* `@gcaria`_ fixed :meth:`~iris.cube.Cube.ancillary_variable_dims` to also accept the string name of a :class:`~iris.coords.AncillaryVariable`. (:pull:`3931`)
Also, at the end of the latest.rst file add the following entry:
.. _@gcaria: https://github.com/gcaria
Then we'll be good to go! 👍
|
Oh I see this was all documented here, my bad for missing it and thanks for pointing that out! |
|
@gcaria Perfect, thanks 👍 |
🚀 Pull Request
Description
Resolves #3602
I have just started to work on this, and after adding a short test I get 5 failures when testing
lib/iris/tests/unit/cube/test_Cube.py, allAssertionErrors similar to:which don't seem to be related to the test I've added. I've followed the instructions for running the tests so I'm not sure what I'm missing.