This repository has been archived by the owner on Jan 14, 2022. It is now read-only.
make dandiset.yaml a proper file in the archive + canonical source for dandiset metadata #491
Labels
severity-important
major effect on the usability of a package, without rendering it completely unusable to everyone
I have voiced that opinion before and feel increasingly strong about it to give it a priority (thus a label):
let's discuss so either I am convinced that current implementation is indeed "a better way to go" or we introduce necessary changes before I breed more of "dandiset.yaml" specific code (e.g. within datalad crawler etc).
Giving
dandiset.yaml
special treatment alreadydandi-cli
code fordownload
/upload
operationsdandiset.yaml
)dandiset.yaml
file more tricky/different than from the rest of the filesAs long as "dandiset metadata" is intended to be downloaded/instantiated as
dandiset.yaml
locally, I really do not see whydandiset.yaml
needs any special treatment: in similar fashion we do have metadata extracted and uploaded for each file. The same situation withdandiset.yaml
, just that metadata is not be assigned intodandiset.yaml
's Item on girder but into a corresponding folder. Thus, as part of the change, I would have even went forward and left "folder" metadata untouched -- metadata could be loaded fromdandiset.yaml
item (file) metadata with the same success/little of changes even now AFAIK. That would result in a paradigm (consistent between dandi backend and local instances) thatdandiset.yaml
is the canonical source of metadata for the dandiset.NB I am keeping any "stats" away from the picture ATM
If dandiset metadata record is edited in web ui: save a new copy of the
dandiset.yaml
upon "Save" and a copy metadata into metadata record (or just usedandi-cli
to upload it ;))Sounds like a burden for web ui ATM. But in the longer run: since we are working on API, I think it should be just a matter of API providing an endpoint to "set metadata for a dandiset", and doing necessary update to
dandiset.yaml
at that single point (upload
of adandiset.yaml
would need to set metadata as for any other file - similar procedure, just different type of metadata record).Alternatively we could even: do not bother providing API for setting dandiset metadata record, and just rely on upload of a new
dandiset.yaml
.For
upload
(PUT and asset) -- as for any other (file) upload operation, API backend should ensure that there is an updated metadata record uploaded with a file, and if not discard that upload with some error. So again, situation is the same betweendandiset.yaml
and any other file.If such "non-special" treatment within API is introduced then
dandi-cli
then could remove custom code for bothdownload
andupload
operations entirely. Any other client which would work without API would not need any special code to "instantiate" a local copy ofdandiset.yaml
-- it would be just yet another asset it would download, etc.The text was updated successfully, but these errors were encountered: