climate-ref-core 0.5.4__tar.gz → 0.5.5__tar.gz
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.
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/PKG-INFO +4 -2
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/pyproject.toml +7 -5
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/dataset_registry.py +4 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/datasets.py +6 -8
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/cv_cmip7_aft.yaml +5 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/.gitignore +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/LICENCE +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/NOTICE +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/README.md +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/__init__.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/constraints.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/diagnostics.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/env.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/exceptions.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/executor.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/logging.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/metric_values/__init__.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/metric_values/typing.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/providers.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/py.typed +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/README.md +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/__init__.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/controlled_vocabulary.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/metric.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/output.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/metric_values/test_typing.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/cmec_metric_sample.json +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/cmec_output_sample.json +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/cv_sample.yaml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/test_metric_json_schema.yml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/test_output_json_schema.yml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/conftest.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/test_cmec_metric.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/test_cmec_output.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/test_controlled_vocabulary.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_constraints.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_dataset_registry/test_dataset_registry.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_datasets/dataset_collection_hash.yml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_datasets/dataset_collection_obs4mips_hash.yml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_datasets/metric_dataset_hash.yml +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_datasets.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_exceptions.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_executor.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_logging.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_metrics.py +0 -0
- {climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_providers.py +0 -0
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-core
|
|
3
|
-
Version: 0.5.
|
|
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 ::
|
|
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,7 @@ 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
|
|
21
23
|
Requires-Dist: environs>=11
|
|
22
24
|
Requires-Dist: loguru>=0.7.0
|
|
23
25
|
Requires-Dist: numpy>=1.25.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "climate-ref-core"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.5"
|
|
4
4
|
description = "Core library for the CMIP Rapid Evaluation Framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -14,19 +14,21 @@ authors = [
|
|
|
14
14
|
]
|
|
15
15
|
requires-python = ">=3.11"
|
|
16
16
|
classifiers = [
|
|
17
|
-
"Development Status ::
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
18
|
"Operating System :: OS Independent",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
19
20
|
"Intended Audience :: Science/Research",
|
|
20
|
-
"License :: OSI Approved :: Apache Software License",
|
|
21
21
|
"Programming Language :: Python",
|
|
22
22
|
"Programming Language :: Python :: 3",
|
|
23
23
|
"Programming Language :: Python :: 3.11",
|
|
24
24
|
"Programming Language :: Python :: 3.12",
|
|
25
25
|
"Programming Language :: Python :: 3.13",
|
|
26
26
|
"Topic :: Scientific/Engineering",
|
|
27
|
+
"License :: OSI Approved :: Apache Software License",
|
|
27
28
|
]
|
|
28
29
|
dependencies = [
|
|
29
30
|
"attrs>=23.2.0",
|
|
31
|
+
"cattrs>=24.1",
|
|
30
32
|
"pydantic>=2.10.6",
|
|
31
33
|
"typing_extensions",
|
|
32
34
|
"requests",
|
|
@@ -46,8 +48,8 @@ dependencies = [
|
|
|
46
48
|
[project.license]
|
|
47
49
|
text = "Apache-2.0"
|
|
48
50
|
|
|
49
|
-
[
|
|
50
|
-
dev
|
|
51
|
+
[dependency-groups]
|
|
52
|
+
dev = [
|
|
51
53
|
"types-requests",
|
|
52
54
|
]
|
|
53
55
|
|
|
@@ -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 |
|
|
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,
|
|
59
|
-
result[key] = tuple(value)
|
|
60
|
-
elif isinstance(value, str):
|
|
58
|
+
if isinstance(value, str):
|
|
61
59
|
result[key] = (value,)
|
|
62
|
-
|
|
63
|
-
result[key] = value
|
|
60
|
+
else:
|
|
61
|
+
result[key] = tuple(value)
|
|
64
62
|
return result
|
|
65
63
|
|
|
66
64
|
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/pycmec/cv_cmip7_aft.yaml
RENAMED
|
@@ -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"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/metric_values/__init__.py
RENAMED
|
File without changes
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/src/climate_ref_core/metric_values/typing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/cmec_testdata/cv_sample.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/pycmec/test_controlled_vocabulary.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.5.4 → climate_ref_core-0.5.5}/tests/unit/test_datasets/metric_dataset_hash.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|