BlueBrain / nexus-forge

Building and Using Knowledge Graphs made easy
https://nexus-forge.readthedocs.io
GNU Lesser General Public License v3.0
38 stars 19 forks source link

Increase evaluation path limit #356

Closed ssssarah closed 5 months ago

ssssarah commented 9 months ago

A bit ugly, but addresses https://bbpteam.epfl.ch/project/issues/browse/DKE-1238

Overrides the pyshacl Shape's validation method and increases the path length that triggers the Evaluation path too deep error

kgforge/specializations/models/rdf/shape_validate.py shape_validate is equivalent to its existing implementation except that on this line , the value 30 is replaced by 40

codecov-commenter commented 8 months ago

Codecov Report

Attention: 64 lines in your changes are missing coverage. Please review.

Comparison is base (2e616cd) 74.36% compared to head (6b11470) 73.95%.

Files Patch % Lines
...forge/specializations/models/rdf/shape_validate.py 55.86% 64 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #356 +/- ## ========================================== - Coverage 74.36% 73.95% -0.41% ========================================== Files 100 101 +1 Lines 6315 6463 +148 ========================================== + Hits 4696 4780 +84 - Misses 1619 1683 +64 ``` | [Flag](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/356/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/BlueBrain/nexus-forge/pull/356/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain) | `73.95% <56.75%> (-0.41%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=BlueBrain#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

ssssarah commented 7 months ago

I see only new lines, no changed or removed lines. How is the previous pyshacl Shape method not executed now?

line 30 of store_service.py, I override the validate function of Shape Shape.validate = shape_validate

lecriste commented 7 months ago

I see only new lines, no changed or removed lines. How is the previous pyshacl Shape method not executed now?

line 30 of store_service.py, I override the validate function of Shape Shape.validate = shape_validate

And where is Shape used?

ssssarah commented 5 months ago

Closed because another approach will be taken to fix this problem