Skip to content

Commit b1329f5

Browse files
committed
lock in version 4.0.0
and don't generate python for mixs legacy or new
1 parent 97adfe0 commit b1329f5

File tree

9 files changed

+281
-122
lines changed

9 files changed

+281
-122
lines changed

json/nmdc.linkml.json

Lines changed: 209 additions & 104 deletions
Large diffs are not rendered by default.

jsonld-context/nmdc.context.jsonld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"_comments": "Auto generated from nmdc.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-05-06T11:21:32\n Schema: NMDC\n metamodel version: 1.7.0\n model version: 2.1.0\n \n id: https://microbiomedata/schema\n description: Schema for National Microbiome Data Collaborative (NMDC).\n \nThis schema is organized into distinct modules:\n \n * a set of core types for representing data values\n * the mixs schema (auto-translated from mixs excel)\n * annotation schema\n * the NMDC schema itself\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
2+
"_comments": "Auto generated from nmdc.yaml by jsonldcontextgen.py version: 0.1.1\n Generation date: 2022-05-13T08:53:07\n Schema: NMDC\n metamodel version: 1.7.0\n model version: 4.0.0\n \n id: https://microbiomedata/schema\n description: Schema for National Microbiome Data Collaborative (NMDC).\nThis schema is organized into distinct modules:\n\n * a set of core types for representing data values\n * the mixs schema (auto-translated from mixs excel)\n * annotation schema\n * the NMDC schema itself\n license: https://creativecommons.org/publicdomain/zero/1.0/\n ",
33
"@context": {
44
"CAS": "http://identifiers.org/cas/",
55
"CATH": "http://identifiers.org/cath/",

jsonschema/nmdc.schema.json

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@
12301230
"type": "array"
12311231
},
12321232
"read_based_analysis_activity_set": {
1233-
"description": "This property links a database object to the set of read based analysis activities.\n ",
1233+
"description": "This property links a database object to the set of read based analysis activities.",
12341234
"items": {
12351235
"$ref": "#/$defs/ReadBasedAnalysisActivity"
12361236
},
@@ -3238,7 +3238,7 @@
32383238
"type": "string"
32393239
},
32403240
"instrument_name": {
3241-
"description": "The name of the instrument that was used for processing the sample.\n ",
3241+
"description": "The name of the instrument that was used for processing the sample.",
32423242
"type": "string"
32433243
},
32443244
"mod_date": {
@@ -4298,6 +4298,14 @@
42984298
"additionalProperties": false,
42994299
"description": "A study summarizes the overall goal of a research initiative and outlines the key objective of its underlying projects.",
43004300
"properties": {
4301+
"GOLD_sample_identifiers": {
4302+
"description": "identifiers for corresponding sample in GOLD",
4303+
"items": {
4304+
"type": "string"
4305+
},
4306+
"pattern": "^GOLD:Gb[0-9]+$",
4307+
"type": "array"
4308+
},
43014309
"GOLD_study_identifiers": {
43024310
"description": "identifiers for corresponding project in GOLD",
43034311
"items": {
@@ -4414,6 +4422,9 @@
44144422
"description": "A human readable label for an entity",
44154423
"type": "string"
44164424
},
4425+
"notes": {
4426+
"type": "string"
4427+
},
44174428
"objective": {
44184429
"description": "The scientific objectives associated with the entity. It SHOULD correspond to scientific norms for objectives field in a structured abstract.",
44194430
"type": "string"
@@ -5028,7 +5039,7 @@
50285039
"type": "array"
50295040
},
50305041
"read_based_analysis_activity_set": {
5031-
"description": "This property links a database object to the set of read based analysis activities.\n ",
5042+
"description": "This property links a database object to the set of read based analysis activities.",
50325043
"items": {
50335044
"$ref": "#/$defs/ReadBasedAnalysisActivity"
50345045
},
@@ -5045,6 +5056,6 @@
50455056
"required": [],
50465057
"title": "NMDC",
50475058
"type": "object",
5048-
"version": "2.1.0"
5059+
"version": "4.0.0"
50495060
}
50505061

python/basic_slots.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from basic_slots.yaml by pythongen.py version: 0.9.0
2-
# Generation date: 2022-05-06T11:21:38
2+
# Generation date: 2022-05-13T08:53:13
33
# Schema: NMDC-Basic-Slots
44
#
55
# id: https://microbiomedata/schema/basic_slots

python/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from core.yaml by pythongen.py version: 0.9.0
2-
# Generation date: 2022-05-06T11:22:17
2+
# Generation date: 2022-05-13T08:53:26
33
# Schema: NMDC-Core
44
#
55
# id: https://microbiomedata/schema/core

python/nmdc.py

Lines changed: 53 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from nmdc.yaml by pythongen.py version: 0.9.0
2-
# Generation date: 2022-05-06T11:22:11
2+
# Generation date: 2022-05-13T08:53:19
33
# Schema: NMDC
44
#
55
# id: https://microbiomedata/schema
@@ -28,7 +28,7 @@
2828
from linkml_runtime.utils.metamodelcore import Bool, URIorCURIE, XSDDateTime
2929

3030
metamodel_version = "1.7.0"
31-
version = "2.1.0"
31+
version = "4.0.0"
3232

3333
# Overwrite dataclasses _init_fn to add **kwargs in __init__
3434
dataclasses._init_fn = dataclasses_init_fn_with_kwargs
@@ -603,8 +603,10 @@ class Biosample(NamedThing):
603603
tot_org_carb: Optional[Union[dict, "QuantityValue"]] = None
604604
tot_org_c_meth: Optional[Union[dict, "TextValue"]] = None
605605
tot_nitro_content: Optional[Union[dict, "QuantityValue"]] = None
606+
tot_nitro_cont_meth: Optional[str] = None
606607
tot_phosp: Optional[Union[dict, "QuantityValue"]] = None
607608
water_content: Optional[Union[dict, "QuantityValue"]] = None
609+
water_cont_soil_meth: Optional[str] = None
608610
ecosystem: Optional[str] = None
609611
ecosystem_category: Optional[str] = None
610612
ecosystem_type: Optional[str] = None
@@ -628,8 +630,6 @@ class Biosample(NamedThing):
628630
GOLD_sample_identifiers: Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]] = empty_list()
629631
INSDC_biosample_identifiers: Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]] = empty_list()
630632
INSDC_secondary_sample_identifiers: Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]] = empty_list()
631-
tot_nitro_cont_meth: Optional[str] = None
632-
water_cont_soil_meth: Optional[str] = None
633633

