climate-ref 0.6.4__py3-none-any.whl → 0.6.6__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.
@@ -30,7 +30,7 @@ class Dataset(Base):
30
30
 
31
31
  In the case of CMIP6 datasets, this is the instance_id.
32
32
  """
33
- dataset_type: Mapped[SourceDatasetType] = mapped_column(nullable=False)
33
+ dataset_type: Mapped[SourceDatasetType] = mapped_column(nullable=False, index=True)
34
34
  """
35
35
  Type of dataset
36
36
  """
@@ -45,6 +45,16 @@ class Dataset(Base):
45
45
  Updating a dataset will trigger a new diagnostic calculation.
46
46
  """
47
47
 
48
+ # Universal finalisation flag for all dataset types
49
+ # Only CMIP6 currently uses unfinalised datasets in practice; other types should be finalised on creation.
50
+ finalised: Mapped[bool] = mapped_column(default=True, nullable=False)
51
+ """
52
+ Whether the complete set of metadata for the dataset has been finalised.
53
+
54
+ For CMIP6, ingestion may initially create unfinalised datasets (False) until all metadata is extracted.
55
+ For other dataset types (e.g., obs4MIPs, PMP climatology), this should be True upon creation.
56
+ """
57
+
48
58
  def __repr__(self) -> str:
49
59
  return f"<Dataset slug={self.slug} dataset_type={self.dataset_type} >"
50
60
 
@@ -63,7 +73,9 @@ class DatasetFile(Base):
63
73
  __tablename__ = "dataset_file"
64
74
 
65
75
  id: Mapped[int] = mapped_column(primary_key=True)
66
- dataset_id: Mapped[int] = mapped_column(ForeignKey("dataset.id", ondelete="CASCADE"), nullable=False)
76
+ dataset_id: Mapped[int] = mapped_column(
77
+ ForeignKey("dataset.id", ondelete="CASCADE"), nullable=False, index=True
78
+ )
67
79
  """
68
80
  Foreign key to the dataset table
69
81
  """
@@ -90,9 +102,7 @@ class CMIP6Dataset(Dataset):
90
102
  """
91
103
  Represents a CMIP6 dataset
92
104
 
93
- Fields that are not marked as required in
94
- https://wcrp-cmip.github.io/WGCM_Infrastructure_Panel/Papers/CMIP6_global_attributes_filenames_CVs_v6.2.7.pdf
95
- are optional.
105
+ Fields that are not in the DRS are marked optional.
96
106
  """
97
107
 
98
108
  __tablename__ = "cmip6_dataset"
@@ -102,37 +112,37 @@ class CMIP6Dataset(Dataset):
102
112
  branch_method: Mapped[str] = mapped_column(nullable=True)
103
113
  branch_time_in_child: Mapped[float] = mapped_column(nullable=True)
104
114
  branch_time_in_parent: Mapped[float] = mapped_column(nullable=True)
105
- experiment: Mapped[str] = mapped_column()
106
- experiment_id: Mapped[str] = mapped_column()
107
- frequency: Mapped[str] = mapped_column()
108
- grid: Mapped[str] = mapped_column()
115
+ experiment: Mapped[str] = mapped_column(nullable=True)
116
+ experiment_id: Mapped[str] = mapped_column(index=True)
117
+ frequency: Mapped[str] = mapped_column(nullable=True)
118
+ grid: Mapped[str] = mapped_column(nullable=True)
109
119
  grid_label: Mapped[str] = mapped_column()
110
120
  institution_id: Mapped[str] = mapped_column()
111
121
  long_name: Mapped[str] = mapped_column(nullable=True)
112
- member_id: Mapped[str] = mapped_column()
113
- nominal_resolution: Mapped[str] = mapped_column()
122
+ member_id: Mapped[str] = mapped_column(index=True)
123
+ nominal_resolution: Mapped[str] = mapped_column(nullable=True)
114
124
  parent_activity_id: Mapped[str] = mapped_column(nullable=True)
115
125
  parent_experiment_id: Mapped[str] = mapped_column(nullable=True)
116
126
  parent_source_id: Mapped[str] = mapped_column(nullable=True)
117
127
  parent_time_units: Mapped[str] = mapped_column(nullable=True)
118
128
  parent_variant_label: Mapped[str] = mapped_column(nullable=True)
