Releases: RDFLib/pySHACL
Releases · RDFLib/pySHACL
New SHACL Advanced Features!
Added
- New SHACL Advanced Specification Features!
- All NodeExpressions can now be used in SHACL Rules
- Focus Node (sh:this)
- FilterShape (sh:filterShape)
- Function Expressions (any sh:SHACLFunction and args)
- Path Expressions (use sh:path in a NodeExpression)
- Intersection Expressions (sh:intersection)
- Union Expressions (sh:union)
- SHACLFunctions (including SPARQLFunction)
- Both SHACLFunction and SPARQLFunction are now fully implemented including unit tests and edge cases
- SHACLFunctions are bound to PySHACL and can be used in SHACL Rules and NodeExpressions
- SPARQLFunctions are bound to the RDFLib SPARQL Engine, so they can be used in other SPARQL queries
- Read the manual for more info: https://www.w3.org/TR/shacl-af/#functions
Fixed
- Short versions of uris were sometimes not used in the Validation Report when they should've been
- Checking results of some tests was being skipped! Lucky this wasn't letting through any SHACL errors.
- Fixed error message when using sh:ignoredProperties on a node that isn't sh:closed issue #58
v0.12.2 - 2020-08-12
Fixed
- In a validation report graph, when FocusNode and ValueNode are the same node, and are a blank node, when they get
copied into the validation report graph they will have the same bnode id as each other. - Optimised the algorithm for copying different kinds of rdf nodes into the validation graph.
Changed
- When the FocusNode and ValueNode are copied into the validation graph from the data graph, they will try to keep the
same bnode id they had before, if possible.
Meaningful messages 2020-07-22
Added
-
All SHACL Core constraints now have their own autogenerated sh:message.
- This is used as a fallback when your Shape does not provide its own sh:message
- See the new sh:resultMessage entries in the Validation Report output
- These are hopefully more human-readable than the other fields of the Validation Report results
-
Added a copy of the implementation of the new 'Memory2' rdflib triplestore backend.
- This when using Python 3.6 or above, this is faster than the default 'IOMemory' store by:
- 10.3% when benchmarking validation with no inferencing
- 17% when benchmarking validation with rdfs inferencing
- 19.5% when benchmarking validation with rdfs+owlrl inferencing
- This when using Python 3.6 or above, this is faster than the default 'IOMemory' store by:
Changed
- PySHACL is now categorised as Production/Stable.
- This marks a level of maturity in PySHACL we are happy to no longer consider a beta
- A v1.0.0 might be coming soon, but its just a version number, doesn't mean anything special
- Changed default rdflib triplestore backend to 'Memory2' as above.
- Tiny optimisations in the way sh:message items are added to a validation report graph.
Fixed
- Regression since v0.11.0, sh:value and sh:focusNode from the datagraph were not included in the validation report
graph if the datagraph was of type rdflib.ConjunctiveGraph or rdflib.Dataset.
The Modernisation Release - 2020-07-10
Removed
Announcement
- Python 3.5 support is removed. PySHACL now requires Python 3.6 or above.
- Routine tests are run using Python 3.6.11, 3.7.8, and 3.8.2.
- Python 3.9 might work but is not yet supported.
Added
- Python 3.6-compatible type hinting is added throughout the codebase
- MyPy library is used to run type checking during testing process
- Flake8 linting is added to enforce PEP8
- isort is added to enforce imports linting
- Black is added to keep formatting consistent across releases
Changed
- PySHACL is no longer a setuptools-based project with a
setup.py
andrequirements.txt
file. - PySHACL is now a PEP518 & PEP517 project, it uses
pyproject.toml
andpoetry
to manage
dependencies, build and install. - For best compatibility when installing from PyPI with
pip
, upgrade to pip v18.1.0 or above.- If you're on Ubuntu 16.04 or 18.04, you will need to run
sudo pip3 install --upgrade pip
- If you're on Ubuntu 16.04 or 18.04, you will need to run
- Editor Line Length for PySHACL code is now set to 119 as opposed to 79 chars.
v0.11.6.post1 2020-07-09
Added
- New feature to CLI tool
-V
shows the PySHACL version
- Run module directly
- You can get access to the same CLI tool if you install the module and run it using
python3 -m pyshacl
- See
python3 -m pyshacl --help
for more details
- You can get access to the same CLI tool if you install the module and run it using
Announcement
- This is the final version with Python v3.5 support
- Versions 0.12.0 and above will have newer package management and dependency management, and will
require Python v3.6+.
- Versions 0.12.0 and above will have newer package management and dependency management, and will
Incremental release v0.11.6
Fixed
- Fixed a bug present since
v0.11.0
. If the data graph has multiple named graphs, and an extra ontology mixin source
used and that also has multiple named graphs, then only the first graph in the mixins source was added to the datagraph.- Now all named graphs from the mixin source are mixed into all named graphs of the datagraph, as originally intended.
- Fixed one unit test which had been intermittently failing
- Cleaned up the behaviour around performing patch to Boolean Literal parsing on rdflib 5.0.0
[0.11.4] - 2020-01-32
Fixed
- Fixed Issue #040
- Fixed badly-formatted dates in the changelog
Added
- Added ability for pySHACL to track and monitor its evaluation path during validation
- This allows for the validator to detect two different scenarios:
- A recursive shape has triggered an infinitely-recursive validation, back out
- Evaluation Path too deep (error generated, prevents python recursion depth errors)
- This allows for the validator to detect two different scenarios:
- Added a test for Issue #40
v0.11.3 postrelease bugfix
Incremental fixes
Fixed
- Fixed Issue #032
- Stringification of Focus Node, and Value Node in the results text string now works correctly
- This is an old bug, that has been around since the first versions of pySHACL
- Manifests when the DataGraph is a different graph than the ShapesGraph
- Recent change from using Graphs by default to using Datasets by default helped to expose this bug
- Thanks to @jameshowison for reporting the bug
Changed
- Stringification of a blank node now operates on a rdflib.Graph only, rather than a Dataset.
- Added mechanism to extract the correct named graph from a dataset when stringifying a blank node.
- Added a workaround for a json-ld loader bug where the namespace_manager for named graphs within a conjunctive graph
is set to the parent conjunctive graph.- This necessary workaround was exposed only after changing the blank node stringification above.
(Fixing one bug exposed another bug!)
- This necessary workaround was exposed only after changing the blank node stringification above.
Announcement
- This is the final version with Python v3.5 support
- Versions 0.12.0 and above will have newer package management and dependency management, and will
require Python v3.6+.
- Versions 0.12.0 and above will have newer package management and dependency management, and will
OWL-RL update
Changed
- Bumped min OWL-RL version to 5.2.1 to bring in some new bugfixes
- Corrected some tiny typos in readme