Skip to content

Commit 06d3d5c

Browse files
committed
update experiment_type field to experiment_types to be better alined with multivalued range
1 parent d970e1e commit 06d3d5c

4 files changed

Lines changed: 58 additions & 54 deletions

File tree

project/jsonschema/oae_data_protocol.schema.json

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,12 +2512,12 @@
25122512
"title": "Experiment Lead(s)",
25132513
"type": "array"
25142514
},
2515-
"experiment_type": {
2516-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
2515+
"experiment_types": {
2516+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
25172517
"items": {
25182518
"$ref": "#/$defs/ExperimentType"
25192519
},
2520-
"title": "mCDR Experiment Type",
2520+
"title": "mCDR Experiment Type(s)",
25212521
"type": "array"
25222522
},
25232523
"name": {
@@ -2531,7 +2531,7 @@
25312531
"type": "string"
25322532
},
25332533
"public_comments": {
2534-
"description": "If possible, please provide public comments concatenated into a single pdf",
2534+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
25352535
"title": "Public Comments",
25362536
"type": "string"
25372537
},
@@ -2552,7 +2552,7 @@
25522552
"spatial_coverage",
25532553
"project_id",
25542554
"experiment_id",
2555-
"experiment_type",
2555+
"experiment_types",
25562556
"experiment_leads",
25572557
"start_datetime"
25582558
],
@@ -3047,12 +3047,12 @@
30473047
"title": "Experiment Lead(s)",
30483048
"type": "array"
30493049
},
3050-
"experiment_type": {
3051-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
3050+
"experiment_types": {
3051+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
30523052
"items": {
30533053
"$ref": "#/$defs/ExperimentType"
30543054
},
3055-
"title": "mCDR Experiment Type",
3055+
"title": "mCDR Experiment Type(s)",
30563056
"type": "array"
30573057
},
30583058
"meteorological_and_tidal_data": {
@@ -3088,7 +3088,7 @@
30883088
"type": "string"
30893089
},
30903090
"public_comments": {
3091-
"description": "If possible, please provide public comments concatenated into a single pdf",
3091+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
30923092
"title": "Public Comments",
30933093
"type": "string"
30943094
},
@@ -3114,7 +3114,7 @@
31143114
"spatial_coverage",
31153115
"project_id",
31163116
"experiment_id",
3117-
"experiment_type",
3117+
"experiment_types",
31183118
"experiment_leads",
31193119
"start_datetime"
31203120
],
@@ -3276,12 +3276,12 @@
32763276
"title": "Experiment Lead(s)",
32773277
"type": "array"
32783278
},
3279-
"experiment_type": {
3280-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
3279+
"experiment_types": {
3280+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
32813281
"items": {
32823282
"$ref": "#/$defs/ExperimentType"
32833283
},
3284-
"title": "mCDR Experiment Type",
3284+
"title": "mCDR Experiment Type(s)",
32853285
"type": "array"
32863286
},
32873287
"meteorological_and_tidal_data": {
@@ -3317,7 +3317,7 @@
33173317
"type": "string"
33183318
},
33193319
"public_comments": {
3320-
"description": "If possible, please provide public comments concatenated into a single pdf",
3320+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
33213321
"title": "Public Comments",
33223322
"type": "string"
33233323
},
@@ -3356,7 +3356,7 @@
33563356
"spatial_coverage",
33573357
"project_id",
33583358
"experiment_id",
3359-
"experiment_type",
3359+
"experiment_types",
33603360
"experiment_leads",
33613361
"start_datetime"
33623362
],
@@ -3538,12 +3538,12 @@
35383538
"title": "Experiment Lead(s)",
35393539
"type": "array"
35403540
},
3541-
"experiment_type": {
3542-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
3541+
"experiment_types": {
3542+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
35433543
"items": {
35443544
"$ref": "#/$defs/ExperimentType"
35453545
},
3546-
"title": "mCDR Experiment Type",
3546+
"title": "mCDR Experiment Type(s)",
35473547
"type": "array"
35483548
},
35493549
"meteorological_and_tidal_data": {
@@ -3579,7 +3579,7 @@
35793579
"type": "string"
35803580
},
35813581
"public_comments": {
3582-
"description": "If possible, please provide public comments concatenated into a single pdf",
3582+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
35833583
"title": "Public Comments",
35843584
"type": "string"
35853585
},
@@ -3641,7 +3641,7 @@
36413641
"spatial_coverage",
36423642
"project_id",
36433643
"experiment_id",
3644-
"experiment_type",
3644+
"experiment_types",
36453645
"experiment_leads",
36463646
"start_datetime"
36473647
],
@@ -3706,12 +3706,12 @@
37063706
"title": "Experiment Lead(s)",
37073707
"type": "array"
37083708
},
3709-
"experiment_type": {
3710-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
3709+
"experiment_types": {
3710+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
37113711
"items": {
37123712
"$ref": "#/$defs/ExperimentType"
37133713
},
3714-
"title": "mCDR Experiment Type",
3714+
"title": "mCDR Experiment Type(s)",
37153715
"type": "array"
37163716
},
37173717
"grid_details": {
@@ -3763,7 +3763,7 @@
37633763
"type": "string"
37643764
},
37653765
"public_comments": {
3766-
"description": "If possible, please provide public comments concatenated into a single pdf",
3766+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
37673767
"title": "Public Comments",
37683768
"type": "string"
37693769
},
@@ -3784,7 +3784,7 @@
37843784
"spatial_coverage",
37853785
"project_id",
37863786
"experiment_id",
3787-
"experiment_type",
3787+
"experiment_types",
37883788
"experiment_leads",
37893789
"start_datetime"
37903790
],
@@ -5256,12 +5256,12 @@
52565256
"title": "Experiment Lead(s)",
52575257
"type": "array"
52585258
},
5259-
"experiment_type": {
5260-
"description": "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
5259+
"experiment_types": {
5260+
"description": "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions.",
52615261
"items": {
52625262
"$ref": "#/$defs/ExperimentType"
52635263
},
5264-
"title": "mCDR Experiment Type",
5264+
"title": "mCDR Experiment Type(s)",
52655265
"type": "array"
52665266
},
52675267
"meteorological_and_tidal_data": {
@@ -5297,7 +5297,7 @@
52975297
"type": "string"
52985298
},
52995299
"public_comments": {
5300-
"description": "If possible, please provide public comments concatenated into a single pdf",
5300+
"description": "File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf",
53015301
"title": "Public Comments",
53025302
"type": "string"
53035303
},
@@ -5352,7 +5352,7 @@
53525352
"spatial_coverage",
53535353
"project_id",
53545354
"experiment_id",
5355-
"experiment_type",
5355+
"experiment_types",
53565356
"experiment_leads",
53575357
"start_datetime"
53585358
],

