Skip to content

Commit

Permalink
Merge pull request #42 from biolink/add_resources_to_automation
Browse files Browse the repository at this point in the history
add unsecret to the automated run, move weekly URL check that inevita…
  • Loading branch information
sierra-moxon authored Oct 28, 2024
2 parents d1c8f4f + 4a7a64e commit 6883cc9
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 65 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/weekly-generate-sankey.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Check Infores Catalog Links and Regenerate Artifacts
on:
schedule:
- cron: '0 8 * * 1' # at 08:00 UTC every Monday
workflow_dispatch:
types: trigger-url-check


jobs:
check-external-links:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install dependencies
run: |
pip install --upgrade pip
pip install poetry
poetry install
- name: Run URL validation and regenerate sankey diagram
run: |
make sankey
if [ $? -eq 0 ]; then
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add project/*
git add src/*
git add infores_catalog.yaml
git commit -m "Regenerate data_flow diagram and validate URLs in infores_catalog.yaml"
git push
else
echo "'make' validation and sankey generation failed to finish successfully"
fi
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-10-28T22:09:38
# Generation date: 2024-10-28T15:22:54
# 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-10-28T22:09:38",
"generation_date": "2024-10-28T15:22:54",
"source": "information_resource_registry.yaml"
},
"@context": {
Expand Down
4 changes: 2 additions & 2 deletions project/jsonld/information_resource_registry.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -647,9 +647,9 @@
],
"metamodel_version": "1.7.0",
"source_file": "information_resource_registry.yaml",
"source_file_date": "2024-10-28T22:08:39",
"source_file_date": "2024-09-18T16:41:40",
"source_file_size": 11239,
"generation_date": "2024-10-28T22:09:38",
"generation_date": "2024-10-28T15:22:54",
"@type": "SchemaDefinition",
"@context": [
"project/jsonld/information_resource_registry.context.jsonld",
Expand Down
62 changes: 31 additions & 31 deletions project/owl/information_resource.owl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -64,71 +64,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:allValuesFrom infores:InformationResourceStatusEnum ;
owl:onProperty infores:status ],
owl:allValuesFrom infores:AgentTypeEnum ;
owl:onProperty infores:agent_type ],
[ 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 ],
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:name ],
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:description ],
owl:minCardinality 1 ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:knowledge_level ],
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:allValuesFrom infores:KnowledgeLevelEnum ;
owl:maxCardinality 1 ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:allValuesFrom infores:AgentTypeEnum ;
owl:onProperty infores:agent_type ],
owl:allValuesFrom infores:InformationResourceStatusEnum ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:minCardinality 1 ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:xref ],
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:synonym ],
owl:allValuesFrom xsd:string ;
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:id ],
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:synonym ],
owl:maxCardinality 1 ;
owl:onProperty infores:id ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:agent_type ],
owl:allValuesFrom infores:KnowledgeLevelEnum ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:xref ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:name ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:onProperty infores:status ],
[ a owl:Restriction ;
owl:maxCardinality 1 ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:description ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:knowledge_level ],
[ a owl:Restriction ;
owl:allValuesFrom xsd:string ;
owl:onProperty infores:description ],
owl:onProperty infores:synonym ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:agent_type ],
[ a owl:Restriction ;
owl:minCardinality 0 ;
owl:onProperty infores:xref ],
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
52 changes: 26 additions & 26 deletions project/shacl/information_resource_registry.shacl.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -19,49 +19,49 @@ 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 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 ( "manual_agent" "not_provided" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" ) ;
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:in ( "knowledge_assertion" "statistical_association" "prediction" "observation" "not_provided" "logical_entailment" "mixed" "other" ) ;
sh:maxCount 1 ;
sh:order 7 ;
sh:path infores:agent_type ],
sh:order 6 ;
sh:path infores:knowledge_level ],
[ sh:datatype xsd:string ;
sh:description "A free-text description of an entity or attribute." ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
sh:order 5 ;
sh:path rdfs:comment ],
[ 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:nodeKind sh:Literal ;
sh:order 3 ;
sh:path infores:xref ],
[ 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 ( "manual_agent" "not_provided" "automated_agent" "data_analysis_pipeline" "computational_model" "text_mining_agent" "image_processing_agent" "manual_validation_of_automated_agent" ) ;
sh:maxCount 1 ;
sh:order 7 ;
sh:path infores:agent_type ],
[ 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:description "A human-readable name for an attribute or entity." ;
sh:maxCount 1 ;
sh:minCount 1 ;
sh:nodeKind sh:Literal ;
sh:order 2 ;
sh:path infores:id ],
sh:order 1 ;
sh:path rdfs:label ],
[ sh:datatype xsd:string ;
sh:description "Alternate human-readable names for a thing" ;
sh:nodeKind sh:Literal ;
sh:order 4 ;
sh:path infores:synonym ],
[ 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: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 ( "knowledge_assertion" "statistical_association" "prediction" "observation" "not_provided" "logical_entailment" "mixed" "other" ) ;
sh:maxCount 1 ;
sh:order 6 ;
sh:path infores:knowledge_level ],
[ sh:datatype xsd:string ;
sh:description "A free-text description of an entity or attribute." ;
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:nodeKind sh:Literal ;
sh:order 5 ;
sh:path rdfs:comment ],
[ sh:datatype xsd:string ;
sh:description "A human-readable name for an attribute or entity." ;
sh:order 2 ;
sh:path infores:id ],
[ sh:description "the status of the infores identifier, the default is \"released\"" ;
sh:in ( "released" "deprecated" "draft" "modified" ) ;
sh:maxCount 1 ;
sh:nodeKind sh:Literal ;
sh:order 1 ;
sh:path rdfs:label ] ;
sh:order 0 ;
sh:path infores:status ] ;
sh:targetClass infores:InformationResource .

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extract_consume_info = "information_resource_registry.translator_dataflow.extrac
generate_sankey = "information_resource_registry.translator_dataflow.generate_sankey:main"
molepro_consume = "information_resource_registry.translator_dataflow.molepro_consume:main"
rtx_kg2 = "information_resource_registry.translator_dataflow.rtx_kg2:main"

unsecret = "information_resource_registry.translator_dataflow.unsecret:main"

[tool.poetry-dynamic-versioning]
enable = true
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-10-28T22:09:42
# Generation date: 2024-10-28T15:23:02
# Schema: Information-Resource-Registry-Schema
#
# id: https://w3id.org/biolink/information_resource_registry.yaml
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def main():
print(f"Error downloading file: {response.status_code}")
exit()

json.dump(infores_dict, open('data/unsecret.json', 'w'), indent=2, sort_keys=True)
json.dump(infores_dict, open('src/information_resource_registry/translator_dataflow/data/unsecret.json', 'w'), indent=2, sort_keys=True)

# Call main() if this script is executed directly
if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion translator_dataflow.Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ generate_consumes_annotations:
$(RUN) rtx_kg2
$(RUN) bte_sp
$(RUN) arax_kps
$(RUN) aragorn_kps # currently does not run b/c of pydantic v1 requirement
$(RUN) aragorn_kps
$(RUN) unsecret
$(RUN) molepro_consume

merge_into_infores_catalog:
Expand Down

0 comments on commit 6883cc9

Please sign in to comment.