119
- realm: Mapped[str] = mapped_column()
120
- product: Mapped[str] = mapped_column()
121
- source_id: Mapped[str] = mapped_column()
122
- standard_name: Mapped[str] = mapped_column()
123
- source_type: Mapped[str] = mapped_column()
124
- sub_experiment: Mapped[str] = mapped_column()
125
- sub_experiment_id: Mapped[str] = mapped_column()
129
+ realm: Mapped[str] = mapped_column(nullable=True)
130
+ product: Mapped[str] = mapped_column(nullable=True)
131
+ source_id: Mapped[str] = mapped_column(index=True)
132
+ standard_name: Mapped[str] = mapped_column(nullable=True)
133
+ source_type: Mapped[str] = mapped_column(nullable=True)
134
+ sub_experiment: Mapped[str] = mapped_column(nullable=True)
135
+ sub_experiment_id: Mapped[str] = mapped_column(nullable=True)
126
136
  table_id: Mapped[str] = mapped_column()
127
- units: Mapped[str] = mapped_column()
137
+ units: Mapped[str] = mapped_column(nullable=True)
128
138
  variable_id: Mapped[str] = mapped_column()
129
139
  variant_label: Mapped[str] = mapped_column()
130
140
  vertical_levels: Mapped[int] = mapped_column(nullable=True)
131
141
  version: Mapped[str] = mapped_column()
132
142
 
133
- instance_id: Mapped[str] = mapped_column()
143
+ instance_id: Mapped[str] = mapped_column(index=True)
134
144
  """
135
- Unique identifier for the dataset.
145
+ Unique identifier for the dataset (including the version).
136
146
  """
137
147
 
138
148
  __mapper_args__: ClassVar[Any] = {"polymorphic_identity": SourceDatasetType.CMIP6} # type: ignore
@@ -40,7 +40,7 @@ class ExecutionGroup(CreatedUpdatedMixin, Base):
40
40
 
41
41
  id: Mapped[int] = mapped_column(primary_key=True)
42
42
 
43
- diagnostic_id: Mapped[int] = mapped_column(ForeignKey("diagnostic.id"))
43
+ diagnostic_id: Mapped[int] = mapped_column(ForeignKey("diagnostic.id"), index=True)
44
44
  """
45
45
  The diagnostic that this execution group belongs to
46
46
  """
@@ -103,8 +103,8 @@ class ExecutionGroup(CreatedUpdatedMixin, Base):
103
103
  execution_datasets = Table(
104
104
  "execution_dataset",
105
105
  Base.metadata,
106
- Column("execution_id", ForeignKey("execution.id")),
107
- Column("dataset_id", ForeignKey("dataset.id")),
106
+ Column("execution_id", ForeignKey("execution.id"), index=True),
107
+ Column("dataset_id", ForeignKey("dataset.id"), index=True),
108
108
  )
109
109
 
110
110
 
@@ -136,7 +136,8 @@ class Execution(CreatedUpdatedMixin, Base):
136
136
  ForeignKey(
137
137
  "execution_group.id",
138
138
  name="fk_execution_id",
139
- )
139
+ ),
140
+ index=True,
140
141
  )
141
142
  """
142
143
  The execution group that this execution belongs to
@@ -149,7 +150,7 @@ class Execution(CreatedUpdatedMixin, Base):
149
150
  This is used to verify if an existing diagnostic execution has been run with the same datasets.
150
151
  """
151
152
 
152
- successful: Mapped[bool] = mapped_column(nullable=True)
153
+ successful: Mapped[bool] = mapped_column(nullable=True, index=True)
153
154
  """
154
155
  Was the run successful
155
156
  """
@@ -47,13 +47,13 @@ class MetricValue(CreatedUpdatedMixin, Base):
47
47
  }
48
48
 
49
49
  id: Mapped[int] = mapped_column(primary_key=True)
50
- execution_id: Mapped[int] = mapped_column(ForeignKey("execution.id"))
50
+ execution_id: Mapped[int] = mapped_column(ForeignKey("execution.id"), index=True)
51
51
 
52
52
  attributes: Mapped[dict[str, Any]] = mapped_column()
53
53
 
54
54
  execution: Mapped["Execution"] = relationship(back_populates="values")
55
55
 
