Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove if absent annotations causing downstream issues in python dataclasses #1528

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
CHANGES
=======
4.2.5
-----
* remove if_absent annotations on KL/AT that result in downstream enumeration errors in python dataclasses
representation of the model, see: https://github.com/linkml/linkml/pull/2329 and associated ticket for more details

4.2.4
-----
* regenerating artifacts
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ gen-project: $(PYMODEL)
-d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL)
mv $(DEST)/prefixmap/biolink_model.yaml $(DEST)/prefixmap/biolink-model-prefix-map.json
mv $(PYMODEL)/biolink*.py $(PYMODEL)/model.py
$(RUN) gen-pydantic src/biolink_model/schema/biolink_model.yaml > $(PYMODEL)/pydanticmodel_v2.py
$(RUN) gen-pydantic --meta None src/biolink_model/schema/biolink_model.yaml > $(PYMODEL)/pydanticmodel_v2.py
$(RUN) gen-owl --mergeimports --no-metaclasses --no-type-objects --add-root-classes --mixins-as-expressions src/biolink_model/schema/biolink_model.yaml > $(DEST)/owl/biolink_model.owl.ttl
cp biolink-model.yaml src/biolink_model/schema/biolink_model.yaml
$(MAKE) id-prefixes
Expand Down
2 changes: 0 additions & 2 deletions biolink-model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6138,7 +6138,6 @@ slots:
range: KnowledgeLevelEnum
multivalued: false
required: true
ifabsent: string(not_provided)
examples:
- value: knowledge_assertion
- value: prediction
Expand Down Expand Up @@ -6166,7 +6165,6 @@ slots:
range: AgentTypeEnum
multivalued: false
required: true
ifabsent: string(not_provided)
examples:
- value: manual_agent
- value: automated_agent
Expand Down
17 changes: 9 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions project/graphql/biolink_model.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# metamodel_version: 1.7.0
# version: 4.2.4
type AccessibleDnaRegion implements GenomicEntity, ChemicalEntityOrGeneOrGeneProduct, PhysicalEssence, OntologyClass
{
id: String!
Expand Down
45 changes: 13 additions & 32 deletions project/jsonld/biolink_model.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2024-10-10T17:38:44",
"generation_date": "2024-10-10T16:37:53",
"source": "biolink_model.yaml"
},
"@context": {
"xsd": "http://www.w3.org/2001/XMLSchema#",
"AGRKB": "https://www.alliancegenome.org/",
"APO": {
"@id": "http://purl.obolibrary.org/obo/APO_",
Expand Down Expand Up @@ -578,7 +579,6 @@
"@id": "http://www.w3.org/2003/01/geo/wgs84_pos",
"@prefix": true
},
"xsd": "http://www.w3.org/2001/XMLSchema#",
"@vocab": "https://w3id.org/biolink/vocab/",
"active_in": {
"@type": "@id",
Expand Down Expand Up @@ -644,12 +644,11 @@
"@id": "affects_response_to"
},
"affiliation": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "affiliation"
},
"agent_type": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -733,7 +732,6 @@
},
"available_from": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -790,12 +788,11 @@
"@id": "catalyzes"
},
"category": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "category"
},
"causal_mechanism_qualifier": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -829,7 +826,6 @@
},
"clinical_approval_status": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1026,7 +1022,6 @@
},
"drug_regulatory_status_world_wide": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1092,7 +1087,6 @@
},
"FDA_adverse_event_level": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1146,7 +1140,6 @@
},
"genome_build": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1469,7 +1462,6 @@
},
"highest_FDA_approval_status": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1643,7 +1635,6 @@
},
"knowledge_level": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1702,7 +1693,6 @@
},
"logical_interpretation": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand All @@ -1722,7 +1712,6 @@
},
"max_research_phase": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand All @@ -1749,7 +1738,7 @@
"@id": "mentions"
},
"mesh_terms": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "mesh_terms"
},
"missing_from": {
Expand Down Expand Up @@ -1830,7 +1819,6 @@
},
"object_direction_qualifier": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -1877,7 +1865,7 @@
"@id": "original_object"
},
"original_predicate": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "original_predicate"
},
"original_subject": {
Expand Down Expand Up @@ -1915,7 +1903,6 @@
},
"phase": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2003,7 +1990,7 @@
"@id": "publications"
},
"published_in": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "published_in"
},
"publisher": {
Expand All @@ -2030,7 +2017,6 @@
},
"reaction_direction": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand All @@ -2039,7 +2025,6 @@
},
"reaction_side": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2094,12 +2079,11 @@
"@id": "resistance_associated_with"
},
"resource_id": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "resource_id"
},
"resource_role": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2131,7 +2115,6 @@
},
"routes_of_delivery": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2204,7 +2187,6 @@
},
"strand": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2245,7 +2227,6 @@
},
"subject_direction_qualifier": {
"@context": {
"@vocab": "@null",
"text": "skos:notation",
"description": "skos:prefLabel",
"meaning": "@id"
Expand Down Expand Up @@ -2296,7 +2277,7 @@
"@id": "supporting_document_year"
},
"supporting_documents": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "supporting_documents"
},
"supporting_study_cohort": {
Expand All @@ -2312,11 +2293,11 @@
"@id": "supporting_study_metadata"
},
"supporting_study_method_description": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "supporting_study_method_description"
},
"supporting_study_method_type": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "supporting_study_method_type"
},
"supporting_study_size": {
Expand Down Expand Up @@ -2421,7 +2402,7 @@
"@id": "update_date"
},
"upstream_resource_ids": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "upstream_resource_ids"
},
"url": {
Expand All @@ -2446,7 +2427,7 @@
"@id": "xenologous_to"
},
"xref": {
"@type": "@id",
"@type": "xsd:anyURI",
"@id": "xref"
},
"AccessibleDnaRegion": {
Expand Down
Loading
Loading