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

[PI] Implement new cube arithmetic proposal #3478

Closed
42 of 53 tasks
lbdreyer opened this issue Oct 22, 2019 · 3 comments
Closed
42 of 53 tasks

[PI] Implement new cube arithmetic proposal #3478

lbdreyer opened this issue Oct 22, 2019 · 3 comments

Comments

@lbdreyer
Copy link
Member

lbdreyer commented Oct 22, 2019

Following the decision from #2599, we need to implement the approach we decide on

Reference:


Acceptance Criteria

Core deliverables

  • Add lenient infra-structure:
    • client decorator
    • service decorator
    • context manager
    • runtime options state manager (thread-safe)
    • client/service active protocol
  • Support lenient metadata functionality:
    • comparison
    • combination
    • difference
  • Support lenient coordinate (macroscopic) compliance checking
  • Add cube arithmetic switch to opt-in to previous/strict behaviour
  • Remove AncillaryVariables and CellMeasures from resultant cube
  • Test coverage
  • Discuss metadata rename to signature ? @pp-mo
  • Add associated ASV metrics
  • Resolve dilemma of whether circular is part of DimCoord metadata
    • what are the implications of this?
      • require DimCoordMetadata, AuxCoordMetadata and CoordMetadata (common parent) support
      • utility of supporting cross-metadata setting for DimCoord and AuxCoord
  • Close connective tissue PRs/Issues
  • Add supporting documentation and examples etc
    • Clarify metadata name vs identity
    • Define lenient/strict operations for __eq__, combine and difference
    • <container>.metadata setter/getter patterns
  • Add whatsnew entry

Optional deliverables

Not sure whether some of these may get pulled into the core deliverables...

  • Support lenient coodinate metadata in iris.cube.Cube.coords
    • iris.cube.Cube.replace_coord
    • iris.cube.Cube.remove_coord
  • Unify metadata into a common API returning namedtuple derived classes:
    • Use lru_cache for optimised LUT metadata generation
      • Issues with non-hashable metadata 😢
        • attributes
        • coord_system
    • Create a common BaseMetadata class hierarchy
      • Use a _BaseMeta metaclass
      • Include Python2 < support of None
    • iris.coords._DimensionalMetadata._is_defn -> iris.coords._DimensionalMetadata.metadata (BaseMetadata)
    • iris.coords.AncillaryVariable.metadata (BaseMetadata)
    • iris.coords.CellMeasure._as_defn -> iris.coords.CellMeasure.metadata (CellMeasureMetadata)
    • iris.coords.Coord._as_defn -> iris.coords.Coord.metadata (CoordMetadata)
    • iris.iterate._CoordWrapper._as_defn -> iris.iterate._CoordWrapper.metadata (CoordMetadata)
    • iris.aux_factory.AuxCoordFactory._as_defn -> iris.aux_factory.AuxCoordFactory.metadata
    • Resolve STASH only specific to iris.cube.Cube
      • fix name() method
      • fix names property
  • Deprecate:
    • iris.cube.Cube.is_compatible
    • iris.coords.Coord.is_compatible
    • iris.util.as_compatible_shape
    • iris.util.describe_diff
  • Backport to 2.3.0:
    • Add future switch for new arithmetic
    • Add supporting documentation and examples etc
    • Add a whatsnew entry

Future work

  • Rename iris.coords._DimensionalMetadata to ...
  • Rename iris.analysis._dimensional_metadata_comparison to ...
  • Rename STASH to stash in Names namedtuple
  • Optimise performance by keeping metadata state not in the container classes
  • Default units clarification, see Default units #3585
  • Create iris.core with associated re-organisation
  • Remove circular from DimCoord equality and make it a calculated @property
  • Unified treatment of attributes STASH/GRIB_CODE
  • Support @lenient_client and @lenient_service on same function/method
@lbdreyer lbdreyer added this to the v3.0.0 milestone Oct 22, 2019
@lbdreyer lbdreyer added this to Backlog in Iris v3.0.0 via automation Oct 22, 2019
@bjlittle
Copy link
Member

Ref #1911

@bjlittle bjlittle self-assigned this Oct 22, 2019
@bjlittle bjlittle moved this from Backlog to Approved for Sprint in Iris v3.0.0 Oct 25, 2019
@lbdreyer lbdreyer moved this from Approved for Sprint to Backlog in Iris v3.0.0 Oct 28, 2019
@abooton abooton moved this from Backlog to Approved for Sprint in Iris v3.0.0 Nov 7, 2019
@abooton abooton moved this from Approved for Sprint to Backlog in Iris v3.0.0 Nov 7, 2019
@bjlittle bjlittle moved this from Backlog to Approved in Iris v3.0.0 Nov 15, 2019
@abooton abooton moved this from Approved to Backlog in Iris v3.0.0 Nov 21, 2019
@abooton
Copy link
Contributor

abooton commented Nov 25, 2019

See PR #3558

@bjlittle bjlittle changed the title Implement new cube arithmetic proposal [PI] Implement new cube arithmetic proposal Jun 5, 2020
@bjlittle
Copy link
Member

Closed by #3785

Iris v3.0.0 automation moved this from Parent Issues to Done Sep 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Iris v3.0.0
  
Done
Development

No branches or pull requests

3 participants