Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BF: Remove imports of datalad.metadata #240

Merged
merged 1 commit into from
Jan 23, 2023

Conversation

mslw
Copy link
Collaborator

@mslw mslw commented Jan 19, 2023

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.

The module datalad.metadata.definitions was removed from datalad 0.18
and added to metalad 0.4.6. Switching the import will restore
compatibility with datalad 0.18.

This bumps the required patch version of metalad.
@jsheunis
Copy link
Member

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.

@jsheunis jsheunis merged commit 06623fb into datalad:main Jan 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

started to fail testing in datalad-extensions Change imports of datalad.metadata (removed in DataLad 0.18)
2 participants