datalad / datalad-catalog

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

ENH: update core translator to grab directory name from dataset path #275

Closed jsheunis closed 3 months ago

jsheunis commented 1 year ago

Comment taken partially from https://github.com/datalad/datalad-metalad/issues/373:

Oftentimes, metalad_core is the only extractor I'll use to generate a catalog entry. And from [the current] information it is not possible to derive a useful dataset name. .. In the absence of any extra metadata (e.g. from metalad_studyminimeta), IMO the most likely candidate for a dataset name would be the directory name in the path. So if the path is inside the metadata record, the catalog translator could use that to populate a name field.

Once https://github.com/datalad/datalad-metalad/pull/375 is merged, the corresponding translator in core should be updated to get the directory name and populate the name field in the catalog schema with it.