-
Notifications
You must be signed in to change notification settings - Fork 33
ENH: Machine-readable validate output with store/reload #1822
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
base: master
Are you sure you want to change the base?
Changes from all commits
8c6ee45
3ab4741
7f80ca2
ddd5c3e
c962bf1
af45790
9db6f30
2128a86
d400cfd
8843d80
69a554c
cabefcf
adacc06
1100de5
2ddd5d4
efe6ec1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -96,15 +96,21 @@ def upload( | |
| can point to specific files you would like to validate and have uploaded. | ||
| """ | ||
| # Avoid heavy imports by importing with function: | ||
| from ..upload import upload | ||
| from ..upload import upload as upload_ | ||
| from ..validate.io import validation_sidecar_path | ||
|
|
||
| if jobs_pair is None: | ||
| jobs = None | ||
| jobs_per_file = None | ||
| else: | ||
| jobs, jobs_per_file = jobs_pair | ||
|
|
||
| upload( | ||
| sidecar = None | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IDK about referring to this as a 'sidecar' since that could get confusing with BIDS language What is meant is, specifically, might be 'persistent file recording the validation results of this Dandiset'? Even referring to it as a 'log' could get confusing with our own log file terminology (as in, the ones that contain runtime errors rather than validations)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. indeed there is a clash with "sidecar" in BIDS but overall it is the same meaning, just rarely used outside of BIDS. ... but here we could just call it as for the helper , ATM no critically better name instead of current note that the validation log is not necessarily of a dandiset -- could be of nwb files AFAIK, or potentially multiple dandisets... in this case what matters is that it is associated with the same run for which there is a log. |
||
| ctx = click.get_current_context() | ||
| if ctx.obj is not None: | ||
| sidecar = validation_sidecar_path(ctx.obj.logfile) | ||
|
|
||
| upload_( | ||
| paths, | ||
| existing=existing, | ||
| validation=validation, | ||
|
|
@@ -115,4 +121,5 @@ def upload( | |
| jobs=jobs, | ||
| jobs_per_file=jobs_per_file, | ||
| sync=sync, | ||
| validation_log_path=sidecar, | ||
| ) | ||
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 is better of course than clobbering the namespace, but in the long term a better name that distinguishes API vs CLI functions (with CLI usually marked private since it is odd to expose them to library) is still preferred
Which would be a breaking change, not saying do it here, just thinking out loud
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.
yeah -- typically we just clobbered click's interfaces (sorry didn't interleave... but at least manually pruned some unrelated)
but frankly and unfortunately here it doesn't matter much since those
clickfunctions are not usable as python interfaces! I wish it was otherwise. So, no point of giving them any special names really.Uh oh!
There was an error while loading. Please reload this page.
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.
How do you mean? Any other library can import them and manipulate the click groups; sometimes that might even be intentional, but I don't think so here