Skip to content

Clarify Laziness in Iris Functions#5066

Merged
trexfeathers merged 9 commits intoSciTools:mainfrom
ESadek-MO:lazydata
Nov 16, 2022
Merged

Clarify Laziness in Iris Functions#5066
trexfeathers merged 9 commits intoSciTools:mainfrom
ESadek-MO:lazydata

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