-
Notifications
You must be signed in to change notification settings - Fork 7
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
Verify via tool #92
base: develop
Are you sure you want to change the base?
Verify via tool #92
Conversation
@pwin This has not been tested at all. It's just an outline of an approach. It needs to be tested, unit tests should be written, and documentation needs to be updated. Feel free to ping me for reviews, etc. |
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.
@pwin Other than the small nits I mentioned, the only thing remaining is documentation. Do you want to take a swing at it, perhaps including your working Jena use case as an example? Then we can bump up the version and put this one to rest.
onto_tool/bundle_schema.yaml
Outdated
required: | ||
- tool | ||
- source | ||
#- shapes |
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.
@pwin we should remove this rather than commenting it out.
onto_tool/onto_tool.py
Outdated
exc_type, exc_value, exc_traceback = sys.exc_info() | ||
traceback.print_tb(exc_traceback, limit=30, file=sys.stdout) | ||
print(exc_value, file=sys.stdout) | ||
print(exc_type, file=sys.stdout) | ||
sys.exit() |
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 don't think we need to print the traceback (which should be for internal failures) - if the user provided a bad path for a tool, that should be reported as a regular issue, using logging.error()
, we should not have print()
statements in the code. Also, a sys.exit(1)
should be used to indicate an error termination.
errors = [validation_graph.subjects(RDF.type, sh.ValidationResult)] | ||
assert len(errors) == 1 | ||
|
||
@pytest.mark.skipif(sys.platform == 'win32', reason="No /bin/cp") |
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.
@pytest.mark.skipif(sys.platform == 'win32', reason="No /bin/cp") | |
@pytest.mark.skipif(sys.platform == 'win32', reason="No /bin/cat") |
…f the validator is given in YAML as the variable 'EUValidatorOutputFile'
…t the application was launched from
@@ -1181,7 +1183,7 @@ def format_value(v): | |||
# Extend the width of each column to contain the longest value. | |||
max_length = [max(a, b) for a, b in zip(max_length, [len(s) for s in as_text])] | |||
rows.append(as_text) | |||
row_format = " ".join(f"{{:{length}.{length}}}" for length in max_length) + "\n" | |||
row_format = "||" + "| ".join(f"{{:{length}.{length}}}" for length in max_length) + "||\n" | |||
rows.sort(key=lambda x: x[0]) |
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.
@pwin Could this sort
be the reason your ORDER BY
didn't work for the table?
Aha.... Perhaps.
I'll dig tomorrow
…On Mon, 29 Nov 2021, 22:01 Boris Pelakh, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In onto_tool/onto_tool.py
<#92 (comment)>
:
> @@ -1181,7 +1183,7 @@ def format_value(v):
# Extend the width of each column to contain the longest value.
max_length = [max(a, b) for a, b in zip(max_length, [len(s) for s in as_text])]
rows.append(as_text)
- row_format = " ".join(f"{{:{length}.{length}}}" for length in max_length) + "\n"
+ row_format = "||" + "| ".join(f"{{:{length}.{length}}}" for length in max_length) + "||\n"
rows.sort(key=lambda x: x[0])
@pwin <https://github.com/pwin> Could this sort be the reason your ORDER
BY didn't work for the table?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#92 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIFYTELLAKVXNFLOYFFOS3UOPZ43ANCNFSM5IEMP66A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
…- it now can return the validation report on stdout
No description provided.