All Versions
83
Latest Version
1.0
Avg Release Cycle
88 days
Latest Release
-

Changelog History
Page 1

  • v1.0 Changes

    ๐Ÿš€ That means, if no glaring bugs or issues are found in this release after two weeks, this version will be re-released as PySHACL v1.0.

  • v0.40.0 Changes

    July 08, 2026

    โž• Added

    Compatibility with Oxigraph stores.

    • PySHACL can now validate a graph that is loaded into a PyOxigraph pyoxigraph.Store instance.
    • ๐Ÿ†• New DataGraph graph abstraction layer that wraps RDFLib Graph/Dataset and, when installed, pyoxigraph.Store.
    • Validation and SHACL Rules expansion can use an Oxigraph-backed data graph for faster SPARQL execution.
    • Install with the new optional extra: pip install pyshacl[oxigraph].
    • Pass a pyoxigraph.Store directly to validate() or shacl_rules().

    SHACL Functions and SHACL-JS Functions now register and execute on both RDFLib and Oxigraph SPARQL engines.

    • SPARQL constraints can invoke SHACL Functions as SPARQL extension functions when using an Oxigraph-backed data graph.

    โœ… Python 3.13 support in the test matrix.

    • pyduktape2 dependency is now version-split for Python 3.13+.

    ๐Ÿ”„ Changed

    ๐Ÿ’ฅ Dropped rdflib.ConjunctiveGraph support throughout the codebase. Breaking

    • ConjunctiveGraph has been deprecatd in RDFLib for a long time, it will be gone in RDFLib 8. Removing it now from PySHACL to prevent compatibility issues later.
    • ๐Ÿ‘ Multigraph inputs must be an rdflib.Dataset; bare rdflib.Graph remain supported for single-graph use.

    Adapted to RDFLib 7.3+ API changes

    • 0๏ธโƒฃ default_context has been replaced with default_graph, and contexts() replaced with graphs().
    • Resolves #316
    • Thanks @torsknod2

    โšก๏ธ Updated minimum dependency versions:

    • rdflib[html]>=7.3.0,<8.0
    • owlrl>=7.6.1,<8
    • validate_each() now returns a dict keyed by input index (int) instead of by source identifier.
    • Internal validation and rules expansion now operate on the DataGraph wrapper rather than raw RDFLib graph objects.
    • 0๏ธโƒฃ SPARQL prefix resolution for shapes graphs stored in a Dataset now reads sh:declare blocks from the default graph.
    • ๐Ÿ—„ DASH conformance checking now enumerates named graphs with Dataset.graphs() instead of the deprecated contexts() API.

    ๐Ÿ›  Fixed

    • OWL owl:imports over HTTP no longer leaves closed HTTPResponse objects that trigger finalizer errors during garbage collection.

    โœ‚ Removed

    • ๐Ÿ’ฅ Support for rdflib.ConjunctiveGraph as a data graph, shapes graph, or ontology graph input type. Breaking
  • v0.31.0 Changes

    January 16, 2026

    v0.31.0

    โž• Added

    • ๐Ÿ‘Œ Support for validating multiple target data graphs.
      • Default "combine" mode loads all given data graphs into a single Dataset and validates all at once.
      • New "validate-each" mode validates each data graph independently and returns multiple results.
      • CLI now accepts multiple data graph paths and adds a --validate-each flag.
      • New validate_each() entrypoint for per-graph validation in library code.

    ๐Ÿ›  Fixed

    • SPARQL constraint validation no longer misidentifies VALUES in property paths or predicate names.

    • Validation report text output is now deterministic.

    • use_shapes filtering no longer fails when omitted PropertyShapes are referenced by included shapes.

  • v0.30.1 Changes

    March 14, 2025

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed a bug in SHACL Shape Targeting feature, BNode shapes that are referenced by a shape in sh:or, sh:and or sh:xone were not getting selected.
  • v0.30.0 Changes

    January 24, 2025

    ๐Ÿ›  Fixed

    • Finalize the decoupling of base_uri from graph identifier.

      • Blame the conflated naming of publicID in RDFLib for that confusion.
    • load_from_source will now correctly detect and use the BaseURI of files passed in, for relative URIs.

    ๐Ÿ”„ Changed

    • โšก๏ธ Update to Poetry v2.0 and new pyproject.toml format.
    • โœ‚ Removed "Black", switched to "Ruff" for formatting as well as linting.
    • ๐Ÿ“œ Switched to parsing file: IRIs in line with the RDF spec, and allow (base-less, or root-less) relative file: IRIs (as per the RDF spec).
      • But "file:" IRIs in Turtle files are now not made relative to BaseURI, because they are relative to the CWD.
  • v0.29.1 Changes

    January 24, 2025

    v0.29.1 - 2024-12-16

    โž• Added

    • Two new basic examples in the Examples folder.
      • "sparql_assert_datatype.py" shows how to use SPARQL-based Constraints to assert a datatype on a literal.
      • "remote_sparql.py" shows how to use SparqlConnector store to validate data on a remote SPARQL endpoint.

    ๐Ÿ›  Fixed

    • Fixed a bug where the identifier would become "None" (string) in the load_from_source function.
    • โœ… Typos in the example Ontology files in the test suite.
  • v0.29.0 Changes

    November 01, 2024

    ๐Ÿš€ v0.29.0 - 2024-11-01 - Halloween Release

    โž• Added

    • When validating a Dataset instead of a bare Graph, PySHACL will now expand RDFS and OWL-RL inferences into
      a separate named graph, to avoid polluting the datagraph.
    • When using SHACL Triple Rules from SHACL-AF spec, PySHACL will now add the expressed triples into
      a separate named graph. This allows you to more easily get the expanded triples back out again afterward.
      • This is implemented for TripleRules, SPARQLRules and JSRules

    ๐Ÿ”„ Changed

    • ๐Ÿ‘ PySHACL no longer supports older RDFLib versions

      • PySHACL relies on the latest OWL-RL version, that in-turn relies on the latest RDFLib version
      • Therefore PySHACL now requires RDFLib v7.1.1 or newer
    • โฌ‡๏ธ Dropped Python 3.8 support.

      • Python developers discontinued Python 3.8 last month
      • The next version of RDFLib and OWL-RL will not support Python 3.8
      • Removed Python 3.8 from the RDFLib test suite
      • Python 3.9-specific typing changes will be incrementally introduced
  • v0.28.1 Changes

    October 25, 2024

    v0.28.1 - 2024-10-25

    ๐Ÿ›  Fixed

    • ๐Ÿšš PySHACL no longer overwrites the Python root logger and removes all its handlers. How Rude.
  • v0.28.0 Changes

    October 23, 2024

    v0.28.0 - 2024-10-23

    โž• Added

    • owl:imports now works with bnode values, where it contains the following:

      • schema:url is the string where to find the imported ontology
      • schema:url (again) with a "file://" path, to a local copy of the ontology
      • schema:identifier that is the canonical name to use for the ontology at load time (this is the publicID)
    • RDFUtil.loader load_from_source function now supports identifier that is akin to the publicID of the file being
      ๐Ÿ“œ loaded, and that is passed to RDFLib parser to correctly do relative URIs, etc.

    ๐Ÿ”„ Changed

    • Big change to how Milti-graph datasets (ie, rdflib.ConjunctiveGraph and rdflib.Dataset) are handled.

      • Instead of validating each named graph individually, PySHACL now sets defaultUnion=True and
        now validates the entire Dataset at once.
      • This allows you to logically segment your dataset as desired into many individual named graphs, and validation
        will still work as you expect it to.
      • This is in preparation for another big upcoming change in pySHACL that will allow OWL-RL inferencing to place
        inferred triples into a separate named graph, and SHACL Rules to place inferred triples into a separate named graph,
        and validation will still work as expected because validation is now against a union of the whole dataset.
    • Pre-Compile Regexs in sh:Pattern constraints. This allows faster re-use of the constraint, if is applied to
      many different targets.

    ๐Ÿ›  Fixed

    • Attempting to stringify a focus_node ar a value_node from the datagraph, where that node doesn't actually exist in
      the datagraph, no longer crashes, it falls back to a different method.
  • v0.27.0 Changes

    October 11, 2024

    โž• Added

    SHACL Rules Expander Mode

    • A new alternative Run Mode for PySHACL
    • PySHACL will not validate the DataGraph against Shapes and Constraints, instead it will simply run all SHACL-AF Rules to expand the DataGraph.
    • 0๏ธโƒฃ By default it will output a new graph containing the existing DataGraph Triples plus the expanded triples
    • โš™ Run with inplace mode to expand the new triples directly into the input DataGraph

    Focus Node Filtering

    • You can now pass in a list of focus nodes to the validator, and it will only validate those focus nodes.
    • Note, you still need to pass in a SHACL Shapes Graph, and the shapes still need to target the focus nodes.
    • This feature will filter the Shapes' targeted focus nodes to include only those that are in the list of specified focus nodes.

    SHACL Shape selection

    • You can now pass in a list of SHACL Shapes to the validator, and it will use only those Shapes for validation.
    • โœ… This is useful for testing new shapes in your shapes graph, or for many other procedure-driven use cases.

    Combined Shape Selection with Focus Node filtering

    • The combination of the above two new features is especially powerful.
    • If you give the validator a list of Shapes to use, and a list of focus nodes, the validator will operate in
      a highly-targeted mode, it feeds those focus nodes directly into those given Shapes for validation.
    • In this mode, the selected SHACL Shape does not need to specify any focus-targeting mechanisms of its own.

    Combined Rules Expander Mode with Shape Selection

    • The combination of SHACL Rules Expander Mode and Shape Selection will allow specialised workflows.
    • For example, you can run specific expansion rules from a SHACL Shapes File, based on the new triples required.

    ๐Ÿ”„ Changed

    ๐Ÿ‘ฏ Don't make a clone of the DataGraph if the input data graph is ephemeral.

    • An ephemeral graph is one that is loaded from a string or file location by PySHACL
    • This includes all files opened by the PySHACL CLI validator tool
    • ๐Ÿ“œ We don't need to make a copy because PySHACL parsed the Graph into memory itself already, so we are not concerned about not polluting the user's graph.

    ๐Ÿ”จ Refactorings

    • shacl_path_to_sparql_path code to a reusable importable function
    • move sht_validate and dash_validate routes to validator_conformance.py module.
      • Removes some complexity from the main validate function.

    Typing

    • ๐Ÿ›  A whole swathe of python typing fixes and new type annotations. Thanks @ajnelson-nist

    ๐Ÿ›  Fixed

    ๐Ÿ›  Fixed SHACL Path generation where sh:inversePath is wrapping a different kind of SHACL Path.

    • ๐Ÿ›  This probably fixes lots of unreported sh:inversePath bugs
    • ๐Ÿ›  Fixes #227

    ๐Ÿ›  Fixed generic message generation when there are multiple sh:and, sh:or, or sh:xone constraints on a Shape.

    • ๐Ÿ›  Fixes #220

    ๐Ÿ›  Fix logic determining if a datagraph is ephemeral.