-
Notifications
You must be signed in to change notification settings - Fork 9
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
perf: alternative shape for lists #158
Conversation
🦋 Changeset detectedLatest commit: e3ce57c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
cc @Rdataflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test case with some broken lists
@giacomociti this allows to check very long lists 🎉 🎉 🎉 @tpluscode IIUC with this change we can bump the list length to ~ 5000 in cube-creator, correct? (... of course you'd add some CI tests to confirm it actually works as expected 👍) |
@giacomociti I observe some odd behaviour and results using barnard59 cube fetch-constraint --endpoint https:/test.lindas.admin.ch/query --cube https://energy.ld.admin.ch/elcom/electricityprice > constraint_test.ttl
barnard59 shacl validate --shapes validation/standalone-constraint-constraint.ttl < constraint_test.ttl | barnard59 shacl report-summary resulting in
while obviously the validation fails due to missing
thanks for having a look at this situation |
@Rdataflow the strange behavior disappears using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good here but we need to fix the out of place sh:details
...
sh:path qudt:unit ; | ||
sh:equals qudt:hasUnit ; | ||
] ; | ||
sh:or ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@giacomociti good catch - replace with sh:xone
💯
nb: see also #162 - introduces xone
in other situations
* switch to `xone` where appropriate * build(deps): bump express from 4.18.2 to 4.19.2 Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.19.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.18.2...4.19.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps-dev): bump undici from 5.28.3 to 5.28.4 Bumps [undici](https://github.com/nodejs/undici) from 5.28.3 to 5.28.4. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v5.28.3...v5.28.4) --- updated-dependencies: - dependency-name: undici dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * build(deps): bump tar from 6.2.0 to 6.2.1 Bumps [tar](https://github.com/isaacs/node-tar) from 6.2.0 to 6.2.1. - [Release notes](https://github.com/isaacs/node-tar/releases) - [Changelog](https://github.com/isaacs/node-tar/blob/main/CHANGELOG.md) - [Commits](isaacs/node-tar@v6.2.0...v6.2.1) --- updated-dependencies: - dependency-name: tar dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Create sour-cooks-cheer.md * test: update approved results * perf: alternative shape for lists (#158) * perf: alternative shape for lists * Create friendly-pumas-melt.md * test malformed lists * list validation: use xone * refactor: remove warning about valid `qudt:hasUnit` * adjust approval tests * fix typo --------- Co-authored-by: Tomasz Pluskiewicz <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Tomasz Pluskiewicz <[email protected]> Co-authored-by: Giacomo Citi <[email protected]>
for some reason, the current shapes for lists (and also those in shacl-shacl) cause perf issues to the shacl library, which fails with big lists (in the order of the thousands elements).
For example, using this constraint:
$ barnard59 cube fetch-constraint --endpoint https:/int.lindas.admin.ch/query --cube https://energy.ld.admin.ch/elcom/electricityprice > constraint.ttl
and trying to validate it:
barnard59 shacl validate --shapes validation/standalone-constraint-constraint.ttl < constraint.ttl
we get the error: Maximum call stack size exceeded.
The error disappears with the shapes proposed in this PR.
I wanted to add an approval test but I gave up because, besides the main meaningful validation messages, the report includes many confusing result details (the same happens also with the existing list shapes).
This is a simplified repro with an unexpected focusNode in the result, maybe related to a known issue