Skip to content

Commit

Permalink
fix validation issues (#9)
Browse files Browse the repository at this point in the history
* define schemas, remove write_md and produc_graph bool parameters

* fix condition to write MD file to project

* validate inputs (Reason)

* use ontology IRI from input if input_profiles=True

* fix incorrect stopping of workflow if 'validate_profiles' is enabled in Validate

* remove iter cast from output entities

* fixing import bug

* fix error when result graph is imported in input graph

* edit readme

* fixes (CMEM-5913), use custom paramter type for output graph IRI

* edit parameter description

* init ExecutionReport

* edit parameter label

* use GraphParameterType(allow_only_autocompleted_values=False) instead of custom parameter for output graph IRI

* set allowed classes for output graph list to Dataset and Ontology

* fix indentation

* removee reason merge in reason

* remove robot merge in Validate

* refactor parameter variable generation

* add '[processed ontology] a owl:Ontology' to output graph, use config port input for valid OWL2 profiles in Reasin plugin

* edit readme

* fix test

* remove unused method

* verify valid_profiles input

* add parameters for owl:imports and entity output. PLugin doc imported from md files

* fix tests

* edit docs

* edit doc

* edit doc

* edit parameters

* remove SSL_VERIFY env variable setting

* specify output entity paths in Validate tests

---------

Co-authored-by: muddymudskipper <thomas.wilmering@gmail.com>
  • Loading branch information
seebi and muddymudskipper authored Aug 15, 2024
1 parent e49b099 commit 86e4365
Show file tree
Hide file tree
Showing 17 changed files with 688 additions and 375 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,27 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p

## [Unreleased]

### Added

- defined input and output schema
- Reason: parameters to import the result graph in the ontology graph and to import the ontology graph in the result graph
- Validate: parameter to enable/disable entity output

### Fixed

- incorrect stopping of workflow if "validate_profiles" and "stop_at_inconsistencies" is enabled in Validate plugin
- fixed error when output graph is imported by input graph; the import is removed in-memory before reasoning

### Changed

- raise OSError on post result graph error
- removed write_md and produce_graph bool parameters
- if "input_profiles" is enabled the Reason plugin expects "ontology_iri" and "profile" on the input.
The ontology IRI on the input overrides the plugin setting.
- update execution report
- Output graph IRI selectable from existing graphs
- When "input_profiles" is enabled the ontology IRI and list of valid OWL2 profiles is now taken from the config port.
The list of valid profiles is a comma-separated string (e.g. "Full,DL")

## [1.0.0beta4] 2024-07-12

Expand Down
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,21 @@ parameters to include inferred axiom generators:

### Validate OWL2 profiles

Validate the input ontology against OWL profiles (DL, EL, QL, RL, and Full). The ontology is annotated in the output graph.
Validate the input ontology against OWL profiles (DL, EL, QL, RL, and Full) and annotate the result graph.

### Process valid OWL profiles from input

If enabled along with the "Validate OWL2 profiles" parameter, the list of valid profiles is taken from the plugin input,
without validating the ontology against the profiles in the plugin. The inputs need to include the entity paths "profile"
for the valid profiles, and "ontology" for the ontology IRI. If the "Validate OWL2 profiles" parameter is enabled in the
"Validate" plugin, it can be directly connected to the input of the "Reason" plugin.
If enabled along with the "Validate OWL2 profiles" parameter, the valid profiles and ontology IRI is taken from the
config port input (parameters "valid_profiles" and "ontology_graph_iri") instead of from running the validation in the
plugin. The valid profiles input is a comma-separated string (e.g. "Full,DL").

### Add ontology graph import to result graph

Add the triple `<output_graph_iri> owl:imports <ontology_graph_iri>` to the output graph.

### Add result graph import to ontology graph

Add the triple `<ontology_graph_iri> owl:imports <output_graph_iri>` to the ontology graph

### Maximum RAM Percentage

Expand All @@ -102,7 +108,9 @@ Maximum heap size for the Java virtual machine in the DI container running the r

# Validate

The plugin outputs the explanation as text in Markdown format using the path "markdown".
The plugin outputs the explanation as text in Markdown format on the path "markdown",
the ontology IRI on the path "ontology_graph_iri", and (if enabled) the valid OWL2 profiles on the path "valid_profiles" as
a comma-separated string.

## Options

Expand Down Expand Up @@ -145,9 +153,12 @@ Raise an error if inconsistencies are found. If enabled, the plugin does not out

### Validate OWL2 profiles

Validate the input ontology against OWL profiles (DL, EL, QL, RL, and Full). The valid profiles are added to the output
Markdown file and the ontology is annotated in the output graph. The plugin outputs the profiles with path "profile",
and the ontology IRI with path "ontology".
Validate the input ontology against OWL profiles (DL, EL, QL, RL, and Full) and annotate the result graph.

### Output entities

Output entities. The plugin outputs the explanation as text in Markdown format on the path "markdown", the ontology IRI
on the path "ontology_graph_iri", and, if enabled, the valid OWL2 profiles on the path "valid_profiles

### Maximum RAM Percentage

Expand Down
Loading

0 comments on commit 86e4365

Please sign in to comment.