Giter Site home page Giter Site logo

Comments (7)

baum314nk avatar baum314nk commented on June 1, 2024

I fixed this problem locally by modifying or adding the methods _evaluate_sparql_constraint & _validate_sparql_query of sparql_based_constraints.py and make_v_result_description, make_v_result_description & _format_sparql_based_result_message of constraint_component.py.

As I change the types of some parameters and return values, I'm not really sure that this workaround won't break some other things, but atm it works fine for me.
pySHACL_constrains_quickfix.zip

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

Hi @baum314nk
Thanks for opening this issue.
I had intended to implement this optional feature but never got around to it. There was always more important features to get working.

I will look at your patch to see if there is a way of easily integrating it into the rest of the codebase.
Thanks.

from pyshacl.

piyush69 avatar piyush69 commented on June 1, 2024

Hi, I would like to work on this issue. I'll work backward from the patch and try to make it work with the existing design structure.

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

@piyush69
That would be great, if you could make as few changes as possible to the existing code to reproduce the feature. Thanks for your help.

from pyshacl.

piyush69 avatar piyush69 commented on June 1, 2024

@ashleysommer, I've put in a PR (#50) for the same.
It makes the following changes:

  • add an optional function parameter bound_vars to some methods. It is None by default
  • add a function _format_sparql_based_result_message() in sparql_based_constraints.py to replace query variables with their corresponding values in the message

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

@piyush69
Thank you for your work on this.
I believe there is still one thing missing. I see it does inject the bound vars to the message in the descriptive output, but I think it also needs to inject the bound vars into the sh:message property (if it exists) in the validation report graph too.

from pyshacl.

ashleysommer avatar ashleysommer commented on June 1, 2024

Forgot to close this. Closed by #50.

from pyshacl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.