Skip to content

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 91 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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@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 !

ukmo-ccbunney added a commit to ukmo-ccbunney/iris that referenced this pull request Feb 25, 2025
* upstream/main: (98 commits)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6335)
  SPEC 0: drop py310 and support py313 (SciTools#6195)
  Better benchmarking Python version handling (SciTools#6329)
  Move loading and combine code into their own submodules. (SciTools#6321)
  Bump scitools/workflows from 2025.02.1 to 2025.02.2 (SciTools#6327)
  replaced reference from build to python build (SciTools#6324)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6315)
  Cache Dask arrays created from `NetCDFDataProxy`s to speed up loading files with multiple variables (SciTools#6252)
  Bump scitools/workflows from 2025.02.0 to 2025.02.1 (SciTools#6313)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6310)
  Bump scitools/workflows from 2025.01.5 to 2025.02.0 (SciTools#6306)
  Updated environment lockfiles (SciTools#6301)
  Improve speed of loading small NetCDF files (SciTools#6229)
  [pre-commit.ci] pre-commit autoupdate (SciTools#6298)
  Use cube chunks for weights in aggregations with smart weights (SciTools#6288)
  Updated environment lockfiles (SciTools#6296)
  Bump scitools/workflows from 2025.01.4 to 2025.01.5 (SciTools#6300)
  Bump scitools/workflows from 2025.01.3 to 2025.01.4 (SciTools#6295)
  Lazy rectilinear interpolator  (SciTools#6084)
  Revert "Fix broken link. (SciTools#6246)" (SciTools#6297)
  ...
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Mar 22, 2025
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.

move loading code into its own module
2 participants