Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHACL Compact syntax #115

Open
mielvds opened this issue Jan 20, 2022 · 4 comments
Open

SHACL Compact syntax #115

mielvds opened this issue Jan 20, 2022 · 4 comments

Comments

@mielvds
Copy link

mielvds commented Jan 20, 2022

Hi all!

Any existing plans to support SHACL Compact syntax? I see there is an ANTLR grammar, but not sure how well that ports to Python.

@ashleysommer
Copy link
Collaborator

Hi @mielvds
I've looked at the possibility of adding SHACL compact syntax in the past, but its very low on the priority list.

Compact syntax is still a draft spec, and may not ever become official spec. I don't know of any other SHACL implementation that currently implements it besides TopBraid.

You are the first person to ask for this feature in PySHACL in the more than 3 years the project has existed, so from my point of view its not something many users are needing.

Having said that, I will ask around on the SHACL Discord Group to get a gauge of how others use SHACL Compact Syntax in the broader SHACL community.

@mielvds
Copy link
Author

mielvds commented Jan 24, 2022

Hi @mielvds I've looked at the possibility of adding SHACL compact syntax in the past, but its very low on the priority list.

Hi @ashleysommer
Thanks for responding

Compact syntax is still a draft spec, and may not ever become official spec. I don't know of any other SHACL implementation that currently implements it besides TopBraid.

Apache Jena does, but I also don't think it will ever be official (nor should it be; it is meant to transpile to SHACL)

You are the first person to ask for this feature in PySHACL in the more than 3 years the project has existed, so from my point of view its not something many users are needing.

A too bad. I find SHACL a lot of work to write manually, but it's probably not painful enough to make this worth the effort.
But if the effort would be ok...I'd support it. An an alternative would pyshacl allowing stdin so I can pipe from Jena (but probably then I would simply not use pyshacl).

Having said that, I will ask around on the SHACL Discord Group to get a gauge of how others use SHACL Compact Syntax in the broader SHACL community.

Thanks! I'm in the hroup as well, will follow up.

@ashleysommer
Copy link
Collaborator

ashleysommer commented Jan 25, 2022

@mielvds
I've just released a new version of PySHACL (v0.18.1) that supports reading from stdin for the SHACL shape file.
Let me know if that works for your use-case with Jena.

use it on the command line like:

#> jena-covert-tool myshapes.shc | pyshacl -s /dev/stdin -i rdfs mydata.ttl

or by convention, you can use "-" in place of /dev/stdin

#> jena-covert-tool myshapes.shc | pyshacl -s - -i rdfs mydata.ttl

@edmondchuc
Copy link
Collaborator

If there's interest, we can integrate the python shaclc parser and serializer into PySHACL.

Repo: https://github.com/edmondchuc/shaclc

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

No branches or pull requests

3 participants