-
Notifications
You must be signed in to change notification settings - Fork 286
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 a method to return a CubeList from CubeList.copy() #4094
Conversation
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.
Hi @Badboy-16 , thanks for raising this - we really appreciate our users becoming collaborators 🙂. And sorry for our absence on this - we've been away on some intense project work!
Your solution looks ideal 🍻, but as mentioned in the pull request checklist we will also need an entry in What's New.
I also think it would be sensible to add a test confirming this is working as expected. If you'd like any help with this just shout.
Unfortunately in April we had some continuous integration issues, which we have since fixed - to bring in these fixes you will need to rebase your PR.
Looking forward to hearing from you!
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 for your persistence - almost there!
In addition to the 2 comments, please could you sign the Contributor Licence Agreement - required for all Iris' pull requests.
Many Thanks.
lib/iris/tests/test_cube.py
Outdated
@@ -88,5 +88,14 @@ class Terry: | |||
self.assertIs(cube.__ne__(Terry()), NotImplemented) | |||
|
|||
|
|||
class Test_CubeList_copy(tests.IrisTest): |
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 belongs in tests/unit/cube/test_CubeList.py
I fully acknowledge Iris' testing structure is unclear!
@@ -52,6 +52,9 @@ This document explains the changes made to Iris for this release | |||
printing these objects skips metadata elements that are set to None or an | |||
empty string or dictionary. (:pull:`4040`) | |||
|
|||
#. `@Badboy-16`_ implemented a ``CubeList.copy()`` method to return a |
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 link also needs creating toward the bottom of the file - currently L172-174.
That will fix the test failures.
Hi @trexfeathers |
* master: refactor setup.py to setup.cfg (SciTools#4168) update docs pypi release (SciTools#4173) Update CI environment lockfiles (SciTools#4137) update CONTRIBUTING.md (SciTools#4165) RTD support link update (SciTools#4166) drop py36 support (SciTools#4163) github issues contact link for discussions (SciTools#4164) Bump black version (SciTools#4162) Stop CI from clobbering commits on lockfile updates (SciTools#4157) [pre-commit.ci] pre-commit autoupdate (SciTools#4161) Add a method to return a CubeList from CubeList.copy() (SciTools#4094) Update black et al (SciTools#4155)
🚀 Pull Request
Description
I had a go to resolve issue #4066 .
A method copy() was created in the CubeList class to return a CubeList object instead of a list.
Consult Iris pull request check list