Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Library Usage #118
Library Usage #118
Changes from 11 commits
2df147a
f485161
b509dc5
8c40df1
f6d48e2
2d3a65b
bfe9992
86ed417
40be311
ae5f077
97d7fbb
64bd95c
4208a99
73e4683
d41a418
8f957dc
6f9b6c9
00f1360
15f00c9
eccaad4
90f5c8c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
For our awareness, this is a narrower argument than the first argument of
pyshacl.validate
; here's today's definition:https://github.com/RDFLib/pySHACL/blob/v0.23.0/pyshacl/validate.py#L369-L370
pyshacl.validate
's first argument seems to permit a string to be a file path or URL, OR a full string dump of a graph. See these lines for heuristics inpyshacl.rdfutil.load.load_from_graph
:https://github.com/RDFLib/pySHACL/blob/v0.23.0/pyshacl/rdfutil/load.py#L222-L227
Should we implement "
str
means path" now, or just adopt theload_from_graph
usage now from these lines:https://github.com/RDFLib/pySHACL/blob/v0.23.0/pyshacl/validate.py#L424-L428
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.
Welp, I found an issue pushing us towards expanding
input_file
fromstr
.case_validate
is written to take multiple input files as data graphs (as well as multiple input files as ontology graphs). I believe this behavior should be preserved, because otherwise a user that needs to read two data graphs at once needs to do some intermediary graph compilation before callingcase_validate
.So, I think the first argument needs to become at least either
Union[str, List[str]]
orUnion[str, Graph]
. The current code path from the CLI entry point I think favorsUnion[str, List[str]]
.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 believe this is addressed in
15f00c9
.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 think this call needs to be replaced with the
validate()
method this PR is adding to this file, but only after logistics related to #123 are settled.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 believe this is addressed in
15f00c9
.