project/typescript/oae_data_protocol.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -828,9 +828,9 @@ Any method that creates a unique ID that will link all project data is acceptabl
828828
/** The experiment to which the data belong. Any naming convention that produces a unique ID is usable. The recommended naming convention is:
829829
Project ID + Experiment type + Optional numerical indicator to differentiate between various experiments of the same type for a project. A two digit consecutive number beginning with 01 */
830830
experiment_id: string,
831-
/** The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions. */
832-
experiment_type: string,
833-
/** If possible, please provide public comments concatenated into a single pdf */
831+
/** The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions. */
832+
experiment_types: string,
833+
/** File name(s) of public comment related documents. If possible, please provide public comments concatenated into a single pdf */
834834
public_comments?: string,
835835
/** Provide details for each experiment lead / principal investigator (PI) including: Name, institutional information (name, address), phone, email, ID type (e.g., ORCID, etc), researcher ID, and role. */
836836
experiment_leads: Person[],

src/oae_data_protocol/datamodel/oae_data_protocol.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from oae_data_protocol.yaml by pythongen.py version: 0.0.1
2-
# Generation date: 2026-03-29T13:58:46
2+
# Generation date: 2026-03-30T19:45:07
33
# Schema: OAEDataManagementProtocol
44
#
55
# id: OAEDataManagementProtocol
@@ -582,7 +582,7 @@ class Experiment(YAMLRoot):
582582
spatial_coverage: Union[dict, SpatialCoverage] = None
583583
project_id: str = None
584584
experiment_id: str = None
585-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
585+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
586586
experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None
587587
start_datetime: Union[str, XSDDateTime] = None
588588
name: Optional[str] = None
@@ -610,11 +610,11 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
610610
if not isinstance(self.experiment_id, str):
611611
self.experiment_id = str(self.experiment_id)
612612

613-
if self._is_empty(self.experiment_type):
614-
self.MissingRequiredField("experiment_type")
615-
if not isinstance(self.experiment_type, list):
616-
self.experiment_type = [self.experiment_type] if self.experiment_type is not None else []
617-
self.experiment_type = [v if isinstance(v, ExperimentType) else ExperimentType(v) for v in self.experiment_type]
613+
if self._is_empty(self.experiment_types):
614+
self.MissingRequiredField("experiment_types")
615+
if not isinstance(self.experiment_types, list):
616+
self.experiment_types = [self.experiment_types] if self.experiment_types is not None else []
617+
self.experiment_types = [v if isinstance(v, ExperimentType) else ExperimentType(v) for v in self.experiment_types]
618618

