Skip to content
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

Change equalise_attributes to optionally return deleted attr. (#3528) #4357

Merged
merged 5 commits into from
Oct 7, 2021

Conversation

larsbarring
Copy link
Contributor

@larsbarring larsbarring commented Oct 6, 2021

🚀 Pull Request

My very first one:

Description

Change util.equalise_attributes to optionally return the deleted attributes as a list of dicts in an argument.

Closes #3528


Consult Iris pull request check list
which I am afraid I find a bit difficult to understand/follow...

@SciTools-assistant SciTools-assistant added the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Oct 6, 2021
@larsbarring larsbarring force-pushed the return_deleted_attrs branch from b240b60 to b5d0e29 Compare October 6, 2021 14:59
@bjlittle bjlittle self-assigned this Oct 6, 2021
@bjlittle
Copy link
Member

bjlittle commented Oct 6, 2021

@larsbarring Fancy signing our CLA?

Then we can get your contribution across the line 👍

@bjlittle bjlittle closed this Oct 6, 2021
@bjlittle bjlittle reopened this Oct 6, 2021
@SciTools-assistant SciTools-assistant removed the Blocked: CLA needed See https://scitools.org.uk. Submit the form at: https://scitools.org.uk/cla/v4/form label Oct 6, 2021
Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larsbarring Awesome first pull-request!

Thanks for taking the time to do this, it's really appreciated... and the first of many to come, I hope 😉

Just a couple of comments to service, and then this is looking really great.

Also, for bonus credits, do you fancy writing a simple unit test to cover your change in behaviour? If you have time for that then I'd suggest that you add your unit test in lib/iris/tests/unit/util/test_equalise_attributes.py. If you don't have time, then that's totally cool - I'll follow-up this PR with another PR adding test coverage (but I'll @ mention you on the PR so that you can see what I've done, just for reference) 👍

Finally, and most importantly, let's highlight your awesome contribution in the whatsnew. Simply update the docs/src/whatsnew/latest.rst at the end of the "✨ Features" section, with something along the lines of:

#. `@larsbarring`_ updated :func`~iris.util.equalise_attributes` to return a list of dictionaries 
   containing the attributes removed from each :class:`~iris.cube.Cube`. (:pull:`4357`) 

Wordsmith it as you see fit. Then also add an rst reference to link to your GitHub user, down around line 155 i.e.,

.. _@tinyendian: https://github.com/tinyendian
.. _@larsbarring: https://github.com/larsbarring

Nice one 🍻

lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
lib/iris/util.py Outdated Show resolved Hide resolved
@bjlittle
Copy link
Member

bjlittle commented Oct 6, 2021

which I am afraid I find a bit difficult to understand/follow...

@larsbarring We're always looking to improve our documentation, for users and developers. If we were to put effort into making this part of the docs easier to understand/follow (and let's be honest, it really should be) could we garner some honest feedback from you, if it's not too much trouble?

(BTW it's totally fine to say that you're too busy 😄)

@larsbarring larsbarring force-pushed the return_deleted_attrs branch from b5d0e29 to d4edd32 Compare October 6, 2021 22:41
@bjlittle
Copy link
Member

bjlittle commented Oct 7, 2021

@larsbarring Thanks for the prompt changes 🎉

There's a minor doctest failure elsewhere associated with this change, so what I'll do is make a pull-request on your pull-request with the necessary changes to resolve that... plus I'll add a unit test to cover ourselves (since I'm in this space).

I'll work on pushing that to you now...

@larsbarring
Copy link
Contributor Author

which I am afraid I find a bit difficult to understand/follow...

@larsbarring We're always looking to improve our documentation, for users and developers. If we were to put effort into making this part of the docs easier to understand/follow (and let's be honest, it really should be) could we garner some honest feedback from you, if it's not too much trouble?

(BTW it's totally fine to say that you're too busy smile)

Well, as I'm not a software developer it would take quite some time to wrap my head around all these technicalities, already now I am outside my comfort zone, which means that ...

There's a minor doctest failure elsewhere associated with this change, so what I'll do is make a pull-request on your pull-request with the necessary changes to resolve that... plus I'll add a unit test to cover ourselves (since I'm in this space).

I'll work on pushing that to you now...

... your help is much appreciated.

@bjlittle
Copy link
Member

bjlittle commented Oct 7, 2021

@larsbarring See larsbarring#1

Copy link
Member

@bjlittle bjlittle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@larsbarring Awesome 👍

@bjlittle bjlittle merged commit 7142bb6 into SciTools:main Oct 7, 2021
@larsbarring larsbarring deleted the return_deleted_attrs branch October 7, 2021 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove experimental equalise_cubes
3 participants