Skip to content

Commit

Permalink
edit descriptions/labels, new icons
Browse files Browse the repository at this point in the history
  • Loading branch information
muddymudskipper committed Jul 4, 2024
1 parent 9832942 commit 49009a4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

- complete validation for IRI parameters
- remove "Annnotate inferred subclass axioms" parameter in Reason plugin
- new icons

## [1.0.0alpha3] 2024-06-28

Expand Down
Binary file removed cmem_plugin_reason/obofoundry.png
Binary file not shown.
11 changes: 5 additions & 6 deletions cmem_plugin_reason/plugin_reason.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@

@Plugin(
label="Reason",
icon=Icon(file_name="obofoundry.png", package=__package__),
description="Given a data and an ontology graph, this task performs reasoning using ROBOT.",
documentation="""A task performing reasoning using ROBOT (ROBOT is an OBO Tool).
It takes an OWL ontology and a data graph as inputs and writes the reasoning result
to a specified graph. The following reasoner options are supported: ELK, Expression
Materializing Reasoner, HermiT, JFact, Structural Reasoner and Whelk.""",
icon=Icon(file_name="reason.png", package=__package__),
description="Performs OWL reasoning.",
documentation="""A task performing OWL reasoning. With an OWL ontology and a data graph as input
the reasoning result is written to a specified graph. The following reasoners are supported:
ELK, Expression Materializing Reasoner, HermiT, JFact, Structural Reasoner and Whelk.""",
parameters=[
REASONER_PARAMETER,
ONTOLOGY_GRAPH_IRI_PARAMETER,
Expand Down
10 changes: 7 additions & 3 deletions cmem_plugin_reason/plugin_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,13 @@

@Plugin(
label="Validate",
description="",
documentation="""""",
icon=Icon(package=__package__, file_name="obofoundry.png"),
description="Validates the consistency of an OWL ontology.",
documentation="""A task validating the consistency of an OWL ontology and generating an
explanation if inconsistencies are found. The explanation can be written to the project as a
Markdown file and/or to a specified graph. The Markdown string is also provided as an output
entity using the path "text". The following reasoners are supported: ELK, Expression
Materializing Reasoner, HermiT, JFact, Structural Reasoner and Whelk.""",
icon=Icon(package=__package__, file_name="validate.png"),
parameters=[
REASONER_PARAMETER,
ONTOLOGY_GRAPH_IRI_PARAMETER,
Expand Down
Binary file added cmem_plugin_reason/reason.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions cmem_plugin_reason/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,14 @@ def post_provenance(plugin: WorkflowPlugin, context: ExecutionContext) -> None:
project_graph = f"http://di.eccenca.com/project/{context.task.project_id()}"

type_query = f"""
SELECT ?type ?label {{
GRAPH <{project_graph}> {{
<{plugin_iri}> a ?type .
<{plugin_iri}> <http://www.w3.org/2000/01/rdf-schema#label> ?label .
FILTER(STRSTARTS(STR(?type), "https://vocab.eccenca.com/di/functions/"))
SELECT ?type ?label {{
GRAPH <{project_graph}> {{
<{plugin_iri}> a ?type .
<{plugin_iri}> <http://www.w3.org/2000/01/rdf-schema#label> ?label .
FILTER(STRSTARTS(STR(?type), "https://vocab.eccenca.com/di/functions/"))
}}
}}
}}"""
"""

result = json.loads(post_select(query=type_query))

Expand All @@ -160,7 +161,8 @@ def post_provenance(plugin: WorkflowPlugin, context: ExecutionContext) -> None:
<{plugin_iri}> ?parameter ?o .
FILTER(STRSTARTS(STR(?parameter), "https://vocab.eccenca.com/di/functions/param_"))
}}
}}"""
}}
"""

new_plugin_iri = f'{"_".join(plugin_iri.split("_")[:-1])}_{token_hex(8)}'
result = json.loads(post_select(query=parameter_query))
Expand All @@ -179,6 +181,7 @@ def post_provenance(plugin: WorkflowPlugin, context: ExecutionContext) -> None:
<{new_plugin_iri}> <http://www.w3.org/2000/01/rdf-schema#label> "{plugin_label}" .
{param_sparql}
}}
}}"""
}}
"""

post_update(query=insert_query)
Binary file added cmem_plugin_reason/validate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 49009a4

Please sign in to comment.