634634
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
635635
if self._is_empty(self.id):
@@ -998,12 +998,18 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
998998
if self.tot_nitro_content is not None and not isinstance(self.tot_nitro_content, QuantityValue):
999999
self.tot_nitro_content = QuantityValue(**as_dict(self.tot_nitro_content))
10001000

1001+
if self.tot_nitro_cont_meth is not None and not isinstance(self.tot_nitro_cont_meth, str):
1002+
self.tot_nitro_cont_meth = str(self.tot_nitro_cont_meth)
1003+
10011004
if self.tot_phosp is not None and not isinstance(self.tot_phosp, QuantityValue):
10021005
self.tot_phosp = QuantityValue(**as_dict(self.tot_phosp))
10031006

10041007
if self.water_content is not None and not isinstance(self.water_content, QuantityValue):
10051008
self.water_content = QuantityValue(**as_dict(self.water_content))
10061009

1010+
if self.water_cont_soil_meth is not None and not isinstance(self.water_cont_soil_meth, str):
1011+
self.water_cont_soil_meth = str(self.water_cont_soil_meth)
1012+
10071013
if self.ecosystem is not None and not isinstance(self.ecosystem, str):
10081014
self.ecosystem = str(self.ecosystem)
10091015

@@ -1076,12 +1082,6 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
10761082
self.INSDC_secondary_sample_identifiers = [self.INSDC_secondary_sample_identifiers] if self.INSDC_secondary_sample_identifiers is not None else []
10771083
self.INSDC_secondary_sample_identifiers = [v if isinstance(v, ExternalIdentifier) else ExternalIdentifier(v) for v in self.INSDC_secondary_sample_identifiers]
10781084

1079-
if self.tot_nitro_cont_meth is not None and not isinstance(self.tot_nitro_cont_meth, str):
1080-
self.tot_nitro_cont_meth = str(self.tot_nitro_cont_meth)
1081-
1082-
if self.water_cont_soil_meth is not None and not isinstance(self.water_cont_soil_meth, str):
1083-
self.water_cont_soil_meth = str(self.water_cont_soil_meth)
1084-
10851085
super().__post_init__(**kwargs)
10861086

10871087

@@ -1124,6 +1124,10 @@ class Study(NamedThing):
11241124
MGnify_project_identifiers: Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]] = empty_list()
11251125
has_credit_associations: Optional[Union[Union[dict, "CreditAssociation"], List[Union[dict, "CreditAssociation"]]]] = empty_list()
11261126
study_image: Optional[Union[Union[dict, "ImageValue"], List[Union[dict, "ImageValue"]]]] = empty_list()
1127+
name: Optional[str] = None
1128+
description: Optional[str] = None
1129+
notes: Optional[str] = None
1130+
GOLD_sample_identifiers: Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]] = empty_list()
11271131

11281132
def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
11291133
if self._is_empty(self.id):
@@ -1218,6 +1222,19 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
12181222
self.study_image = [self.study_image] if self.study_image is not None else []
12191223
self.study_image = [v if isinstance(v, ImageValue) else ImageValue(**as_dict(v)) for v in self.study_image]
12201224

