Skip to content

Commit

Permalink
Regenerate artifacts from information_resource_registry.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 8, 2024
1 parent 1b791fd commit ebac23d
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 58 deletions.
2 changes: 1 addition & 1 deletion project/information_resource_registry.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1
# Generation date: 2024-03-08T12:38:21
# Generation date: 2024-03-08T21:05:11
# Schema: Information-Resource-Registry-Schema
#
# id: https://w3id.org/biolink/information_resource_registry.yaml
Expand Down
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": "2024-03-08T12:38:19",
"generation_date": "2024-03-08T21:05:10",
"source": "information_resource_registry.yaml"
},
"@context": {
Expand Down
6 changes: 3 additions & 3 deletions project/jsonld/information_resource_registry.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,9 @@
],
"metamodel_version": "1.7.0",
"source_file": "information_resource_registry.yaml",
"source_file_date": "2024-03-08T12:18:13",
"source_file_size": 7890,
"generation_date": "2024-03-08T12:38:19",
"source_file_date": "2024-03-08T21:04:28",
"source_file_size": 7882,
"generation_date": "2024-03-08T21:05:10",
"@type": "SchemaDefinition",
"@context": [
"project/jsonld/information_resource_registry.context.jsonld",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
},
"$id": "https://w3id.org/biolink/information_resource_registry.yaml",
"$schema": "http://json-schema.org/draft-07/schema#",
"$schema": "https://json-schema.org/draft/2019-09/schema",
"additionalProperties": true,
"description": "A collection of information resources",
"metamodel_version": "1.7.0",
Expand Down
50 changes: 25 additions & 25 deletions project/owl/information_resource.owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -39,71 +39,71 @@ biolink:information_resource_registry.yaml.owl.ttl a owl:Ontology ;
infores:InformationResource a owl:Class ;
rdfs:label "InformationResource" ;
rdfs:subClassOf [ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:allValuesFrom infores:KnowledgeLevelEnum ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:synonym ],
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:name ],
owl:minCardinality 0 ;
owl:onProperty infores:synonym ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:knowledge_level ],
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:xref ],
owl:onProperty infores:synonym ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:xref ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:allValuesFrom infores:InformationResourceStatusEnum ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:agent_type ],
owl:minCardinality 0 ;
owl:onProperty infores:xref ],
[ a owl:Restriction ;
owl:allValuesFrom infores:AgentTypeEnum ;
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:minCardinality 1 ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:synonym ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:status ],
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:id ],
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:allValuesFrom infores:InformationResourceStatusEnum ;
owl:minCardinality 0 ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:description ],
owl:allValuesFrom xsd:string ;
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:minCardinality 1 ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:knowledge_level ],
linkml:ClassDefinition ;
skos:altLabel "knowledgebase" ;
skos:definition "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ;
Expand Down
42 changes: 21 additions & 21 deletions project/shacl/information_resource_registry.shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,21 @@ infores:InformationResource a sh:NodeShape ;
sh:closed true ;
sh:description "A database or knowledgebase and its supporting ecosystem of interfaces and services that deliver content to consumers (e.g. web portals, APIs, query endpoints, streaming services, data downloads, etc.). A single Information Resource by this definition may span many different datasets or databases, and include many access endpoints and user interfaces. Information Resources include project-specific resources such as a Translator Knowledge Provider, and community knowledgebases like ChemBL, OMIM, or DGIdb." ;
sh:ignoredProperties ( rdf:type ) ;
sh:property [ sh:description "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph." ;
sh:property [ sh:datatype xsd:string ;
sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ;
sh:order 3 ;
sh:path infores:xref ],
[ sh:description "The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph." ;
sh:in ( "curated" "predicted" "text_mined" "correlation" "observed" "other" "mixed" ) ;
sh:maxCount 1 ;
sh:order 6 ;
sh:path infores:knowledge_level ],
[ sh:description "the status of the infores identifier, the default is \"released\"" ;
sh:in ( "released" "deprecated" "draft" "modified" ) ;
sh:maxCount 1 ;
sh:order 0 ;
sh:path infores:status ],
[ sh:datatype xsd:string ;
sh:description "A free-text description of an entity or attribute." ;
sh:maxCount 1 ;
sh:order 5 ;
sh:path rdfs:comment ],
[ sh:datatype xsd:string ;
sh:description "A unique identifier for an entity. Must be either a CURIE shorthand for a URI or a complete URI" ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:order 2 ;
sh:path infores:id ],
[ sh:description "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph." ;
sh:in ( "not_provided" "computational_model" ) ;
sh:maxCount 1 ;
sh:order 7 ;
sh:path infores:agent_type ],
[ sh:datatype xsd:string ;
sh:description "A database cross reference or alternative identifier for a NamedThing or edge between two NamedThings. This property should point to a database record or webpage that supports the existence of the edge, or gives more detail about the edge. This property can be used on a node or edge to provide multiple URIs or CURIE cross references." ;
sh:order 3 ;
sh:path infores:xref ],
[ sh:datatype xsd:string ;
sh:description "A human-readable name for an attribute or entity." ;
sh:maxCount 1 ;
Expand All @@ -57,6 +42,21 @@ infores:InformationResource a sh:NodeShape ;
[ sh:datatype xsd:string ;
sh:description "Alternate human-readable names for a thing" ;
sh:order 4 ;
sh:path infores:synonym ] ;
sh:path infores:synonym ],
[ sh:description "The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph." ;
sh:in ( "not_provided" "computational_model" ) ;
sh:maxCount 1 ;
sh:order 7 ;
sh:path infores:agent_type ],
[ sh:datatype xsd:string ;
sh:description "A free-text description of an entity or attribute." ;
sh:maxCount 1 ;
sh:order 5 ;
sh:path rdfs:comment ],
[ sh:description "the status of the infores identifier, the default is \"released\"" ;
sh:in ( "released" "deprecated" "draft" "modified" ) ;
sh:maxCount 1 ;
sh:order 0 ;
sh:path infores:status ] ;
sh:targetClass infores:InformationResource .

16 changes: 13 additions & 3 deletions project/shex/information_resource_registry.shex
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,24 @@ linkml:Jsonpath xsd:string
linkml:Sparqlpath xsd:string

<InformationResource> CLOSED {
( $<InformationResource_tes> ( <status> @<InformationResourceStatusEnum> ? ;
( $<InformationResource_tes> ( <status> [ <https://w3id.org/biolink/infores/InformationResourceStatusEnum#released>
<https://w3id.org/biolink/infores/InformationResourceStatusEnum#deprecated>
<https://w3id.org/biolink/infores/InformationResourceStatusEnum#draft>
<https://w3id.org/biolink/infores/InformationResourceStatusEnum#modified> ] ? ;
rdfs:label @linkml:String ? ;
<id> @linkml:String ;
<xref> @linkml:String * ;
<synonym> @linkml:String * ;
rdfs:comment @linkml:String ? ;
<knowledge_level> @<KnowledgeLevelEnum> ? ;
<agent_type> @<AgentTypeEnum> ?
<knowledge_level> [ <https://w3id.org/biolink/infores/KnowledgeLevelEnum#curated>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#predicted>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#text_mined>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#correlation>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#observed>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#other>
<https://w3id.org/biolink/infores/KnowledgeLevelEnum#mixed> ] ? ;
<agent_type> [ <https://w3id.org/biolink/infores/AgentTypeEnum#not_provided>
<https://w3id.org/biolink/infores/AgentTypeEnum#computational_model> ] ?
) ;
rdf:type [ <InformationResource> ] ?
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto generated from information_resource_registry.yaml by pythongen.py version: 0.0.1
# Generation date: 2024-03-08T12:38:32
# Generation date: 2024-03-08T21:05:18
# Schema: Information-Resource-Registry-Schema
#
# id: https://w3id.org/biolink/information_resource_registry.yaml
Expand Down
9 changes: 8 additions & 1 deletion src/information_resource_registry/datamodel/pydanticmodel.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations
from datetime import datetime, date
from enum import Enum

from decimal import Decimal
from typing import List, Dict, Optional, Any, Union
from pydantic import BaseModel as BaseModel, ConfigDict, Field
from pydantic import BaseModel as BaseModel, Field, validator
import re
import sys
if sys.version_info >= (3, 8):
from typing import Literal
Expand All @@ -23,8 +26,10 @@ class ConfiguredBaseModel(WeakRefShimBaseModel,
extra = 'forbid',
arbitrary_types_allowed = True,
use_enum_values = True):

pass



class InformationResourceStatusEnum(str, Enum):
"""
Expand Down Expand Up @@ -79,6 +84,7 @@ class InformationResourceContainer(ConfiguredBaseModel):
"""
information_resources: Optional[List[InformationResource]] = Field(default_factory=list, description="""a collection of information resources""")



class InformationResource(ConfiguredBaseModel):
"""
Expand All @@ -93,6 +99,7 @@ class InformationResource(ConfiguredBaseModel):
knowledge_level: Optional[KnowledgeLevelEnum] = Field(None, description="""The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph.""")
agent_type: Optional[AgentTypeEnum] = Field(None, description="""The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph.""")




# Update forward refs
Expand Down
10 changes: 9 additions & 1 deletion src/information_resource_registry/datamodel/pydanticmodel_v2.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
from __future__ import annotations
from datetime import datetime, date
from enum import Enum

from decimal import Decimal
from typing import List, Dict, Optional, Any, Union
from pydantic import BaseModel as BaseModel, ConfigDict, Field
from pydantic import BaseModel as BaseModel, ConfigDict, Field, field_validator
import re
import sys
if sys.version_info >= (3, 8):
from typing import Literal
Expand All @@ -21,6 +24,9 @@ class ConfiguredBaseModel(BaseModel):
arbitrary_types_allowed=True,
use_enum_values = True)

pass



class InformationResourceStatusEnum(str, Enum):
"""
Expand Down Expand Up @@ -75,6 +81,7 @@ class InformationResourceContainer(ConfiguredBaseModel):
"""
information_resources: Optional[List[InformationResource]] = Field(default_factory=list, description="""a collection of information resources""")



class InformationResource(ConfiguredBaseModel):
"""
Expand All @@ -89,6 +96,7 @@ class InformationResource(ConfiguredBaseModel):
knowledge_level: Optional[KnowledgeLevelEnum] = Field(None, description="""The level of knowledge that supports an edge or node. This is a general categorization of the type of evidence that supports a statement, and is not intended to be a comprehensive description of the evidence. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the knowledge level would be \"curated\", and the evidence would be described in more detail in the evidence graph.""")
agent_type: Optional[AgentTypeEnum] = Field(None, description="""The type of agent that supports an edge or node. This is a general categorization of the type of agent that supports a statement, and is not intended to be a comprehensive description of the agent. For example, a statement may be supported by a single publication, but that publication may contain multiple types of evidence, such as a computational prediction and a manual curation. In this case, the agent type would be \"publication\", and the evidence would be described in more detail in the evidence graph.""")




# Model rebuild
Expand Down

0 comments on commit ebac23d

Please sign in to comment.