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

BF: Remove imports of datalad.metadata #240

Closed mslw closed 1 year ago

mslw commented 1 year ago

The datalad.metadata module was removed from DataLad 0.18 and added to MetaLad 0.4.6. It was imported only once in the catalog codebase (and only to get a single constant). Switching the import will restore compatibility with datalad 0.18.

This also bumps the required patch version of Metalad.

Fixes #238 and should resolve #239.

Note, there are still two matches within the catalog module:

❱ git grep datalad.metadata
extractors/datacite_gin.py:lgr = logging.getLogger("datalad.metadata.extractors.datacite_gin")
workflows.py:    return _describe_metadata_elements("datalad.metadata.extractors")

The second is I think OK, as it refers to entry point name. Not sure about the first, whether the logger should be renamed to datalad.catalog.extractors.datacite_gin or whether it's desirable to keep it. I kept it.

jsheunis commented 1 year ago

Thanks for picking this up @mslw

Not sure about the first, whether the logger should be renamed to datalad.catalog.extractors.datacite_gin or whether it's desirable to keep it. I kept it.

I am not sure about "desirable", but I basically just copied the approach in the studyminimeta extractor. Either way is probably fine. So I think we can leave it until there some reason that it should definitely be changed.