1225+
if self.name is not None and not isinstance(self.name, str):
1226+
self.name = str(self.name)
1227+
1228+
if self.description is not None and not isinstance(self.description, str):
1229+
self.description = str(self.description)
1230+
1231+
if self.notes is not None and not isinstance(self.notes, str):
1232+
self.notes = str(self.notes)
1233+
1234+
if not isinstance(self.GOLD_sample_identifiers, list):
1235+
self.GOLD_sample_identifiers = [self.GOLD_sample_identifiers] if self.GOLD_sample_identifiers is not None else []
1236+
self.GOLD_sample_identifiers = [v if isinstance(v, ExternalIdentifier) else ExternalIdentifier(v) for v in self.GOLD_sample_identifiers]
1237+
12211238
super().__post_init__(**kwargs)
12221239

12231240

@@ -7275,6 +7292,9 @@ class slots:
72757292
slots.etl_software_version = Slot(uri=NMDC.etl_software_version, name="etl software version", curie=NMDC.curie('etl_software_version'),
72767293
model_uri=NMDC.etl_software_version, domain=None, range=Optional[str])
72777294

7295+
slots.notes = Slot(uri=NMDC.notes, name="notes", curie=NMDC.curie('notes'),
7296+
model_uri=NMDC.notes, domain=None, range=Optional[str])
7297+
72787298
slots.metabolite_quantified = Slot(uri=NMDC.metabolite_quantified, name="metabolite quantified", curie=NMDC.curie('metabolite_quantified'),
72797299
model_uri=NMDC.metabolite_quantified, domain=None, range=Optional[Union[str, ChemicalEntityId]])
72807300

@@ -7425,6 +7445,29 @@ class slots:
74257445
slots.study_doi = Slot(uri=NMDC.doi, name="study_doi", curie=NMDC.curie('doi'),
74267446
model_uri=NMDC.study_doi, domain=Study, range=Optional[Union[dict, "AttributeValue"]])
74277447

7448+
slots.study_name = Slot(uri=NMDC.name, name="study_name", curie=NMDC.curie('name'),
7449+
model_uri=NMDC.study_name, domain=Study, range=Optional[str])
7450+
7451+
slots.study_websites = Slot(uri=NMDC.websites, name="study_websites", curie=NMDC.curie('websites'),
7452+
model_uri=NMDC.study_websites, domain=Study, range=Optional[Union[str, List[str]]])
7453+
7454+
slots.study_description = Slot(uri=DCTERMS.description, name="study_description", curie=DCTERMS.curie('description'),
7455+
model_uri=NMDC.study_description, domain=Study, range=Optional[str])
7456+
7457+
slots.study_notes = Slot(uri=NMDC.notes, name="study_notes", curie=NMDC.curie('notes'),
7458+
model_uri=NMDC.study_notes, domain=Study, range=Optional[str])
7459+
7460+
slots.study_alternative_names = Slot(uri=NMDC.alternative_names, name="study_alternative names", curie=NMDC.curie('alternative_names'),
7461+
model_uri=NMDC.study_alternative_names, domain=Study, range=Optional[Union[str, List[str]]])
7462+
7463+
slots.study_GOLD_sample_identifiers = Slot(uri=NMDC.GOLD_sample_identifiers, name="study_GOLD sample identifiers", curie=NMDC.curie('GOLD_sample_identifiers'),
7464+
model_uri=NMDC.study_GOLD_sample_identifiers, domain=Study, range=Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]],
7465+
pattern=re.compile(r'^GOLD:Gb[0-9]+$'))
7466+
7467+
slots.study_INSDC_bioproject_identifiers = Slot(uri=NMDC.INSDC_bioproject_identifiers, name="study_INSDC bioproject identifiers", curie=NMDC.curie('INSDC_bioproject_identifiers'),
7468+
model_uri=NMDC.study_INSDC_bioproject_identifiers, domain=Study, range=Optional[Union[Union[str, ExternalIdentifier], List[Union[str, ExternalIdentifier]]]],
7469+
pattern=re.compile(r'^bioproject:PRJ[DEN][A-Z][0-9]+$'))
7470+
74287471
slots.biosample_processing_has_input = Slot(uri=NMDC.has_input, name="biosample processing_has input", curie=NMDC.curie('has_input'),
74297472
model_uri=NMDC.biosample_processing_has_input, domain=BiosampleProcessing, range=Optional[Union[Union[str, BiosampleId], List[Union[str, BiosampleId]]]])
74307473

python/workflow_execution_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Auto generated from workflow_execution_activity.yaml by pythongen.py version: 0.9.0
2-
# Generation date: 2022-05-06T11:22:05
2+
# Generation date: 2022-05-13T08:53:16
33
# Schema: NMDC-Workflow-Exectution
44
#
55
# id: https://microbiomedata/schema/workflow_execution_activity
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)