ropenscilabs / deposits

R Client for access to multiple data repository services
https://docs.ropensci.org/deposits/
Other
37 stars 3 forks source link

Re-populating metadata field on retrieval of metadata-only deposits #65

Closed mpadge closed 1 year ago

mpadge commented 1 year ago

Clients currently work by accepting input metadata which is converted to DCMI-compliant format and stored in the client's "metadata" field. If a metadata-only deposit is then created via deposit_new(), then subsequent retrieval of that deposit will populate the "hostdata" field, but the original "metadata" field remains empty.

This "metadata" field could only be repopulated through either:

  1. Defining a system for reverse-translation from the JSON schemas for the hostdata to the DCMI schema; or
  2. Uploading by default a "datapackage.json" file with no resources, but with the DCMI metadata.

Advantage of 1

No "hidden" generation and uploading of files with deposits; metadata-only deposits would remain truly metadata-only.

Advantage of 2

Much simpler and less error-prone.


Since the main point of deposits from the outset is to support deposition of data files, and since those are always associated (by default) with "datapackage.json" files anyway, then Option 2 will be pursued here. Future adaptation to Option 1 will still remain possible if desired at a later stage.

mpadge commented 1 year ago

One big glitch: Figshare does not allow automated downloading of files from private deposits. That means no "datapackage.json" file would be able to be retreived for Figshare, and so Option 2 would not work there. Figshare is nevertheless not a primary focus at present, so this issue will still proceed as planned, but will then exclude figshare.

mpadge commented 1 year ago

Even better solution: Embed the DCMI JSON data in one of the host metadata parameters.

mpadge commented 1 year ago

Re-opening for one further improvement:

TODO