climate-ref 0.5.1__tar.gz → 0.5.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-0.5.1 → climate_ref-0.5.2}/PKG-INFO +10 -6
- {climate_ref-0.5.1 → climate_ref-0.5.2}/README.md +1 -1
- {climate_ref-0.5.1 → climate_ref-0.5.2}/pyproject.toml +7 -2
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/config.py +45 -13
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/migrations/env.py +5 -1
- {climate_ref-0.5.1 → climate_ref-0.5.2}/.gitignore +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/Dockerfile +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/LICENCE +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/NOTICE +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/conftest.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/__init__.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/_config_helpers.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/alembic.ini +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/__init__.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/_utils.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/config.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/datasets.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/executions.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/providers.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/cli/solve.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/constants.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/database.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/dataset_registry/obs4ref_reference.txt +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/dataset_registry/sample_data.txt +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/__init__.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/base.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/cmip6.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/obs4mips.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/pmp_climatology.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/datasets/utils.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/executor/__init__.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/executor/local.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/executor/result_handling.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/executor/synchronous.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/migrations/README +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/migrations/script.py.mako +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/migrations/versions/2025-05-02T1418_341a4aa2551e_regenerate.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/migrations/versions/2025-05-09T2032_03dbb4998e49_series_metric_value.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/__init__.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/base.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/dataset.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/diagnostic.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/execution.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/metric_value.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/models/provider.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/provider_registry.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/py.typed +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/solver.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/testing.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_config.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_datasets.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_executions/test_inspect.txt +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_executions.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_providers.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_root.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/cli/test_solve.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/conftest.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_cmip6/cmip6_catalog_db.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_cmip6.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_datasets.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_obs4mips/obs4mips_catalog_db.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_obs4mips/obs4mips_catalog_local.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_obs4mips.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_pmp_climatology/pmp_catalog_local.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_pmp_climatology.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_utils.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/executor/test_local_executor.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/executor/test_result_handling.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/executor/test_synchronous_executor.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/models/test_metric_execution.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/models/test_metric_value.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/test_config.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/test_database.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/test_provider_registry.py +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/test_solver/test_solve_metrics.yml +0 -0
- {climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/test_solver.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: climate-ref
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Application which runs 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
|
|
@@ -30,15 +30,19 @@ Requires-Dist: sqlalchemy>=2.0.36
|
|
|
30
30
|
Requires-Dist: tomlkit>=0.13.2
|
|
31
31
|
Requires-Dist: tqdm>=4.67.1
|
|
32
32
|
Requires-Dist: typer>=0.12.5
|
|
33
|
+
Provides-Extra: aft-providers
|
|
34
|
+
Requires-Dist: climate-ref-esmvaltool>=0.5.0; extra == 'aft-providers'
|
|
35
|
+
Requires-Dist: climate-ref-ilamb>=0.5.0; extra == 'aft-providers'
|
|
36
|
+
Requires-Dist: climate-ref-pmp>=0.5.0; extra == 'aft-providers'
|
|
33
37
|
Provides-Extra: celery
|
|
34
38
|
Requires-Dist: climate-ref-celery>=0.5.0; extra == 'celery'
|
|
35
|
-
Provides-Extra: metrics
|
|
36
|
-
Requires-Dist: climate-ref-esmvaltool>=0.5.0; extra == 'metrics'
|
|
37
|
-
Requires-Dist: climate-ref-ilamb>=0.5.0; extra == 'metrics'
|
|
38
|
-
Requires-Dist: climate-ref-pmp>=0.5.0; extra == 'metrics'
|
|
39
39
|
Provides-Extra: postgres
|
|
40
40
|
Requires-Dist: alembic-postgresql-enum>=1.7.0; extra == 'postgres'
|
|
41
41
|
Requires-Dist: psycopg2-binary>=2.9.2; extra == 'postgres'
|
|
42
|
+
Provides-Extra: providers
|
|
43
|
+
Requires-Dist: climate-ref-esmvaltool>=0.5.0; extra == 'providers'
|
|
44
|
+
Requires-Dist: climate-ref-ilamb>=0.5.0; extra == 'providers'
|
|
45
|
+
Requires-Dist: climate-ref-pmp>=0.5.0; extra == 'providers'
|
|
42
46
|
Description-Content-Type: text/markdown
|
|
43
47
|
|
|
44
48
|
# Climate REF (Rapid Evaluation Framework)
|
|
@@ -64,7 +68,7 @@ pip install climate-ref
|
|
|
64
68
|
If you want to use the diagnostic providers for the Assessment Fast Track, you can install them with:
|
|
65
69
|
|
|
66
70
|
```bash
|
|
67
|
-
pip install climate-ref[
|
|
71
|
+
pip install climate-ref[aft-providers]
|
|
68
72
|
```
|
|
69
73
|
|
|
70
74
|
## Quick Start
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "climate-ref"
|
|
3
|
-
version = "0.5.
|
|
3
|
+
version = "0.5.2"
|
|
4
4
|
description = "Application which runs the CMIP Rapid Evaluation Framework"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
authors = [
|
|
@@ -49,7 +49,12 @@ postgres = [
|
|
|
49
49
|
celery = [
|
|
50
50
|
"climate-ref-celery>=0.5.0",
|
|
51
51
|
]
|
|
52
|
-
|
|
52
|
+
aft-providers = [
|
|
53
|
+
"climate-ref-esmvaltool>=0.5.0",
|
|
54
|
+
"climate-ref-pmp>=0.5.0",
|
|
55
|
+
"climate-ref-ilamb>=0.5.0",
|
|
56
|
+
]
|
|
57
|
+
providers = [
|
|
53
58
|
"climate-ref-esmvaltool>=0.5.0",
|
|
54
59
|
"climate-ref-pmp>=0.5.0",
|
|
55
60
|
"climate-ref-ilamb>=0.5.0",
|
|
@@ -74,11 +74,13 @@ class PathConfig:
|
|
|
74
74
|
/// admonition | Warning
|
|
75
75
|
type: warning
|
|
76
76
|
|
|
77
|
-
These paths must be common across all systems that the REF is being run
|
|
77
|
+
These paths must be common across all systems that the REF is being run.
|
|
78
|
+
Generally, this means that they should be mounted in the same location on all systems.
|
|
78
79
|
///
|
|
79
80
|
|
|
80
81
|
If any of these paths are specified as relative paths,
|
|
81
82
|
they will be resolved to absolute paths.
|
|
83
|
+
These absolute paths will be used for all operations in the REF.
|
|
82
84
|
"""
|
|
83
85
|
|
|
84
86
|
log: Path = env_field(name="LOG_ROOT", converter=ensure_absolute_path)
|
|
@@ -157,12 +159,12 @@ class ExecutorConfig:
|
|
|
157
159
|
|
|
158
160
|
executor: str = env_field(name="EXECUTOR", default="climate_ref.executor.LocalExecutor")
|
|
159
161
|
"""
|
|
160
|
-
Executor to use for running diagnostics
|
|
162
|
+
Executor class to use for running diagnostics
|
|
161
163
|
|
|
162
164
|
This should be the fully qualified name of the executor class
|
|
163
165
|
(e.g. `climate_ref.executor.LocalExecutor`).
|
|
164
|
-
The default is to use the local executor
|
|
165
|
-
|
|
166
|
+
The default is to use the local executor which runs the executions locally, in-parallel
|
|
167
|
+
using a process pool.
|
|
166
168
|
|
|
167
169
|
This class will be used for all executions of diagnostics.
|
|
168
170
|
"""
|
|
@@ -172,6 +174,7 @@ class ExecutorConfig:
|
|
|
172
174
|
Additional configuration for the executor.
|
|
173
175
|
|
|
174
176
|
See the documentation for the executor for the available configuration options.
|
|
177
|
+
These options will be passed to the executor class when it is created.
|
|
175
178
|
"""
|
|
176
179
|
|
|
177
180
|
def build(self, config: "Config", database: "Database") -> Executor:
|
|
@@ -199,7 +202,30 @@ class ExecutorConfig:
|
|
|
199
202
|
@define
|
|
200
203
|
class DiagnosticProviderConfig:
|
|
201
204
|
"""
|
|
202
|
-
|
|
205
|
+
Defining the diagnostic providers used by the REF.
|
|
206
|
+
|
|
207
|
+
Each diagnostic provider is a package that contains the logic for running a specific
|
|
208
|
+
set of diagnostics.
|
|
209
|
+
This configuration determines which diagnostic providers are loaded and used when solving.
|
|
210
|
+
|
|
211
|
+
Multiple diagnostic providers can be specified as shown in the example below.
|
|
212
|
+
|
|
213
|
+
```toml
|
|
214
|
+
[[diagnostic_providers]]
|
|
215
|
+
provider = "climate_ref_esmvaltool.provider"
|
|
216
|
+
|
|
217
|
+
[diagnostic_providers.config]
|
|
218
|
+
|
|
219
|
+
[[diagnostic_providers]]
|
|
220
|
+
provider = "climate_ref_ilamb.provider"
|
|
221
|
+
|
|
222
|
+
[diagnostic_providers.config]
|
|
223
|
+
|
|
224
|
+
[[diagnostic_providers]]
|
|
225
|
+
provider = "climate_ref_pmp.provider"
|
|
226
|
+
|
|
227
|
+
[diagnostic_providers.config]
|
|
228
|
+
```
|
|
203
229
|
"""
|
|
204
230
|
|
|
205
231
|
provider: str
|
|
@@ -224,21 +250,29 @@ class DbConfig:
|
|
|
224
250
|
"""
|
|
225
251
|
Database configuration
|
|
226
252
|
|
|
227
|
-
We
|
|
228
|
-
|
|
253
|
+
We support SQLite and PostgreSQL databases.
|
|
254
|
+
The default is to use SQLite, which is a file-based database that is stored in the
|
|
255
|
+
`REF_CONFIGURATION` directory.
|
|
256
|
+
This is a good option for testing and development, but not recommended for production use.
|
|
257
|
+
|
|
258
|
+
For production use, we recommend using PostgreSQL.
|
|
229
259
|
"""
|
|
230
260
|
|
|
231
261
|
database_url: str = env_field(name="DATABASE_URL")
|
|
232
262
|
"""
|
|
233
263
|
Database URL that describes the connection to the database.
|
|
234
264
|
|
|
235
|
-
Defaults to sqlite:///{config.paths.db}/climate_ref.db
|
|
265
|
+
Defaults to `sqlite:///{config.paths.db}/climate_ref.db`.
|
|
236
266
|
This configuration value will be overridden by the `REF_DATABASE_URL` environment variable.
|
|
237
267
|
|
|
238
|
-
|
|
268
|
+
**Schemas**
|
|
239
269
|
|
|
270
|
+
The following schemas are supported:
|
|
271
|
+
```
|
|
240
272
|
postgresql://USER:PASSWORD@HOST:PORT/NAME
|
|
273
|
+
|
|
241
274
|
sqlite:///RELATIVE_PATH or sqlite:////ABS_PATH or sqlite:///:memory:
|
|
275
|
+
```
|
|
242
276
|
"""
|
|
243
277
|
run_migrations: bool = field(default=True)
|
|
244
278
|
|
|
@@ -285,12 +319,10 @@ def _load_config(config_file: str | Path, doc: dict[str, Any]) -> "Config":
|
|
|
285
319
|
return _converter_defaults_relaxed.structure(doc, Config)
|
|
286
320
|
|
|
287
321
|
|
|
288
|
-
@define
|
|
322
|
+
@define(auto_attribs=True)
|
|
289
323
|
class Config:
|
|
290
324
|
"""
|
|
291
|
-
REF
|
|
292
|
-
|
|
293
|
-
This class is used to store the configuration of the REF application.
|
|
325
|
+
Configuration that is used by the REF
|
|
294
326
|
"""
|
|
295
327
|
|
|
296
328
|
log_level: str = field(default="INFO")
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import alembic_postgresql_enum # noqa
|
|
2
1
|
from alembic import context, op
|
|
3
2
|
from loguru import logger
|
|
4
3
|
from sqlalchemy import Connection, inspect
|
|
@@ -9,6 +8,11 @@ from climate_ref.models import Base, MetricValue
|
|
|
9
8
|
from climate_ref_core.logging import capture_logging
|
|
10
9
|
from climate_ref_core.pycmec.controlled_vocabulary import CV
|
|
11
10
|
|
|
11
|
+
try:
|
|
12
|
+
import alembic_postgresql_enum # noqa
|
|
13
|
+
except ImportError:
|
|
14
|
+
logger.warning("alembic_postgresql_enum not installed, skipping enum migration support")
|
|
15
|
+
|
|
12
16
|
# Setup logging
|
|
13
17
|
capture_logging()
|
|
14
18
|
logger.debug("Running alembic env")
|
|
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
|
|
File without changes
|
|
File without changes
|
{climate_ref-0.5.1 → climate_ref-0.5.2}/src/climate_ref/dataset_registry/obs4ref_reference.txt
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_cmip6/cmip6_catalog_local.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_obs4mips/obs4mips_catalog_db.yml
RENAMED
|
File without changes
|
{climate_ref-0.5.1 → climate_ref-0.5.2}/tests/unit/datasets/test_obs4mips/obs4mips_catalog_local.yml
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
|