dandi / dandi/dandi-cli

Return/Add validation of dandiset.yaml upon upload?

Open
#1,427 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
28
Forks
37
Avg merge
1d 17h
Merged PRs (30d)
9

Description

prompted by @satra's question in
- https://github.com/dandi/dandi-schema/pull/235#issuecomment-2049261416

ATM:

- we do have ["# TODO: enable back validation of dandiset.yaml"](https://github.com/dandi/dandi-cli/blob/HEAD/dandi/upload.py#L258) which was added in 2020 https://github.com/dandi/dandi-cli/pull/242 when we disabled "upload" of dandiset.yaml
- in 2021 https://github.com/dandi/dandi-cli/pull/341 we added development option `--upload-dandiset-metadata` but we are not validating.

I think, indeed, we should re-approach validation of the dandiset.yaml here.

- we should add validation to `--upload-dandiset-metadata` option block with the same behavior as we have for assets in terms of `--validation` option.
- generally local `dandiset.yaml` might differ from the metadata record on the server.
- validating local one makes little sense unless it being uploaded (see above -- we will validate in that case)
- if we are not uploading it, we should validate/inform user about state of the remote/on the server dandiset.yaml (also subject to `--validation` option)
- I do not think we should preclude upload overall if dandiset metadata record is failing validation, as we do not preclude upload of an asset if some other asset is faulty.

WDYT @satra @jwodder ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.