climate-ref-core 0.5.3__py3-none-any.whl → 0.5.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,10 @@ import pooch
15
15
  from loguru import logger
16
16
  from rich.progress import track
17
17
 
18
+ from climate_ref_core.env import env
19
+
20
+ DATASET_URL = env.str("REF_DATASET_URL", default="https://pub-b093171261094c4ea9adffa01f94ee06.r2.dev")
21
+
18
22
 
19
23
  def fetch_all_files(
20
24
  registry: pooch.Pooch,
@@ -5,7 +5,7 @@ Dataset management and filtering
5
5
  import enum
6
6
  import functools
7
7
  import hashlib
8
- from collections.abc import Iterable
8
+ from collections.abc import Collection, Iterable
9
9
  from typing import Any, Self
10
10
 
11
11
  import pandas as pd
@@ -48,19 +48,17 @@ class SourceDatasetType(enum.Enum):
48
48
  return sorted(cls, key=lambda x: x.value)
49
49
 
50
50
 
51
- def _clean_facets(raw_values: dict[str, str | tuple[str, ...] | list[str]]) -> dict[str, tuple[str, ...]]:
51
+ def _clean_facets(raw_values: dict[str, str | Collection[str]]) -> dict[str, tuple[str, ...]]:
52
52
  """
53
53
  Clean the value of a facet filter to a tuple of strings
54
54
  """
55
- result = {}
55
+ result: dict[str, tuple[str, ...]] = {}
56
56
 
57
57
  for key, value in raw_values.items():
58
- if isinstance(value, list):
59
- result[key] = tuple(value)
60
- elif isinstance(value, str):
58
+ if isinstance(value, str):
61
59
  result[key] = (value,)
62
- elif isinstance(value, tuple):
63
- result[key] = value
60
+ else:
61
+ result[key] = tuple(value)
64
62
  return result
65
63
 
66
64
 
@@ -24,6 +24,11 @@ dimensions:
24
24
  description: "Variable ID for the reference dataset (e.g., tas, pr, etc.)"
25
25
  allow_extra_values: true
26
26
  required: false
27
+ - name: grid_label
28
+ long_name: Grid Label
29
+ description: "The grid label of the output (e.g gn)"
30
+ allow_extra_values: true
31
+ required: false
27
32
  - name: member_id
28
33
  long_name: Member ID
29
34
  description: "Unique identifier for each ensemble member, includes the variant label and sub-experiment if present"
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: climate-ref-core
3
- Version: 0.5.3
3
+ Version: 0.5.5
4
4
  Summary: Core library for the CMIP Rapid Evaluation Framework
5
5
  Author-email: Jared Lewis <jared.lewis@climate-resource.com>, Mika Pflueger <mika.pflueger@climate-resource.com>, Bouwe Andela <b.andela@esciencecenter.nl>, Jiwoo Lee <lee1043@llnl.gov>, Min Xu <xum1@ornl.gov>, Nathan Collier <collierno@ornl.gov>, Dora Hegedus <dora.hegedus@stfc.ac.uk>
6
6
  License: Apache-2.0
7
7
  License-File: LICENCE
8
8
  License-File: NOTICE
9
- Classifier: Development Status :: 2 - Pre-Alpha
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
10
11
  Classifier: Intended Audience :: Science/Research
11
12
  Classifier: License :: OSI Approved :: Apache Software License
12
13
  Classifier: Operating System :: OS Independent
@@ -18,6 +19,8 @@ Classifier: Programming Language :: Python :: 3.13
18
19
  Classifier: Topic :: Scientific/Engineering
19
20
  Requires-Python: >=3.11
20
21
  Requires-Dist: attrs>=23.2.0
22
+ Requires-Dist: cattrs>=24.1
23
+ Requires-Dist: environs>=11
21
24
  Requires-Dist: loguru>=0.7.0
22
25
  Requires-Dist: numpy>=1.25.0
23
26
  Requires-Dist: pandas>=2.1.0
@@ -25,6 +28,7 @@ Requires-Dist: pooch<2,>=1.8.0
25
28
  Requires-Dist: pydantic>=2.10.6
26
29
  Requires-Dist: requests
27
30
  Requires-Dist: rich
31
+ Requires-Dist: ruamel-yaml>=0.18
28
32
  Requires-Dist: typing-extensions
29
33
  Description-Content-Type: text/markdown
30
34
 
@@ -1,7 +1,7 @@
1
1
  climate_ref_core/__init__.py,sha256=MtmPThF2F9_2UODEN6rt1x30LDxrHIZ0wyRN_wsHx5I,127
2
2
  climate_ref_core/constraints.py,sha256=QOqMh5jDBxdWTnQw2HNBizJQDF6Uu97rfJp9WudQWHc,11819
3
- climate_ref_core/dataset_registry.py,sha256=UU62h2xjt_K0Z8Md1uKsxJEvdsfv_fg6WfYRmtqcZks,5104
4
- climate_ref_core/datasets.py,sha256=bX86XPD1Z5zl3E4_56zUU9cjwNOdurU-HiYx7h1PmN4,6191
3
+ climate_ref_core/dataset_registry.py,sha256=cSzSKcz2juXNQAHO1SEl6e576ZWUuNbLTzrANyDnX3o,5247
4
+ climate_ref_core/datasets.py,sha256=TK50WQwTfbase26s8wPEGEN1BwcedrOd8nk6IlEf3Ww,6124
5
5
  climate_ref_core/diagnostics.py,sha256=5KCtHuhToSpATqjW4HBi56PsOxT5WX4VkqoZPUvYR60,18769
6
6
  climate_ref_core/env.py,sha256=Ph2dejVxTELfP3bL0xES086WLGvV5H6KvsOwCkL6m-k,753
7
7
  climate_ref_core/exceptions.py,sha256=psdipWURLyMq5hmloGxt-8kyqEe0IsENfraok7KTi8I,1437
@@ -14,11 +14,11 @@ climate_ref_core/metric_values/typing.py,sha256=2DpzmjqQ7tqOPAyjthZ_O14c0-MhiYt-
14
14
  climate_ref_core/pycmec/README.md,sha256=PzkovlPpsXqFopsYzz5GRvCAipNRGO1Wo-0gc17qr2Y,36
15
15
  climate_ref_core/pycmec/__init__.py,sha256=hXvKGEJQWyAp1i-ndr3D4zuYxkRhcR2LfXgFXlhYOk4,28
16
16
  climate_ref_core/pycmec/controlled_vocabulary.py,sha256=xio_4jl6mM_WMrwyxo70d0G5dUeIal4IW7eV-EMW4mU,5093
17
- climate_ref_core/pycmec/cv_cmip7_aft.yaml,sha256=FflwP71JFdnp-N5_OQ9_g4KE_I16fxn1Zn96yybenW4,2706
17
+ climate_ref_core/pycmec/cv_cmip7_aft.yaml,sha256=nf7T1S8WJ8ja31DG3E5mxKq3aluF_mwICf38mlFtRDM,2849
18
18
  climate_ref_core/pycmec/metric.py,sha256=XXM5DMk0BhpKcPvvCHCcgA6jKoVGMqXcwiG1UerYYps,18181
19
19
  climate_ref_core/pycmec/output.py,sha256=4-RQ439sfgNLeQZVDPB1pewF_kTwX7nCK0Z4U6bvbd0,5709
20
- climate_ref_core-0.5.3.dist-info/METADATA,sha256=UQpGMFQpfQXTyLogp11ET4zUWd7alHDDWcDQO1D18Yo,2760
21
- climate_ref_core-0.5.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
- climate_ref_core-0.5.3.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
- climate_ref_core-0.5.3.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
24
- climate_ref_core-0.5.3.dist-info/RECORD,,
20
+ climate_ref_core-0.5.5.dist-info/METADATA,sha256=Hevjf3ZdlpIGHKhFFJDOtDX7BtEOUys35nM42Jru2E4,2889
21
+ climate_ref_core-0.5.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
+ climate_ref_core-0.5.5.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
23
+ climate_ref_core-0.5.5.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
24
+ climate_ref_core-0.5.5.dist-info/RECORD,,