-
Notifications
You must be signed in to change notification settings - Fork 25
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
upload doesn't seem to be checking for valid DANDI (when not BIDS) organization of files/assets #1163
Comments
Per our brief discussion and possibly with my biased view over the situation, the first step would be to add to At large it is the fact that asset path should conform to https://github.com/dandi/dandi-cli/blob/master/dandi/organize.py#L397 Assigning to @jwodder to make it woven it in current logic on deciding either it is within BIDS or DANDI layout. |
indeed, as a first pass a more generic regex would work and should be implemented. |
|
short answer: yes, for starters it would apply only to NWB files. Longer answer: eventually it should apply not only to .nwb files but also other data types, e.g. those video files we allow being referenced within NWB files and referencing in
in
so let's make it smth like
yes... FWIW - here is current ids we have for validation results (I am leaning toward standardizing them all to be upper case so there is no thought needed on how to case them). We might want to adjust them later as well in terms of names to make them more analogous across BIDS and DANDI❯ git grep "\<id=[\"']"
dandi/files/bases.py: id="dandischema.TODO",
dandi/files/bases.py: id="dandi.SOFTWARE_ERROR",
dandi/files/bases.py: id="dandischema.requred_field",
dandi/files/bases.py: id="dandischema.placeholder_value",
dandi/files/zarr.py: id="zarr.cannot_open",
dandi/files/zarr.py: id="zarr.empty_group",
dandi/files/zarr.py: id="zarr.tree_depth_exceeded",
dandi/pynwb_utils.py: id="pywnb.GENERIC",
dandi/validate.py: id="BIDS.NON_BIDS_PATH_PLACEHOLDER",
dandi/validate.py: id="BIDS.MANDATORY_FILE_MISSING_PLACEHOLDER",
dandi/validate.py: id="BIDS.MATCH",
so let's make 3 of them
above 3 ids
Let's add Scope
or folder if defined (not empty)
ok, but might later be all the files under folder for
short description of the error
parse similarly to how done for BIDS ones for
I think so although for |
I don't think that makes much sense, as that would really only be appropriate if validation was run on individual folders, yet it's instead run on files (and Dandisets & datasets as a whole).
The only BIDS validation result that sets |
@yarikoptic Problem: The |
The
yeap, because it was the only process which relied on regexes. If you rely on regexes -- here you can tell which regex was not matched.
up to you -- since we have |
@yarikoptic I'm unclear what you want the |
If you're referring to the Regardless, I think the simplest option is to use |
ok, don't set to anything for now -- it seems we have not described/formalized what kind of metadata we want to see there so to not confuse more (since we already have all kinds of metadata) -- omit setting that one.
that is ok, code which calls validation would know dandiset those assets belong to, right? so that code could set
good question. We did allow for use of |
The code isn't structured in a way to make that reasonable. All validation of an asset happens in the |
so here we go -- if there is no root - no need for this checks in the 'calling code'. If there is root -- do the checks and add that |
Add validation of filepaths for non-BIDS NWB assets
it seems that some aspects of dandiset naming/layout may be falling through the cracks. here is another example: https://dandiarchive.org/dandiset/000168/draft
as part of healthcheck if may be worthwhile considering if files should have a different name, but doesn't. this could capture a few things: 1) dandisets like this one, 2) dandisets that were uploaded in parts, and may need name resolution before upload.
The text was updated successfully, but these errors were encountered: