Skip to content

Conversation

@lapkinvladimir
Copy link

This PR adds support for using the Jelly RDF serialization format in pySHACL

Jelly is a binary format that is closely integrated with RDFLib via the pyjelly library. It can speed up parsing large RDF files, so that validation may become more practical when text formats such as Turtle or N-Triples are slow to load

What was done

  • Added "jelly" as a supported format in the CLI (--data-file-format, --shacl-file-format, output format via -f)
  • Updated output logic for CLIs to write binary reports correctly
  • Added Jelly support in the Python API (data_graph_format / shacl_graph_format)
  • Implemented a small test suite covering API and CLI usage with Jelly

All existing behavior for other formats remains unchanged

@nicholascar
Copy link
Member

@lapkinvladimir could you perhaps submit a PR to RDFLib to add parser/serializer support for Jelly there?

There have been a couple of Jelly discussions in RDFLib such as requirements for it to assist with streaming at RDFLib/rdflib#1560 but nothing concrete yet proposed.

@Ostrzyciel
Copy link

@lapkinvladimir could you perhaps submit a PR to RDFLib to add parser/serializer support for Jelly there?

@nicholascar thanks for the suggestion! Me & @lapkinvladimir talked about this today – we filed this issue detailing how that could work: RDFLib/rdflib#3349

Regardless of that issue, adding full Jelly support to pySHACL requires more than adding a dependency, as evidenced by the changes made in this PR. So, I think this PR is still valid.

@lapkinvladimir will submit a commit to fix the poetry issue in a few hours, I think.

@ashleysommer
Copy link
Collaborator

ashleysommer commented Dec 14, 2025

@lapkinvladimir @Ostrzyciel Thanks for this PR.
I personally would prefer to see Jelly support merged into RDFLib, before we implement the corresponding changes in PySHACL.

@Ostrzyciel
Copy link

@lapkinvladimir @Ostrzyciel Thanks for this PR. I personally would prefer to see Jelly support merged into RDFLib, before we implement the corresponding changes in PySHACL.

@ashleysommer sure, we can do that, although I don't see a technical reason for that. You can use Jelly with RDFLib in essentially the same way without an upstream, thanks to the plugin system. The only difference is that Jelly would be included by default with RDFLib.

Could you then leave a comment in RDFLib/rdflib#3349 to let us know how we should approach this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants