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

Remove experimental equalise_cubes #3528

Closed
bjlittle opened this issue Nov 13, 2019 · 7 comments · Fixed by #4357 or #4496
Closed

Remove experimental equalise_cubes #3528

bjlittle opened this issue Nov 13, 2019 · 7 comments · Fixed by #4357 or #4496
Assignees
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development Release: Minor
Milestone

Comments

@bjlittle
Copy link
Member

Follow-up on #3527, and remove the iris.experimental.equalise_cubes module, akin to #3523.

Target this for the 3.1.0 release.

@bjlittle
Copy link
Member Author

Closes #3342

@larsbarring
Copy link
Contributor

Now, when this function becomes a 'regular member of iris', would it be possible to have it returning the attributes ( etc) that had to be removed to equalise the cubes?

@bjlittle
Copy link
Member Author

Hey @larsbarring,

Good to hear from you. I'm assuming that this is because you want to reattach some of the metadata that was removed?

@larsbarring
Copy link
Contributor

Yes, either reattaching as for example with tracking_id, or just to know what is not consistent when I expected it to be.
Lars

@larsbarring
Copy link
Contributor

... and a follow-up thought:
The order in which the removed attributes should be returned is (of course) the same as in the cube list. No complication there I would think. But how can I know in which order the cubes were concatenated (or merged) so that I can combine the removed attributes in the right order and attach the result to the new cube?

A practical example would be a list of cubes having their own unique tracking-id. I could use equalise_cubes to first get all "offending" attributes, and from there extract the individual tracking_id:s (and possibly do something else with the other). I concatenate the cubes to carry out some processing and in the resulting cube I would like to record all the input tracking_id:s as a comma separated list in one attribute.

In this example I might get away without having the tracking_id:s sorted according to concatenation order. But if we take the attribute creation_date instead, having them in right order would help [a human] to spot if all input files were produced in one go, or if some files were replaced/updated at a later stage.

Admittedly, this should probably be a different issue, but it gives the context for my request above.

@bjlittle
Copy link
Member Author

Thanks @larsbarring, much appreciated.

My head is in the space of considering how to make iris more lenient and customisable for users, particularly when performing such operations as this, as well as concatenation, merging, arithmetic and equality.

You should probably also be aware of #3325 which intends to address the issue of iris being opinionated about what attributes it cares about.

Anyways, I appreciated the unnecessary hoops that users are forced to jump through, so your use case here is valuable, thanks for taking the time to feedback 😃

@trexfeathers trexfeathers added the Good First Issue A good issue to take on if you're just getting started with Iris development label Sep 25, 2020
@bjlittle bjlittle modified the milestones: v3.1.0, v3.2.0 Aug 4, 2021
bjlittle added a commit that referenced this issue Oct 7, 2021
…#4357)

* Change equalise_attributes to optionally return deleted attributes (#3528)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* added entries in whatsnew/latest.rst

* add unit test with minor fixes

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bill Little <[email protected]>
@rcomer
Copy link
Member

rcomer commented Oct 7, 2021

I don’t think this should have been closed by #4357, as we still need to remove the module from experimental.

@rcomer rcomer reopened this Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue A good issue to take on if you're just getting started with Iris development Release: Minor
Projects
No open projects
Status: Done
7 participants