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

Include ancillary variables and cell_measures during intersect #5804

Merged
merged 10 commits into from
Aug 23, 2024

Conversation

ESadek-MO
Copy link
Contributor

@ESadek-MO ESadek-MO commented Mar 5, 2024

🚀 Pull Request

Closes #5413.

To do:

  • Add rough functionality
  • Refactor functions into one consolidated
  • Add tests

@ESadek-MO ESadek-MO requested a review from pp-mo March 5, 2024 09:25
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.77%. Comparing base (b8f554f) to head (2787ca5).
Report is 1 commits behind head on main.

Files Patch % Lines
lib/iris/cube.py 91.30% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5804      +/-   ##
==========================================
- Coverage   89.77%   89.77%   -0.01%     
==========================================
  Files          88       88              
  Lines       23026    23037      +11     
  Branches     5036     5038       +2     
==========================================
+ Hits        20672    20681       +9     
- Misses       1623     1624       +1     
- Partials      731      732       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ESadek-MO
Copy link
Contributor Author

Two notes on last commit:

  • I decided against consolidating create_coord into create_metadata as it would require so many if checks and the like it would've been harder to read. That said, I'm happy to be vetoed on this.
  • This PR threw up some flake8 errors from previous changes; cube was being used as a variable despite being imported as well. All these instances have been changed to c instead

@pp-mo
Copy link
Member

pp-mo commented Jul 1, 2024

Hi @ESadek-MO
FYI I just assigned this to you..
I was reviewing my Peloton tasks, and this popped up,
but being in Draft I think it is still on you.

@ESadek-MO ESadek-MO marked this pull request as ready for review August 22, 2024 14:45
Copy link
Member

@pp-mo pp-mo left a comment

Choose a reason for hiding this comment

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

Some small suggestions which I think make it simpler
(though you may disagree !)

I did also wonder if we should check that the newly constructed cell_measures / ancillaries remain lazy. But on second thoughts I don't think it's really needed

lib/iris/cube.py Outdated Show resolved Hide resolved
lib/iris/cube.py Outdated Show resolved Hide resolved
lib/iris/cube.py Outdated Show resolved Hide resolved
lib/iris/cube.py Outdated Show resolved Hide resolved
Copy link
Member

@pp-mo pp-mo left a comment

Choose a reason for hiding this comment

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

Thanks, looks fine now to me

@pp-mo pp-mo merged commit 773c55b into SciTools:main Aug 23, 2024
21 checks passed
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.

Cube loses ancillary variables and cell_measures after (some) intersections
2 participants