56
- type: Mapped[MetricValueType] = mapped_column()
56
+ type: Mapped[MetricValueType] = mapped_column(index=True)
57
57
  """
58
58
  Type of metric value
59
59
 
climate_ref/testing.py CHANGED
@@ -27,7 +27,7 @@ def _determine_test_directory() -> Path | None:
27
27
 
28
28
 
29
29
  TEST_DATA_DIR = _determine_test_directory()
30
- SAMPLE_DATA_VERSION = "v0.6.3"
30
+ SAMPLE_DATA_VERSION = "v0.7.2"
31
31
 
32
32
 
33
33
  def fetch_sample_data(force_cleanup: bool = False, symlink: bool = False) -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: climate-ref
3
- Version: 0.6.4
3
+ Version: 0.6.6
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-Expression: Apache-2.0
@@ -70,7 +70,7 @@ pip install climate-ref
70
70
  If you want to use the diagnostic providers for the Assessment Fast Track, you can install them with:
71
71
 
72
72
  ```bash
73
- pip install climate-ref[aft-providers]
73
+ pip install "climate-ref[aft-providers]"
74
74
  ```
75
75
 
76
76
  ## Quick Start
@@ -1,33 +1,35 @@
1
1
  climate_ref/__init__.py,sha256=M45QGfl0KCPK48A8MjI08weNvZHMYH__GblraQMxsoM,808
2
2
  climate_ref/_config_helpers.py,sha256=-atI5FX7SukhLE_jz_rL-EHQ7s0YYqKu3dSFYWxSyMU,6632
3
3
  climate_ref/alembic.ini,sha256=WRvbwSIFuZ7hWNMnR2-yHPJAwYUnwhvRYBzkJhtpGdg,3535
4
- climate_ref/config.py,sha256=4jlqYnR5es9fmKI3sfT9snnutH342o9XAMf6ipNS2lI,17083
4
+ climate_ref/config.py,sha256=WW6R7RLwEDuI11XYLYO57FwvmQz1psq9bNM3WVL3e_s,17481
5
5
  climate_ref/constants.py,sha256=9RaNLgUSuQva7ki4eRW3TjOKeVP6T81QNiu0veB1zVk,111
6
6
  climate_ref/database.py,sha256=b_6XHdr78Mo7KeLqQJ5DjLsySHPdQE83P8dRpdMfzfM,8661
7
7
  climate_ref/provider_registry.py,sha256=dyfj4vU6unKHNXtT03HafQtAi3LilL37uvu3paCnmNY,4159
8
8
  climate_ref/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
9
  climate_ref/slurm.py,sha256=XWXVPdXP-4BDib3bxYW9uPcAJdPpo1ixYZAI_y1cZuw,7305
10
10
  climate_ref/solver.py,sha256=T5sQjweSvpUMG4q8MfbGjljxa5kBgKxNotT78PwyxqU,16804
11
- climate_ref/testing.py,sha256=1b9lVCJlKxjJ7JGq6zDD2gK3BEM9ZVv1dbA-j6yb4Yk,4256
11
+ climate_ref/testing.py,sha256=nSB8levCt0Ol6odumBJgy5HMKbusRCr19SuIbkMN3MQ,4256
12
12
  climate_ref/cli/__init__.py,sha256=fvENOeL4j7CMPANVxrDlWfaB0QUvvYgrWcm5ptbL0P8,4350
13
13
  climate_ref/cli/_utils.py,sha256=6bIb8zEVvzXyKpv8MG58T-T2L2jH-G8WNrOOGpz3uCw,1918
14
14
  climate_ref/cli/config.py,sha256=ak4Rn9S6fH23PkHHlI-pXuPiZYOvUB4r26eu3p525-M,532
15
15
  climate_ref/cli/datasets.py,sha256=4iYQZ0ceoF-Cd8eSpS4Q8b9aLt_vEDUw5slzGw02DsY,8277
16
- climate_ref/cli/executions.py,sha256=2MjwxCdRB-uVJUg7RluDIf_IsoclRn22ibJjk_nhfPo,7215
16
+ climate_ref/cli/executions.py,sha256=fKQ-3IvYaTEOCIhqNNrFWgwGyHPeVmKWlDQ8VH-K9rM,7721
17
17
  climate_ref/cli/providers.py,sha256=-5hQkJc01jON1bc1dk--tSWTesyiHOzZuYMb9Vxge9k,2613
18
18
  climate_ref/cli/solve.py,sha256=ZTXrwDFDXNrX5GLMJTN9tFnpV3zlcZbEu2aF3JDJVxI,2367
19
19
  climate_ref/dataset_registry/obs4ref_reference.txt,sha256=2zJMbsAsQ49KaWziX3CqrlILq9yN7S2ygmfV3V5rsnw,8395
20
- climate_ref/dataset_registry/sample_data.txt,sha256=3JAHy14pRbLlo9-oNxUXLgZ_QOFJXUieEftBbapSY8E,20124
20
+ climate_ref/dataset_registry/sample_data.txt,sha256=MK-tvVRLOeNtEnmIQVnZrz27dSmsoSVsxmgTC6R-3v0,45237
21
21
  climate_ref/datasets/__init__.py,sha256=PV3u5ZmhyfcHbKqySgwVA8m4-naZgxzydLXSBqdTGLM,1171
22
- climate_ref/datasets/base.py,sha256=yoip8UCcTCUPn2xVlsJ1If9zXw_476dDYViH5iMgcIE,10352
23
- climate_ref/datasets/cmip6.py,sha256=3MVJ1kPdw6f6V3G4gdHIiqDGUyMqPs-_wttkw2YKAH0,8425
24
- climate_ref/datasets/obs4mips.py,sha256=CmMm4kopfb0yFsMSgUlHUm8clGJImBaodSkh6lAv_Ug,5926
22
+ climate_ref/datasets/base.py,sha256=uZ55u625ckRNjsn-AqJg4_xO5uvHchqYvwBZIt4iHtY,11017
23
+ climate_ref/datasets/cmip6.py,sha256=KO761ConHvX40n9X0xLrxjhzN7wmighNWL2JyYygRAA,7049
24
+ climate_ref/datasets/cmip6_parsers.py,sha256=wH4WKQAR2_aniXwsW7nch6nIpXk2pSpPxkT4unjV4hQ,6041
25
+ climate_ref/datasets/obs4mips.py,sha256=q0_erQb4k5KBaGMvEGgUtVSDvXQjuftqDmvW4QZpWZI,6138
25
26
  climate_ref/datasets/pmp_climatology.py,sha256=goHDc_3B2Wdiy_hmpERNvWDdDYZACPOyFDt3Du6nGc0,534
26
27
  climate_ref/datasets/utils.py,sha256=iLJO7h4G3DWsRe9hIC4qkIyi5_zIW1ZMw-FDASLujtM,359
27
- climate_ref/executor/__init__.py,sha256=PYtJs3oBS_GiUHbt8BF-6wJibpF6_vREm1Cg9TxVbLI,648
28
- climate_ref/executor/hpc.py,sha256=4o90sCyoC4jlkem3BXNo4uwFZpIvOUGfrqYucB6EtU8,12251
28
+ climate_ref/executor/__init__.py,sha256=tXuXxoFQKH9-te4O3bJg9dVrBKtjRS2si0yzRsHVfGk,902
29
+ climate_ref/executor/hpc.py,sha256=DEp_Q5kDfBTPF_4mgyedjKbXtNZ-OmIkS9bbYo2B1FQ,14153
29
30
  climate_ref/executor/local.py,sha256=65LUl41YtURFb87YTWZQHjDpIRlIKJ5Ny51c9DZjy0s,8582
30
- climate_ref/executor/result_handling.py,sha256=i7ZMX5vvyPY5gW-WWd-JHLi1BLviB9FXhn4FE8C9d4w,7787
31
+ climate_ref/executor/pbs_scheduler.py,sha256=WoH1sTmDl7bdmYodpcxZjkUSvInYUcWR4x7buIgBxqk,5807
32
+ climate_ref/executor/result_handling.py,sha256=2VQHbLKdv109pQwQO_cTqxsAXAq9S-s4w8aYg10VWms,10796
31
33
  climate_ref/executor/synchronous.py,sha256=o4TndsoKMu9AzJYLkusU9lRkgHCy6HcCP46tEs6o86U,1895
32
34
  climate_ref/migrations/README,sha256=xM5osYbyEbEFA2eh5kwary_oh-5VFWtDubA-vgWwvlE,935
33
35
  climate_ref/migrations/env.py,sha256=8GvBLhGTuQy6MKYMj7QszJEQ2LNewf1Z9kB9dBHQs9I,4375
@@ -35,16 +37,19 @@ climate_ref/migrations/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvD
35
37
  climate_ref/migrations/versions/2025-05-02T1418_341a4aa2551e_regenerate.py,sha256=S8Q4THCI4TPnlaQHgQJUCiNW5LAyQClaiTB-0dwhtXU,14050
36
38
  climate_ref/migrations/versions/2025-05-09T2032_03dbb4998e49_series_metric_value.py,sha256=s9nZ_l64pSF7sWN53rRPCQlqW_xHqR8tlWhU-ovmsME,2043
37
39
  climate_ref/migrations/versions/2025-07-03T1505_795c1e6cf496_drop_unique_requirement_on_slug.py,sha256=TfBHJkm3oPlz0P5Z1tiY6LBp2B1oDvdyL_OOYoV-OiI,984
40
+ climate_ref/migrations/versions/2025-07-20T1521_94beace57a9c_cmip6_finalised.py,sha256=pzxhT9aFaEqyyUOWf0AExsr6sMW9syyr1RUhy0nj3AM,2907
41
+ climate_ref/migrations/versions/2025-08-05T0327_a1b2c3d4e5f6_finalised_on_base_dataset.py,sha256=Uen3ryUfmIpASeIQYuUJd9xDxnEl5ItTx3jKuHoDSko,2033
42
+ climate_ref/migrations/versions/2025-09-05T2019_8d28e5e0f9c3_add_indexes.py,sha256=r8xKMIykdQbnrtBgmfTtfs5uHlmiQJNp7g5IdWi4zrs,5456
38
43
  climate_ref/models/__init__.py,sha256=rUDKRANeAEAHVOrzJVIZoZ99dDG5O4AGzHmOpC876Nc,801
39
- climate_ref/models/base.py,sha256=YMyovT2Z_tRv59zz6qC9YCCDodhO3x6OLnFdBtPJkho,1271
40
- climate_ref/models/dataset.py,sha256=Rpwrx0HqOJBHs4Sb4n6B0In__Uo0PqXSZKvZR-juGCg,7491
44
+ climate_ref/models/base.py,sha256=jY7aMH1DAekH2Zs5v-r1O4mpAAfZq2Fn4EGXrO1vFvk,1297
45
+ climate_ref/models/dataset.py,sha256=eW0FV--ImpeZH08cGlC5PPKD088F4D_zv5qEVet8iNo,8156
41
46
  climate_ref/models/diagnostic.py,sha256=0mKVvASEWNxx41R2Y-5VxplarZ4JAP6q0oaO14FKZuk,1751
42
- climate_ref/models/execution.py,sha256=lRCpaKLSR7rZbuoL94GW76tm9wLMsSDoIOA7bIa6xgY,9848
43
- climate_ref/models/metric_value.py,sha256=44OLcZz-qLx-p_9w7YWDKpD5S7Y9HyTKKsvSb77RBro,10190
47
+ climate_ref/models/execution.py,sha256=iqT8jrbP_RTyDtIO2nAczmp-rtouuaHzkb7g1IOhJ-0,9917
48
+ climate_ref/models/metric_value.py,sha256=XsmZvp21WMykBjDePDqsZsT2UefEFFskoZCd4uOXK-4,10212
44
49
  climate_ref/models/provider.py,sha256=RAE2qAAxwObu-72CdK4kt5ACMmKYEn07WJm7DU9hF28,990
45
- climate_ref-0.6.4.dist-info/METADATA,sha256=2SVSEweQ-ZaXnnpymVG9iBc8ImUBwQwnVF9Y2-0tJz8,4505
46
- climate_ref-0.6.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
47
- climate_ref-0.6.4.dist-info/entry_points.txt,sha256=IaggEJlDIhoYWXdXJafacWbWtCcoEqUKceP1qD7_7vU,44
48
- climate_ref-0.6.4.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
49
- climate_ref-0.6.4.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
50
- climate_ref-0.6.4.dist-info/RECORD,,
50
+ climate_ref-0.6.6.dist-info/METADATA,sha256=1Y-tl8sg-djWxY2UeLsN_A5paYJAFPvZGVf1rfJPtuE,4507
51
+ climate_ref-0.6.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
52
+ climate_ref-0.6.6.dist-info/entry_points.txt,sha256=IaggEJlDIhoYWXdXJafacWbWtCcoEqUKceP1qD7_7vU,44
53
+ climate_ref-0.6.6.dist-info/licenses/LICENCE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
54
+ climate_ref-0.6.6.dist-info/licenses/NOTICE,sha256=4qTlax9aX2-mswYJuVrLqJ9jK1IkN5kSBqfVvYLF3Ws,128
55
+ climate_ref-0.6.6.dist-info/RECORD,,