climate-ref-core 0.13.0__tar.gz → 0.13.2__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.13.0 → climate_ref_core-0.13.2}/PKG-INFO +1 -1
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/pyproject.toml +1 -1
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_dataset_registry/test_dataset_registry.py +5 -2
- climate_ref_core-0.13.2/tests/unit/test_packaging.py +29 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_providers.py +1 -1
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/.gitignore +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/LICENCE +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/NOTICE +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/README.md +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/__init__.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/cmip6_to_cmip7.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/constraints.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/data/cmip6_cmip7_variable_map.json +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/dataset_registry.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/datasets.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/diagnostics.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/env.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/__init__.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/base.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/cmip6.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/cmip7.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/fetcher.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/obs4mips.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/esgf/registry.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/exceptions.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/executor.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/logging.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/metric_values/__init__.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/metric_values/typing.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/providers.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/py.typed +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/README.md +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/__init__.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/controlled_vocabulary.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/cv_cmip7_aft.yaml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/metric.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/output.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/source_types.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/summary.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/testing.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_base.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_cmip6.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_cmip7.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_fetcher.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_obs4mips.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/esgf/test_registry.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/metric_values/test_typing.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/cmec_testdata/cmec_metric_sample.json +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/cmec_testdata/cmec_output_sample.json +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/cmec_testdata/cv_sample.yaml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/cmec_testdata/test_metric_json_schema.yml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/cmec_testdata/test_output_json_schema.yml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/conftest.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/test_cmec_metric.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/test_cmec_output.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/test_controlled_vocabulary.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_cmip6_to_cmip7.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_constraints.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_datasets/dataset_collection_hash.yml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_datasets/dataset_collection_obs4mips_hash.yml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_datasets/execution_dataset_hash.yml +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_datasets.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_diagnostics.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_exceptions.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_executor.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_logging.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_summary.py +0 -0
- {climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/tests/unit/test_testing.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref-core
|
|
3
|
-
Version: 0.13.
|
|
3
|
+
Version: 0.13.2
|
|
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-Expression: Apache-2.0
|
|
@@ -87,7 +87,8 @@ class TestDatasetRegistry:
|
|
|
87
87
|
@pytest.mark.parametrize(
|
|
88
88
|
"cache_name, expected", [(None, "test_registry"), ("custom_cache", "custom_cache")]
|
|
89
89
|
)
|
|
90
|
-
def test_with_cache_name(self, mocker, fake_registry_file, cache_name, expected):
|
|
90
|
+
def test_with_cache_name(self, mocker, monkeypatch, fake_registry_file, cache_name, expected):
|
|
91
|
+
monkeypatch.delenv("REF_DATASET_CACHE_DIR", raising=False)
|
|
91
92
|
registry = DatasetRegistryManager()
|
|
92
93
|
name = "test_registry"
|
|
93
94
|
base_url = "http://example.com"
|
|
@@ -117,7 +118,9 @@ class TestDatasetRegistry:
|
|
|
117
118
|
],
|
|
118
119
|
)
|
|
119
120
|
def test_with_environment_variable(self, monkeypatch, mocker, fake_registry_file, env, expected_path):
|
|
120
|
-
if env is
|
|
121
|
+
if env is None:
|
|
122
|
+
monkeypatch.delenv("REF_DATASET_CACHE_DIR", raising=False)
|
|
123
|
+
else:
|
|
121
124
|
monkeypatch.setenv("REF_DATASET_CACHE_DIR", env)
|
|
122
125
|
|
|
123
126
|
registry = DatasetRegistryManager()
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Tests that guard the shape of the installed ``climate_ref_core`` package.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
import importlib.resources
|
|
6
|
+
|
|
7
|
+
import pytest
|
|
8
|
+
import yaml
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_pycmec_package_data_is_importable():
|
|
12
|
+
"""``climate_ref_core.pycmec`` must be importable as a resource package."""
|
|
13
|
+
files = importlib.resources.files("climate_ref_core.pycmec")
|
|
14
|
+
assert files.is_dir()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@pytest.mark.parametrize("filename", ["cv_cmip7_aft.yaml"])
|
|
18
|
+
def test_bundled_data_files_resolve(filename):
|
|
19
|
+
"""Bundled package-data files must resolve and be readable from the wheel."""
|
|
20
|
+
resource = importlib.resources.files("climate_ref_core.pycmec") / filename
|
|
21
|
+
|
|
22
|
+
assert resource.is_file(), f"{filename} is missing from the installed climate_ref_core package"
|
|
23
|
+
|
|
24
|
+
contents = resource.read_text(encoding="utf-8")
|
|
25
|
+
assert contents, f"{filename} resolved but is empty"
|
|
26
|
+
|
|
27
|
+
# The CV YAML must parse — a truncated or corrupt file would break startup.
|
|
28
|
+
parsed = yaml.safe_load(contents)
|
|
29
|
+
assert isinstance(parsed, dict)
|
|
@@ -247,7 +247,7 @@ class TestCondaDiagnosticProvider:
|
|
|
247
247
|
|
|
248
248
|
mock_conda_exe = mocker.MagicMock(spec=Path, exists=lambda: exists)
|
|
249
249
|
mock_conda_exe.open.return_value.__enter__.return_value.write = fake_file.write
|
|
250
|
-
mock_conda_exe.read_bytes =
|
|
250
|
+
mock_conda_exe.read_bytes = fake_file.getvalue
|
|
251
251
|
mocker.patch.object(Path, "__truediv__", return_value=mock_conda_exe)
|
|
252
252
|
|
|
253
253
|
mocker.patch.object(provider, "_is_stale", return_value=is_stale)
|
|
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.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/dataset_registry.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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/metric_values/__init__.py
RENAMED
|
File without changes
|
{climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/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
|
{climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/src/climate_ref_core/pycmec/cv_cmip7_aft.yaml
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref_core-0.13.0 → climate_ref_core-0.13.2}/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.13.0 → climate_ref_core-0.13.2}/tests/unit/pycmec/test_controlled_vocabulary.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
|
|
File without changes
|
|
File without changes
|