Skip to content

Commit

Permalink
add id_prefixes and infores updates to gen-project
Browse files Browse the repository at this point in the history
  • Loading branch information
sierra-moxon committed Nov 29, 2023
1 parent a9d34e2 commit 0ddde72
Show file tree
Hide file tree
Showing 11 changed files with 19,388 additions and 18,896 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ infores:

id-prefixes:
poetry run gen-python class_prefixes.yaml > src/biolink_model/scripts/classprefixes.py
cd scripts && poetry run python id_prefixes.py
cd src/biolink_model/scripts/ && poetry run python id_prefixes.py

spell:
poetry run codespell
Expand All @@ -125,12 +125,12 @@ gen-project: $(PYMODEL)
--include python \
--include rdf \
-d $(DEST) $(SOURCE_SCHEMA_PATH) && mv $(DEST)/*.py $(PYMODEL)
mv $(DEST)/prefixmap/biolink_model.yaml $(DEST)/prefixmap/biolink-model-prefix-map.json
mv $(DEST)/prefixmap/biolink_model.yaml $(DEST)/prefixmap/biolink_model_prefix_map.json
mv $(PYMODEL)/biolink*.py $(PYMODEL)/model.py
mv $(DEST)/graphql/biolink_model.yaml $(DEST)/graphql/biolink-model.graphql
$(RUN) gen-pydantic --pydantic_version 1 src/biolink_model/schema/biolink_model.yaml > $(PYMODEL)/pydanticmodel.py
$(RUN) gen-pydantic --pydantic_version 2 src/biolink_model/schema/biolink_model.yaml > $(PYMODEL)/pydanticmodel_v2.py
cp biolink-model.yaml src/biolink_model/schema/biolink_model.yaml
$(MAKE) id-prefixes infores

tests:
cp biolink-model.yaml src/biolink_model/schema/biolink_model.yaml
Expand Down
83 changes: 83 additions & 0 deletions class_prefixes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
id: biolink-model-class-prefixes
name: BiolinkClassPrefixes
description: preferred order identifier prefixes per class in Biolink Model
license: https://creativecommons.org/publicdomain/zero/1.0/

# Version should be kept in sync with primary Git repository release tag

version: 4.0.0

default_prefix: biolink
default_range: string

imports:
- linkml:types

# 2. The following prefix maps are retrieved from the
# specified contexts defined at https://prefixcommons.org/
default_curi_maps:
- obo_context
- idot_context
- monarch_context
- semweb_context

# The following 'standard' prefixes are also used.
emit_prefixes:
- rdf
- rdfs
- xsd
- skos
- OIO
- BIOGRID
- SO

prefixes:
linkml: 'https://w3id.org/linkml/'

classes:
BiolinkClassPrefixMap:
description: preferred order identifier prefixes per class in Biolink Model
slots:
- prefix_map
- class_name

BiolinkClassPrefixesCollection:
description: collection of BiolinkClassPrefixes objects
tree_root: true
slots:
- biolink_class_prefixes

Prefix:
slots:
- prefix
- base_uri
- order

slots:
biolink_class_prefixes:
multivalued: true
range: BiolinkClassPrefixMap
inlined: true
inlined_as_list: true
description: >-
A collectionm of GO domain/range constraint shapes where a GO domain/range constraint shape
is defined as the domain, relationship, and range of a GO shape expression rule.
prefix_map:
description: a collection of Prefixes per class
range: Prefix
multivalued: true

class_name:
description: the name of a class in Biolink Model
range: uriorcurie

base_uri:
description: the URI of a prefix
range: uri

prefix:
range: string

order:
range: integer
2 changes: 1 addition & 1 deletion project/jsonld/biolink_model.context.jsonld
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"comments": {
"description": "Auto generated by LinkML jsonld context generator",
"generation_date": "2023-11-29T11:32:20",
"generation_date": "2023-11-29T11:58:17",
"source": "biolink_model.yaml"
},
"@context": {
Expand Down
4 changes: 2 additions & 2 deletions project/jsonld/biolink_model.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -33272,9 +33272,9 @@
],
"metamodel_version": "1.7.0",
"source_file": "biolink_model.yaml",
"source_file_date": "2023-11-29T11:32:09",
"source_file_date": "2023-11-29T11:58:11",
"source_file_size": 362250,
"generation_date": "2023-11-29T11:32:23",
"generation_date": "2023-11-29T11:58:19",
"@type": "SchemaDefinition",
"@context": [
"project/jsonld/biolink_model.context.jsonld",
Expand Down
Loading

0 comments on commit 0ddde72

Please sign in to comment.