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

Mergeback of "Feature _split_attrs" branch #5152

Merged
merged 20 commits into from
Nov 21, 2023
Merged

Commits on Sep 28, 2022

  1. Merge pull request #4997 from SciTools/main

    Mergeback from main
    pp-mo authored Sep 28, 2022
    Configuration menu
    Copy the full SHA
    f799473 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Split-attrs: Cube metadata refactortests (#4993)

    * Convert Test___eq__ to pytest.
    
    * Convert Test_combine to pytest.
    
    * Convert Test_difference to pytest.
    
    * Review changes.
    pp-mo authored Oct 27, 2022
    Configuration menu
    Copy the full SHA
    471eb53 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Merge pull request #5164 from SciTools/main

    Merge-forward to FEATURE_split_attrs
    pp-mo authored Feb 20, 2023
    Configuration menu
    Copy the full SHA
    6f436d7 View commit details
    Browse the repository at this point in the history
  2. Split attrs - tests for status quo (#4960)

    * Tests for attribute handling in netcdf load/save.
    
    * Tidy test functions.
    
    * Fix import order exception.
    
    * Add cf-global attributes test.
    
    * Towards more pytest-y implemenation.
    
    * Replace 'create_testcase' with fixture which also handles temporary directory.
    
    * Much tidy; use fixtures to parametrise over multiple attributes.
    
    * Fix warnings; begin data-style attrs tests.
    
    * Tests for data-style attributes.
    
    * Simplify setup fixture + improve docstring.
    
    * No parallel test runner, to avoid error for Python>3.8.
    
    * Fixed for new-style netcdf module.
    
    * Small review changes.
    
    * Rename attributes set 'data-style' as 'local-style'.
    
    * Simplify use of fixtures; clarify docstrings/comments and improve argument names.
    
    * Clarify testing sections for different attribute 'styles'.
    
    * Re-enable parallel testing.
    
    * Sorted params to avoid parallel testing bug - pytest#432.
    
    * Rename test functions to make alpha-order match order in class.
    
    * Split netcdf load/save attribute testing into separate sourcefile.
    
    * Add tests for loaded cube attributes; refactor to share code between Load and Roundtrip tests.
    
    * Add tests for attribute saving.
    
    * Fix method names in comments.
    
    * Clarify source of Conventions attributes.
    
    * Explain the test numbering in TestRoundtrip/TestLoad.
    
    * Remove obsolete test helper method.
    
    * Fix small typo; Fix numbering of testcases in TestSave.
    pp-mo authored Feb 20, 2023
    Configuration menu
    Copy the full SHA
    f485f8a View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2023

  1. Configuration menu
    Copy the full SHA
    2549f05 View commit details
    Browse the repository at this point in the history

Commits on Jul 20, 2023

  1. Configuration menu
    Copy the full SHA
    bba4650 View commit details
    Browse the repository at this point in the history
  2. Implement split cube attributes. (#5040)

    * Implement split cube attributes.
    
    * Test fixes.
    
    * Modify examples for simpler metadata printouts.
    
    * Added tests, small behaviour fixes.
    
    * Simplify copy.
    
    * Fix doctests.
    
    * Skip doctests with non-replicable outputs (from use of sets).
    
    * Tidy test comments, and add extra test.
    
    * Tiny typo.
    
    * Remove redundant redefinition of Cube.attributes.
    
    * Add CubeAttrsDict in module __all__ + improve docs coverage.
    
    * Review changes - small test changes.
    
    * More review changes.
    
    * [pre-commit.ci] auto fixes from pre-commit.com hooks
    
    for more information, see https://pre-commit.ci
    
    * Fix CubeAttrsDict example docstrings.
    
    * [pre-commit.ci] auto fixes from pre-commit.com hooks
    
    for more information, see https://pre-commit.ci
    
    * Odd small fixes.
    
    * Improved docstrings and comments; fix doctests.
    
    * Don't sidestep netcdf4 thread-safety.
    
    * Publicise LimitedAttributeDict, so CubeAttrsDict can refer to it.
    
    * Fix various internal + external links.
    
    * Update lib/iris/cube.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Update lib/iris/cube.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Update lib/iris/cube.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Update lib/iris/cube.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Streamline docs.
    
    * Review changes.
    
    ---------
    
    Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    3 people authored Jul 20, 2023
    Configuration menu
    Copy the full SHA
    8b751c5 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2023

  1. Splitattrs ncload (#5384)

    * Distinguish local+global attributes in netcdf loads.
    
    * Small test fixes.
    
    * Small doctest fix.
    
    * Fix attribute load-save tests for new behaviour, and old-behaviour equivalence.
    pp-mo authored Jul 21, 2023
    Configuration menu
    Copy the full SHA
    68eaa53 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Split attrs docs (#5418)

    * Clarification in CubeAttrsDict examples.
    
    * CubeAttrsDict fix docstring typo.
    
    * Raise awareness of split attributes in user guide.
    
    * What's New entry.
    
    * Changes to metadata documentation.
    trexfeathers authored Aug 24, 2023
    Configuration menu
    Copy the full SHA
    57eec4d View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2023

  1. Splitattrs ncsave redo (#5410)

    * Add docs and future switch, no function yet.
    
    * Typing enables code completion for Cube.attributes.
    
    * Make roundtrip checking more precise + improve some tests accordingly (cf. #5403).
    
    * Rework all tests to use common setup + results-checking code.
    
    * Saver supports split-attributes saving (no tests yet).
    
    * Tiny docs fix.
    
    * Explain test routines better.
    
    * Fix init of FUTURE object.
    
    * Remove spurious re-test of FUTURE.save_split_attrs.
    
    * Don't create Cube attrs of 'None' (n.b. but no effect as currently used).
    
    * Remove/repair refs to obsolete routines.
    
    * Check all warnings from save operations.
    
    * Remove TestSave test numbers.
    
    * More save cases: no match with missing, and different cube attribute types.
    
    * Run save/roundtrip tests both with+without split saves.
    
    * Fix.
    
    * Review changes.
    
    * Fix changed warning messages.
    
    * Move warnings checking from 'run' to 'check' phase.
    
    * Simplify and improve warnings checking code.
    
    * Fix wrong testcase.
    
    * Minor review changes.
    
    * Fix reverted code.
    
    * Use sets to simplify demoted-attributes code.
    
    * WIP
    
    * Working with iris 3.6.1, no errors TestSave or TestRoundtrip.
    
    * Interim save (incomplete?).
    
    * Different results form for split tests; working for roundtrip.
    
    * Check that all param lists are sorted.
    
    * Check matrix result-files compatibility; add test_save_matrix.
    
    * test_load_matrix added; two types of load result.
    
    * Finalise special-case attributes.
    
    * Small docs tweaks.
    
    * Add some more testcases,
    
    * Ensure valid sort-order for globals of possibly different types.
    
    * Initialise matrix results with legacy values from v3.6.1 -- all matching.
    
    * Add full current matrix results, i.e. snapshot current behaviours.
    
    * Review changes : rename some matrix testcases, for clarity.
    pp-mo authored Oct 10, 2023
    Configuration menu
    Copy the full SHA
    fa7962e View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Splitattrs ncsave redo commonmeta (#5538)

    * Define common-metadata operartions on split attribute dictionaries.
    
    * Tests for split-attributes handling in CubeMetadata operations.
    
    * Small tidy and clarify.
    
    * Common metadata ops support mixed split/unsplit attribute dicts.
    
    * Clarify with better naming, comments, docstrings.
    
    * Remove split-attrs handling to own sourcefile, and implement as a decorator.
    
    * Remove redundant tests duplicated by matrix testcases.
    
    * Newstyle split-attrs matrix testing, with fewer testcases.
    
    * Small improvements to comments + docstrings.
    
    * Fix logic for equals expectation; expand primary/secondary independence test.
    
    * Clarify result testing in metadata operations decorator.
    pp-mo authored Nov 15, 2023
    Configuration menu
    Copy the full SHA
    0c20608 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Splitattrs equalise (#5586)

    * Add tests in advance for split-attributes handling cases.
    
    * Move dict conversion inside utility, for use elsewhere.
    
    * Add support for split-attributes to equalise_attributes.
    
    * Update lib/iris/util.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Update lib/iris/tests/unit/util/test_equalise_attributes.py
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    
    * Simplify and clarify equalise_attributes code.
    
    ---------
    
    Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
    pp-mo and trexfeathers authored Nov 17, 2023
    Configuration menu
    Copy the full SHA
    8c483af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    40f82b5 View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2023

  1. Extra CubeAttrsDict methods to emulate dictionary behaviours. (#5592)

    * Extra CubeAttrsDict methods to emulate dictionary behaviours.
    
    * Don't use staticmethod on fixture.
    pp-mo authored Nov 20, 2023
    Configuration menu
    Copy the full SHA
    da96028 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a6941f0 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2023

  1. Configuration menu
    Copy the full SHA
    d425c68 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    87ac298 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b3d8cec View commit details
    Browse the repository at this point in the history
  4. Licence header fixes.

    pp-mo committed Nov 21, 2023
    Configuration menu
    Copy the full SHA
    fa584ac View commit details
    Browse the repository at this point in the history
  5. Splitattrs ncsave deprecation (#5595)

    * Small improvement to split-attrs whatsnew.
    
    * Emit deprecation warning when saving without split-attrs enabled.
    
    * Stop legacy-split-attribute warnings from upsetting delayed-saving tests.
    pp-mo authored Nov 21, 2023
    Configuration menu
    Copy the full SHA
    842676f View commit details
    Browse the repository at this point in the history