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

[FB] [PI-3478] Lenient metadata #3739

Merged
merged 46 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
6a6b287
add lenient infra-structure
bjlittle Dec 10, 2019
c0b8ffd
add metadata lenient __eq__ support
bjlittle Dec 11, 2019
15034ea
complete __eq__, combine and difference support
bjlittle Dec 13, 2019
3cf8808
explicit inherited lenient_service + support equal convenience
bjlittle Dec 14, 2019
d0079e9
fix attributes difference + lenient kwargs
bjlittle Dec 14, 2019
a1da4ca
make lenient public + minor tidy
bjlittle Jun 9, 2020
e3bca16
rename MetadataManagerFactory to metadata_manager_factory
bjlittle Jun 9, 2020
3d345d0
extend lenient_client decorator to support services registration
bjlittle Jun 10, 2020
c2db01f
add lenient test coverage
bjlittle Jun 12, 2020
0662400
purge qualname usage in metadata.py
bjlittle Jun 12, 2020
ff5166e
support global enable for lenient services
bjlittle Jun 12, 2020
35a603d
support partial mapping metadata assignment
bjlittle Jun 13, 2020
c439579
purge Lenient.__setattr__ from api
bjlittle Jun 15, 2020
f14f3df
add BaseMetadata compare test coverage
bjlittle Jun 15, 2020
9bcea00
metadata rationalisation
bjlittle Jun 16, 2020
30b7873
add BaseMetadata difference test coverage
bjlittle Jun 18, 2020
089a02c
added context manager ephemeral comment clarification
bjlittle Jun 18, 2020
f65662b
add BaseMetadata __ne__ test coverage
bjlittle Jun 18, 2020
fe4cee6
standardise lenient decorator closure names
bjlittle Jun 18, 2020
85f9c55
add BaseMetadata equal test coverage
bjlittle Jun 19, 2020
edcc20d
half dunder context
bjlittle Jun 19, 2020
8a218c7
add AncillaryVariableMetadata test coverage
bjlittle Jun 19, 2020
81fec8e
add additional AncillaryVariableMetadata test coverage
bjlittle Jun 19, 2020
06fbb72
add CellMeasureMetadata test coverage
bjlittle Jun 22, 2020
22e0115
Clarify lenient_service operation + simplify code.
pp-mo Jun 22, 2020
679433d
add CoordMetadata test coverage
bjlittle Jun 22, 2020
b50dda8
Merge pull request #23 from pp-mo/lenient_docs
bjlittle Jun 22, 2020
ded88ef
add CubeMetadata test coverage
bjlittle Jun 22, 2020
f1c338f
metadata tests use self.cls
bjlittle Jun 22, 2020
638ece1
fix typo
bjlittle Jun 22, 2020
14c9d14
fix context manager ephemeral services
bjlittle Jun 22, 2020
bce4c85
add logging
bjlittle Jun 23, 2020
e70d85b
Pin pillow to make graphics tests work again. (#3630)
pp-mo Jan 9, 2020
afaa961
Fixed tests since Numpy 1.18 deprecation of non-int num arguments for…
trexfeathers Feb 11, 2020
91ff5c9
Switched use of datetime.weekday() to datetime.dayofwk. (#3687)
trexfeathers Mar 17, 2020
944d0ef
New image hashes for mpl 3x2 (#3682)
pp-mo Mar 18, 2020
f2c7a9f
fix sentinel uniqueness test failure
bjlittle Jun 25, 2020
c0bc36d
remove redundant cdm mapping test
bjlittle Jun 25, 2020
014b7b0
difference returns None for no difference
bjlittle Jul 1, 2020
1e6f52e
protect Lenient and LENIENT private
bjlittle Jul 1, 2020
e8b2aea
privitise lenient framework and add API veneer
bjlittle Jul 2, 2020
b851164
add explicit maths feature default
bjlittle Jul 2, 2020
8d3a0e0
review actions
bjlittle Jul 2, 2020
d8e5f16
review actions
bjlittle Jul 3, 2020
972cd29
trexfeathers review actions
bjlittle Jul 3, 2020
de65507
stephenworsley review actions
bjlittle Jul 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions lib/iris/aux_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@
import dask.array as da
import numpy as np

from iris.common import CFVariableMixin, CoordMetadata, MetadataManagerFactory
from iris.common import (
CFVariableMixin,
CoordMetadata,
metadata_manager_factory,
)
import iris.coords


Expand All @@ -35,7 +39,7 @@ class AuxCoordFactory(CFVariableMixin, metaclass=ABCMeta):
def __init__(self):
# Configure the metadata manager.
if not hasattr(self, "_metadata_manager"):
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)

#: Descriptive name of the coordinate made by the factory
self.long_name = None
Expand Down Expand Up @@ -385,7 +389,7 @@ def __init__(self, delta=None, sigma=None, orography=None):

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

if delta and delta.nbounds not in (0, 2):
Expand Down Expand Up @@ -574,7 +578,7 @@ def __init__(self, delta=None, sigma=None, surface_air_pressure=None):

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coords meet necessary conditions.
Expand Down Expand Up @@ -779,7 +783,7 @@ def __init__(

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coordinates meet necessary conditions.
Expand Down Expand Up @@ -1080,7 +1084,7 @@ def __init__(self, sigma=None, eta=None, depth=None):

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coordinates meet necessary conditions.
Expand Down Expand Up @@ -1263,7 +1267,7 @@ def __init__(self, s=None, c=None, eta=None, depth=None, depth_c=None):

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coordinates meet necessary conditions.
Expand Down Expand Up @@ -1486,7 +1490,7 @@ def __init__(

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coordinates meet necessary conditions.
Expand Down Expand Up @@ -1704,7 +1708,7 @@ def __init__(self, s=None, c=None, eta=None, depth=None, depth_c=None):

"""
# Configure the metadata manager.
self._metadata_manager = MetadataManagerFactory(CoordMetadata)
self._metadata_manager = metadata_manager_factory(CoordMetadata)
super().__init__()

# Check that provided coordinates meet necessary conditions.
Expand Down
1 change: 1 addition & 0 deletions lib/iris/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
# licensing details.


from .lenient import *
from .metadata import *
from .mixin import *
Loading