619619
if self._is_empty(self.experiment_leads):
620620
self.MissingRequiredField("experiment_leads")
@@ -656,7 +656,7 @@ class InSituExperiment(Experiment):
656656
spatial_coverage: Union[dict, SpatialCoverage] = None
657657
project_id: str = None
658658
experiment_id: str = None
659-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
659+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
660660
experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None
661661
start_datetime: Union[str, XSDDateTime] = None
662662
vertical_coverage: Optional[Union[dict, VerticalExtent]] = None
@@ -703,7 +703,7 @@ class Intervention(InSituExperiment):
703703
spatial_coverage: Union[dict, SpatialCoverage] = None
704704
project_id: str = None
705705
experiment_id: str = None
706-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
706+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
707707
experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None
708708
start_datetime: Union[str, XSDDateTime] = None
709709
alkalinity_feedstock_processing: Union[str, "AlkalinityFeedstockProcessing"] = None
@@ -813,7 +813,7 @@ class Tracer(InSituExperiment):
813813
spatial_coverage: Union[dict, SpatialCoverage] = None
814814
project_id: str = None
815815
experiment_id: str = None
816-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
816+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
817817
experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None
818818
start_datetime: Union[str, XSDDateTime] = None
819819
tracer_form: Union[str, "TracerForm"] = None
@@ -896,7 +896,7 @@ class InterventionWithTracer(Intervention):
896896
spatial_coverage: Union[dict, SpatialCoverage] = None
897897
project_id: str = None
898898
experiment_id: str = None
899-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
899+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
900900
experiment_leads: Union[Union[dict, "Person"], List[Union[dict, "Person"]]] = None
901901
start_datetime: Union[str, XSDDateTime] = None
902902
alkalinity_feedstock_processing: Union[str, "AlkalinityFeedstockProcessing"] = None
@@ -2605,7 +2605,7 @@ class Model(Experiment):
26052605
spatial_coverage: Union[dict, SpatialCoverage] = None
26062606
project_id: str = None
26072607
experiment_id: str = None
2608-
experiment_type: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
2608+
experiment_types: Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]] = None
26092609
experiment_leads: Union[Union[dict, Person], List[Union[dict, Person]]] = None
26102610
start_datetime: Union[str, XSDDateTime] = None
26112611
model_configuration: Optional[Union[Union[str, URI], List[Union[str, URI]]]] = empty_list()
@@ -4785,8 +4785,8 @@ class slots:
47854785
slots.permit__approval_document = Slot(uri=OAE.approval_document, name="permit__approval_document", curie=OAE.curie('approval_document'),
47864786
model_uri=OAE.permit__approval_document, domain=None, range=str)
47874787

4788-
slots.experiment__experiment_type = Slot(uri=OAE.experiment_type, name="experiment__experiment_type", curie=OAE.curie('experiment_type'),
4789-
model_uri=OAE.experiment__experiment_type, domain=None, range=Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]])
4788+
slots.experiment__experiment_types = Slot(uri=OAE.experiment_types, name="experiment__experiment_types", curie=OAE.curie('experiment_types'),
4789+
model_uri=OAE.experiment__experiment_types, domain=None, range=Union[Union[str, "ExperimentType"], List[Union[str, "ExperimentType"]]])
47904790

47914791
slots.experiment__public_comments = Slot(uri=OAE.public_comments, name="experiment__public_comments", curie=OAE.curie('public_comments'),
47924792
model_uri=OAE.experiment__public_comments, domain=None, range=Optional[str])

src/oae_data_protocol/schema/experiment.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,24 @@ classes:
4343
longitude, southernmost latitude, easternmost longitude, northernmost latitude. [S, W, N, E]
4444
required: true
4545
attributes:
46-
experiment_type:
47-
title: mCDR Experiment Type
48-
description: "The type of mCDR experiment conducted. See Controlled Vocabularies section for definitions."
46+
experiment_types:
47+
title: mCDR Experiment Type(s)
48+
description: "The type(s) of mCDR experiment conducted. See Controlled Vocabularies section for definitions."
4949
range: ExperimentType
5050
multivalued: true
5151
required: true
5252
public_comments:
5353
title: Public Comments
54-
description: "If possible, please provide public comments concatenated into a single pdf"
54+
description: >-
55+
File name(s) of public comment related documents. If possible, please provide public comments concatenated
56+
into a single pdf
5557
range: string
5658
recommended: true
5759
experiment_leads:
5860
title: Experiment Lead(s)
5961
description: >-
60-
Provide details for each experiment lead / principal investigator (PI) including: Name, institutional information (name, address),
61-
phone, email, ID type (e.g., ORCID, etc), researcher ID, and role.
62+
Provide details for each experiment lead / principal investigator (PI) including: Name, institutional
63+
information (name, address), phone, email, ID type (e.g., ORCID, etc), researcher ID, and role.
6264
range: Person
6365
multivalued: true
6466
inlined_as_list: true
@@ -283,7 +285,9 @@ classes:
283285
- is_provided_as_a_file
284286
slot_usage:
285287
is_provided_as_a_file:
286-
description: "Select ‘Variable’ if the concentration varies over time, or ‘Fixed Value’ if it is constant. Note: Variable concentrations must be provided in a data file."
288+
description: >-
289+
Select ‘Variable’ if the concentration varies over time, or ‘Fixed Value’ if it is constant. Note: Variable
290+
concentrations must be provided in a data file.
287291
288292
DosingDetails:
289293
mixin: true

0 commit comments

Comments
 (0)