Skip to content

Commit 89e93ec

Browse files
committed
add funding info description
1 parent 17db90c commit 89e93ec

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

project/jsonschema/oae_data_protocol.schema.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,7 @@
11101110
]
11111111
},
11121112
"funding": {
1113+
"description": "Include the name of the funder, funder country, project title, project ID, and the project start and end dates. If there is no funding source (e.g., in the case of commercial projects), leave this field empty.",
11131114
"items": {
11141115
"$ref": "#/$defs/MonetaryGrant"
11151116
},
@@ -1559,10 +1560,6 @@
15591560
"type": "number"
15601561
}
15611562
},
1562-
"required": [
1563-
"min_depth_in_m",
1564-
"max_depth_in_m"
1565-
],
15661563
"title": "VerticalExtent",
15671564
"type": "object"
15681565
}

src/oae_data_protocol/datamodel/oae_data_protocol.py

Lines changed: 7 additions & 11 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: 2025-11-08T07:32:40
2+
# Generation date: 2025-11-13T17:40:14
33
# Schema: OAEDataManagementProtocol
44
#
55
# id: OAEDataManagementProtocol
@@ -258,18 +258,14 @@ class VerticalExtent(YAMLRoot):
258258
class_name: ClassVar[str] = "VerticalExtent"
259259
class_model_uri: ClassVar[URIRef] = OAE.VerticalExtent
260260

261-
min_depth_in_m: float = None
262-
max_depth_in_m: float = None
261+
min_depth_in_m: Optional[float] = None
262+
max_depth_in_m: Optional[float] = None
263263

264264
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
265-
if self._is_empty(self.min_depth_in_m):
266-
self.MissingRequiredField("min_depth_in_m")
267-
if not isinstance(self.min_depth_in_m, float):
265+
if self.min_depth_in_m is not None and not isinstance(self.min_depth_in_m, float):
268266
self.min_depth_in_m = float(self.min_depth_in_m)
269267

270-
if self._is_empty(self.max_depth_in_m):
271-
self.MissingRequiredField("max_depth_in_m")
272-
if not isinstance(self.max_depth_in_m, float):
268+
if self.max_depth_in_m is not None and not isinstance(self.max_depth_in_m, float):
273269
self.max_depth_in_m = float(self.max_depth_in_m)
274270

275271
super().__post_init__(**kwargs)
@@ -2055,10 +2051,10 @@ class slots:
20552051
model_uri=OAE.geoCoordinates__longitude, domain=None, range=float)
20562052

20572053
slots.verticalExtent__min_depth_in_m = Slot(uri=OAE.min_depth_in_m, name="verticalExtent__min_depth_in_m", curie=OAE.curie('min_depth_in_m'),
2058-
model_uri=OAE.verticalExtent__min_depth_in_m, domain=None, range=float)
2054+
model_uri=OAE.verticalExtent__min_depth_in_m, domain=None, range=Optional[float])
20592055

20602056
slots.verticalExtent__max_depth_in_m = Slot(uri=OAE.max_depth_in_m, name="verticalExtent__max_depth_in_m", curie=OAE.curie('max_depth_in_m'),
2061-
model_uri=OAE.verticalExtent__max_depth_in_m, domain=None, range=float)
2057+
model_uri=OAE.verticalExtent__max_depth_in_m, domain=None, range=Optional[float])
20622058

20632059
slots.organization__country = Slot(uri=OAE.country, name="organization__country", curie=OAE.curie('country'),
20642060
model_uri=OAE.organization__country, domain=None, range=Optional[str])

src/oae_data_protocol/schema/oae_project.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ classes:
101101
range: string
102102
funding:
103103
title: Funding Info
104+
description: >-
105+
Include the name of the funder, funder country, project title, project ID, and the project start and end
106+
dates. If there is no funding source (e.g., in the case of commercial projects), leave this field empty.
104107
slot_uri: schema:funding
105108
range: MonetaryGrant
106109
multivalued: true

0 commit comments

Comments
 (0)