DOI-USGS / meddle

Tools for metadata creation and data releases
Other
0 stars 10 forks source link

support multiple entities #36

Closed aappling-usgs closed 3 years ago

aappling-usgs commented 6 years ago

I have a zip file with several files inside, and I want to declare each file as a separate entity with its own list of attributes. I'm not sure how to do this and think I may need additional support to do it through meddle.

I see only one <eainfo> section in the FGCD template, so one necessary step is to make that section repeating.

In my own code, I tried to modify an attr.file to have a preliminary column called entity, then move toward adding additional entities to that table. But subsequent calls to attribute_skeleton gave

Warning messages:
1: In `[<-.data.frame`(`*tmp*`, j, , value = list(entity = "input.tsv",  :
  provided 7 variables to replace 6 variables

(where entity = "input.tsv" was that new 1st column that I added). We might prefer some other solution for multiple entities, but I thought putting all the entities together in a single table sounded like a good idea, and I'm finding that it won't be possible without changes to meddle.

jordansread commented 6 years ago

What kind of files are included in the zip? Do the files within have a subset of some complete number of attributes? If so, can you define all of the attributes and add some metadata saying that not all are included in every file?

aappling-usgs commented 6 years ago

They're all tsvs. I think it could be done in the short term by defining a single entity, yes. I just don't think it would be the cleanest, and I doubt this will be the only time we see this (I've seen similar needs and uses in metadata files I've reviewed). I think there's a reason the standard allows for multiple entities.

jordansread commented 3 years ago

This is supported now, perhaps from https://github.com/USGS-R/meddle/commit/af23ca4f50b61005104b307cbd91c398ab94cb97#diff-0ce1f0eb57892bfd6017a14996ecf82f23fed7cdc5176befe9f9d5a9c9055e0aR199 but I'm not exactly sure when this was solved.

The pattern shows up here in our release template