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

Clarify Laziness in Iris Functions #5066

Merged
merged 9 commits into from
Nov 16, 2022
Merged

Conversation

ESadek-MO
Copy link
Contributor

@ESadek-MO ESadek-MO commented Nov 14, 2022

🚀 Pull Request

Addresses #3292.

Description

Add comments in docstrings for each iris function clarifying if it can maintain laziness or not.

https://esadek-mo-irisdocs.readthedocs.io/en/lazydata/

@trexfeathers trexfeathers self-assigned this Nov 16, 2022
Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Here are objects where I would expect to see a note, but didn't find one:

  • iris.analysis.MEDIAN
  • iris.analysis.PROPORTION
  • iris.analysis.WPERCENTILE
  • iris.analysis.cartography.project
  • iris.analysis.cartography.rotate_grid_vectors
  • iris.analysis.geometry.geometry_area_weights
  • iris.analysis.maths.apply_ufunc
  • iris.cube.Cube.interpolate

You've covered everything in iris.cube.Cube that mentions coords, probably a few more places than you needed to, but we should have consistency with cell measures and ancillary variables, which have analogous behaviour with coords. Same goes for aux_factories even though they are a bit different.

The note isn't applicable for iris.palette.is_brewer, since it doesn't touch any array objects.

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

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

Great! @ESadek-MO and I have agreed that we'll continue with #3292 after v3.4, but this is already a big improvement for user clarity 😁

I've spot checked some of the notes and confirmed that they are correct.

Happy to merge once this comes out of Draft.

@ESadek-MO ESadek-MO marked this pull request as ready for review November 16, 2022 17:28
@trexfeathers trexfeathers merged commit a8616a2 into SciTools:main Nov 16, 2022
@ESadek-MO ESadek-MO deleted the lazydata branch November 23, 2023 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants