# cmem-plugin-pyshacl
Validate your Knowledge Graphs based on tests generated from SHACL shapes.
[![eccenca Corporate Memory][cmem-shield]][cmem-link]
This is a plugin for [eccenca](https://eccenca.com) [Corporate Memory](https://documentation.eccenca.com). You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line clients like this:
```
cmemc admin workspace python install cmem-plugin-pyshacl
```
## Parameters
### Data graph URI
The URI of the data graph to be validated. The graph URI is selected from a list of graphs of types:
- `di:Dataset`
- `dsm:ThesaurusProject`
- `owl:Ontology`
- `shui:ShapeCatalog`
- `void:Dataset`
### SHACL graph URI
The URI of the graph containing the SHACL shapes to be validated against. The graph URI is selected from a list of graphs of type `shui:ShapeCatalog`
### Generate validation graph
If enabled, the validation graph is posted to the CMEM instance with the graph URI specified with the *validation graph URI* option. Default value: *false*
### Validation graph URI
If the *generate validation graph* option is enabled the validation graph is posted to the CMEM instance with this graph URI
### Output entities
If enabled, the plugin outputs the validation results and can be connected to, for instance, a CSV dataset to produce a results table. Default value: *false*
### Clear validation graph
If enabled, the validation graph is cleared before workflow execution. Default value: *true*.
## Advanced Options
### Resolve owl:imports
If enabled, the graph tree defined with `owl:imports` in the data graph is resolved. Default value: *true*
### Blank node skolemization
If enabled, blank nodes in the validation graph are skolemized into URIs. Default value: *true*
### Add labels
If enabled, `rdfs:label` triples are added to the validation graph for instances of `sh:ValidationReport` and `sh:ValidationResult`. Default value: *true*
### Add labels from data and SHACL graphs
If enabled along with the *add labels* option, `rdfs:label` triples are added for the focus nodes, values and SHACL shapes in the validation graph. The labels are taken from the specified data and SHACL graphs. Default value: *false*
### Add shui:conforms flag to focus node resources
If enabled, `shui:conforms false` triples are added to the focus nodes in the validation graph. Default value: *false*
### Meta-SHACL
If enabled, the SHACL shapes graph is validated against the SHACL-SHACL shapes graph before validating the data graph. Default value: *false*
### Ontology graph URI
The URI of a graph containing extra ontological information. RDFS and OWL definitions from this are used to inoculate the data graph. The graph URI is selected from a list of graphs of type `owl:Ontology`
### Inference
If enabled, OWL inferencing expansion of the data graph is performed before validation. Options are *RDFS*, *OWLRL*, *Both*, *None*. Default value: *None*
### SHACL advanced features
Enable SHACL Advanced Features. Default value: *false*.
### SHACL-JS features
Enable SHACL-JS features. Default value: *false*.
### Remove graph type http://rdfs.org/ns/void#Dataset from data graph
Before validating, remove the triple `<data_graph_uri> a <http://rdfs.org/ns/void#Dataset>` from the in-memory data graph.
### Remove graph type https://vocab.eccenca.com/dsm/ThesaurusProject from data graph
Before validating, remove the triple `<data_graph_uri> a <https://vocab.eccenca.com/dsm/ThesaurusProject>` from the in-memory data graph.
### Remove graph type https://vocab.eccenca.com/shui/ShapeCatalog from data graph
Before validating, remove the triple `<data_graph_uri> a <https://vocab.eccenca.com/shui/ShapeCatalog>` from the in-memory data graph.
### Maximum evaluation depth
The maximum number of SHACL shapes "deep" that the validator can go before reaching an "endpoint" constraint (1-999). Default value: 15
## Parameter Input
In order to set options via the input the following parameter names can be used:
| Option | Name |
|----------------------------------------------------------------------------------|---------------------------------|
| Data graph URI | data_graph_uri |
| SHACL graph URI | shacl_graph_uri |
| Generate validation graph | generate_graph |
| Validation graph URI | validation_graph_uri |
| Output entities | output_entities |
| Clear validation graph | clear_validation_graph |
| Resolve owl:imports | owl_imports |
| Blank node skolemization | skolemize |
| Add labels | add_labels |
| Add labels from data and SHACL graphs | include_graphs_labels |
| Add shui:conforms flag to focus node resources | add_shui_conforms |
| Meta-SHACL | meta_shacl |
| Ontology graph URI | ontology_graph_uri |
| Inference | inference |
| SHACL advanced features | advanced |
| SHACl-JS features | js |
| Remove graph type http://rdfs.org/ns/void#Dataset from data graph | remove_dataset_graph_type |
| Remove graph type https://vocab.eccenca.com/dsm/ThesaurusProject from data graph | remove_thesaurus_graph_type |
| Remove graph type https://vocab.eccenca.com/shui/ShapeCatalog from data graph | remove_shape_catalog_graph_type |
| Maximum evaluation depth | max_evaluation_depth |
[![workflow](https://github.com/eccenca/cmem-plugin-pyshacl/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-pyshacl/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-pyshacl)](https://pypi.org/project/cmem-plugin-pyshacl) [![license](https://img.shields.io/pypi/l/cmem-plugin-pyshacl)](https://pypi.org/project/cmem-plugin-pyshacl)
[![poetry][poetry-shield]][poetry-link] [![ruff][ruff-shield]][ruff-link] [![mypy][mypy-shield]][mypy-link] [![copier][copier-shield]][copier]
[cmem-link]: https://documentation.eccenca.com
[cmem-shield]: https://img.shields.io/endpoint?url=https://dev.documentation.eccenca.com/badge.json
[poetry-link]: https://python-poetry.org/
[poetry-shield]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json
[ruff-link]: https://docs.astral.sh/ruff/
[ruff-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&label=Code%20Style
[mypy-link]: https://mypy-lang.org/
[mypy-shield]: https://www.mypy-lang.org/static/mypy_badge.svg
[copier]: https://copier.readthedocs.io/
[copier-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json
Raw data
{
"_id": null,
"home_page": "https://github.com/eccenca/cmem-plugin-pyshacl",
"name": "cmem-plugin-pyshacl",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": "eccenca Corporate Memory, plugin, SHACL",
"author": "eccenca GmbH",
"author_email": "cmempy-developer@eccenca.com",
"download_url": "https://files.pythonhosted.org/packages/72/da/d30b001858e2b13d6bbeb6299bba637243f970638154b08af50169e5f442/cmem_plugin_pyshacl-5.1.0.tar.gz",
"platform": null,
"description": "# cmem-plugin-pyshacl\n\nValidate your Knowledge Graphs based on tests generated from SHACL shapes.\n\n[![eccenca Corporate Memory][cmem-shield]][cmem-link]\n\nThis is a plugin for [eccenca](https://eccenca.com) [Corporate Memory](https://documentation.eccenca.com). You can install it with the [cmemc](https://eccenca.com/go/cmemc) command line clients like this:\n\n```\ncmemc admin workspace python install cmem-plugin-pyshacl\n```\n\n\n## Parameters\n\n### Data graph URI\n\nThe URI of the data graph to be validated. The graph URI is selected from a list of graphs of types:\n- `di:Dataset`\n- `dsm:ThesaurusProject`\n- `owl:Ontology`\n- `shui:ShapeCatalog`\n- `void:Dataset`\n\n### SHACL graph URI\n\nThe URI of the graph containing the SHACL shapes to be validated against. The graph URI is selected from a list of graphs of type `shui:ShapeCatalog`\n\n### Generate validation graph\n\nIf enabled, the validation graph is posted to the CMEM instance with the graph URI specified with the *validation graph URI* option. Default value: *false*\n\n### Validation graph URI\n\nIf the *generate validation graph* option is enabled the validation graph is posted to the CMEM instance with this graph URI\n\n### Output entities\n\nIf enabled, the plugin outputs the validation results and can be connected to, for instance, a CSV dataset to produce a results table. Default value: *false*\n\n### Clear validation graph\n\nIf enabled, the validation graph is cleared before workflow execution. Default value: *true*.\n\n## Advanced Options\n\n### Resolve owl:imports\n\nIf enabled, the graph tree defined with `owl:imports` in the data graph is resolved. Default value: *true*\n\n### Blank node skolemization\n\nIf enabled, blank nodes in the validation graph are skolemized into URIs. Default value: *true*\n\n### Add labels\n\nIf enabled, `rdfs:label` triples are added to the validation graph for instances of `sh:ValidationReport` and `sh:ValidationResult`. Default value: *true*\n\n### Add labels from data and SHACL graphs\n\nIf enabled along with the *add labels* option, `rdfs:label` triples are added for the focus nodes, values and SHACL shapes in the validation graph. The labels are taken from the specified data and SHACL graphs. Default value: *false*\n\n### Add shui:conforms flag to focus node resources\n\nIf enabled, `shui:conforms false` triples are added to the focus nodes in the validation graph. Default value: *false*\n\n### Meta-SHACL\n\nIf enabled, the SHACL shapes graph is validated against the SHACL-SHACL shapes graph before validating the data graph. Default value: *false*\n\n### Ontology graph URI\n\nThe URI of a graph containing extra ontological information. RDFS and OWL definitions from this are used to inoculate the data graph. The graph URI is selected from a list of graphs of type `owl:Ontology`\n\n### Inference\n\nIf enabled, OWL inferencing expansion of the data graph is performed before validation. Options are *RDFS*, *OWLRL*, *Both*, *None*. Default value: *None*\n\n### SHACL advanced features\n\nEnable SHACL Advanced Features. Default value: *false*.\n\n### SHACL-JS features\n\nEnable SHACL-JS features. Default value: *false*.\n\n### Remove graph type http://rdfs.org/ns/void#Dataset from data graph\n\nBefore validating, remove the triple `<data_graph_uri> a <http://rdfs.org/ns/void#Dataset>` from the in-memory data graph.\n\n### Remove graph type https://vocab.eccenca.com/dsm/ThesaurusProject from data graph\n\nBefore validating, remove the triple `<data_graph_uri> a <https://vocab.eccenca.com/dsm/ThesaurusProject>` from the in-memory data graph.\n\n### Remove graph type https://vocab.eccenca.com/shui/ShapeCatalog from data graph\n\nBefore validating, remove the triple `<data_graph_uri> a <https://vocab.eccenca.com/shui/ShapeCatalog>` from the in-memory data graph.\n\n### Maximum evaluation depth\n\nThe maximum number of SHACL shapes \"deep\" that the validator can go before reaching an \"endpoint\" constraint (1-999). Default value: 15\n\n\n## Parameter Input\n\nIn order to set options via the input the following parameter names can be used:\n\n| Option | Name |\n|----------------------------------------------------------------------------------|---------------------------------|\n| Data graph URI | data_graph_uri |\n| SHACL graph URI | shacl_graph_uri |\n| Generate validation graph | generate_graph |\n| Validation graph URI | validation_graph_uri |\n| Output entities | output_entities |\n| Clear validation graph | clear_validation_graph |\n| Resolve owl:imports | owl_imports |\n| Blank node skolemization | skolemize |\n| Add labels | add_labels |\n| Add labels from data and SHACL graphs | include_graphs_labels |\n| Add shui:conforms flag to focus node resources | add_shui_conforms | \n| Meta-SHACL | meta_shacl |\n| Ontology graph URI | ontology_graph_uri |\n| Inference | inference |\n| SHACL advanced features | advanced |\n| SHACl-JS features | js |\n| Remove graph type http://rdfs.org/ns/void#Dataset from data graph | remove_dataset_graph_type |\n| Remove graph type https://vocab.eccenca.com/dsm/ThesaurusProject from data graph | remove_thesaurus_graph_type |\n| Remove graph type https://vocab.eccenca.com/shui/ShapeCatalog from data graph | remove_shape_catalog_graph_type |\n| Maximum evaluation depth | max_evaluation_depth |\n\n\n\n[![workflow](https://github.com/eccenca/cmem-plugin-pyshacl/actions/workflows/check.yml/badge.svg)](https://github.com/eccenca/cmem-plugin-pyshacl/actions) [![pypi version](https://img.shields.io/pypi/v/cmem-plugin-pyshacl)](https://pypi.org/project/cmem-plugin-pyshacl) [![license](https://img.shields.io/pypi/l/cmem-plugin-pyshacl)](https://pypi.org/project/cmem-plugin-pyshacl)\n[![poetry][poetry-shield]][poetry-link] [![ruff][ruff-shield]][ruff-link] [![mypy][mypy-shield]][mypy-link] [![copier][copier-shield]][copier] \n\n[cmem-link]: https://documentation.eccenca.com\n[cmem-shield]: https://img.shields.io/endpoint?url=https://dev.documentation.eccenca.com/badge.json\n[poetry-link]: https://python-poetry.org/\n[poetry-shield]: https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json\n[ruff-link]: https://docs.astral.sh/ruff/\n[ruff-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json&label=Code%20Style\n[mypy-link]: https://mypy-lang.org/\n[mypy-shield]: https://www.mypy-lang.org/static/mypy_badge.svg\n[copier]: https://copier.readthedocs.io/\n[copier-shield]: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Validate your Knowledge Graphs based on tests generated from SHACL shapes.",
"version": "5.1.0",
"project_urls": {
"Homepage": "https://github.com/eccenca/cmem-plugin-pyshacl"
},
"split_keywords": [
"eccenca corporate memory",
" plugin",
" shacl"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d25483f8569538537c503d102ae514411dcc7bdbf0959d8b437433b32afa3093",
"md5": "dcb5a36096a02a6d16005ed42ad14ce2",
"sha256": "29af1acf9d2ede9d82d5f827d5a7fb54d4561d50f49451e6b4c200d96e3c0216"
},
"downloads": -1,
"filename": "cmem_plugin_pyshacl-5.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dcb5a36096a02a6d16005ed42ad14ce2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 17571,
"upload_time": "2024-12-03T14:08:43",
"upload_time_iso_8601": "2024-12-03T14:08:43.430899Z",
"url": "https://files.pythonhosted.org/packages/d2/54/83f8569538537c503d102ae514411dcc7bdbf0959d8b437433b32afa3093/cmem_plugin_pyshacl-5.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "72dad30b001858e2b13d6bbeb6299bba637243f970638154b08af50169e5f442",
"md5": "26b2917b98599e19c14ae54ebc554889",
"sha256": "a131a328be4fce5eb68890a0cfc47fbdda271e36e63fe195ebb27b29e8cf72a2"
},
"downloads": -1,
"filename": "cmem_plugin_pyshacl-5.1.0.tar.gz",
"has_sig": false,
"md5_digest": "26b2917b98599e19c14ae54ebc554889",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 19512,
"upload_time": "2024-12-03T14:08:44",
"upload_time_iso_8601": "2024-12-03T14:08:44.465670Z",
"url": "https://files.pythonhosted.org/packages/72/da/d30b001858e2b13d6bbeb6299bba637243f970638154b08af50169e5f442/cmem_plugin_pyshacl-5.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-03 14:08:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "eccenca",
"github_project": "cmem-plugin-pyshacl",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "cmem-plugin-pyshacl"
}