-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: SPARQL resource shape lookup #139
Conversation
🦋 Changeset detectedLatest commit: 5495078 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 |
?subject ?property ?object . | ||
} | ||
|
||
VALUES ?resource { sh:this } |
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.
I was surprised to find that this VALUES
only work inside the query and not outside. Thus, the sh:this
is replaced with the request URL
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.
indeed, the query looks non-trivial, and I'm a bit concerned about its speed with large APIs. What about getting rid of VALUES
and placing sh:this
directly in all the needed places?
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.
Since it's doing replacement, might also do it that way.
Let's address this when it becomes a problem.
@@ -0,0 +1,95 @@ | |||
import type * as Oxigraph from 'oxigraph' |
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.
This modules exports im-memory oxigraph wrapped to match the interface of sparql-http-client
describe('lib/resourceShape', () => { | ||
let options: KopflosConfig | ||
|
||
beforeEach(createStore(import.meta.url, { format: 'trig' })) |
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.
Loads RDF from resourceShape.test.ts.trig
and sets mocha graph
and store
properties to the mocha context.
The contents of the store/graph will be taken from a graph constructed from the test describe/context
titles
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## core-handler #139 +/- ##
=================================================
+ Coverage 0 88.52% +88.52%
=================================================
Files 0 11 +11
Lines 0 392 +392
Branches 0 26 +26
=================================================
+ Hits 0 347 +347
- Misses 0 45 +45 ☔ View full report in Codecov by Sentry. |
Docs PR: zazuko/data-centric.zazuko.com#28