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

Move loading and combine code into their own submodules. #6321

Merged
merged 2 commits into from
Feb 21, 2025

Conversation

pp-mo
Copy link
Member

@pp-mo pp-mo commented Feb 19, 2025

Replaces #6199
This is supposedly a "pure refactor"
Except for some rewrites of docstrings, and changes to tests where they imported some (non-public) routines which have moved

Effectively the following things happened ..

  • iris.LoadPolicy has been renamed CombineOptions -- but LoadPolicy still exists as an alternative name
  • the following definitions have moved from iris.__init__ and are now defined in iris.loading
    (but still publicly declared in the iris module) :
    LoadPolicy, LOAD_POLICY, load, load_cube, load_cubes and load_raw
    -- though LoadPolicy is now "really" CombinePolicy and the definition is actually in iris._combine
  • some private routines also moved from iris/__init__ to iris.loading :
    _generate_cubes, _load_collection
  • the following definitions have likewise moved from iris.cube to iris.loading (though these ones aren't public) :
    _CubeFilter, _CubeFilterCollection
  • the following definitions moved from iris.__init__ to iris._combine :
    _combine_cubes, _combine_load_cubes, and CombineCubes (which before was LoadPolicy)

Copy link

codecov bot commented Feb 19, 2025

Codecov Report

Attention: Patch coverage is 95.05495% with 9 lines in your changes missing coverage. Please review.

Project coverage is 89.88%. Comparing base (ca863a0) to head (944b1b5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
lib/iris/_combine.py 92.95% 4 Missing and 1 partial ⚠️
lib/iris/loading.py 96.22% 3 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6321   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files          88       90    +2     
  Lines       23430    23447   +17     
  Branches     4361     4361           
=======================================
+ Hits        21059    21076   +17     
  Misses       1644     1644           
  Partials      727      727           

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

@pp-mo pp-mo marked this pull request as ready for review February 19, 2025 01:01
@pp-mo pp-mo linked an issue Feb 19, 2025 that may be closed by this pull request
Copy link
Contributor

@stephenworsley stephenworsley left a comment

Choose a reason for hiding this comment

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

Looks good, much neater this way.

@stephenworsley stephenworsley merged commit 27c3814 into SciTools:main Feb 21, 2025
21 checks passed
@pp-mo
Copy link
Member Author

pp-mo commented Feb 21, 2025

Thanks @stephenworsley !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

move loading code into its own module
2 participants