datalad / datalad-catalog

Create a user-friendly data catalog from structured metadata
https://datalad-catalog.netlify.app
MIT License
14 stars 12 forks source link

Consider `catalog_add(notneeded)` results #313

Closed mih closed 1 month ago

mih commented 1 year ago

Adding the same record twice

❯ datalad catalog add -c cat-dir --metadata dsmeta.jsonl
catalog_add(ok): cat-dir [Metadata items successfully added to catalog]
❯ datalad catalog add -c cat-dir --metadata dsmeta.jsonl
catalog_add(ok): cat-dir [Metadata items successfully added to catalog]

works, does not create duplicate files.

it would make sense, if the second result is status=notneeded.

mih commented 1 year ago

Update: not quite true. Each call actually changes the content of the deposit (but not the filename). Sources of change:

jsheunis commented 1 year ago

Thanks for the detail, that will help when updating the results rendering of this command (and others). In https://github.com/datalad/datalad-catalog/pull/309 I'm busy with lots of refactoring, including improved results rendering.