pooch icon indicating copy to clipboard operation
pooch copied to clipboard

Add support for DOI resolution for DataVerse repositories

Open dokempf opened this issue 2 years ago • 1 comments

Description of the desired feature:

I would like to add DOI handling support for data repositories based on DataVerse. My main motivation is that my institution offers a data archiving service based on DataVerse. I have done a previous first attempt which was based on generating registry and urls dictionaries in a wrapper around pooch.create. I have come to realize however that it would be a better fit to include this into pooch itself alongside the other DOI resolvers (plus I read that you are open to such contributions).

There is one technical difference between a DataVerse DOI converter compared to the existing ones: It cannot decide based on the URL whether it is a DataVerse repository, as institutions will typically run their own DataVerse instances (e.g. this at Heidelberg University). To account for this difference I think a refactoring of the existing DOI converter dispatch is required. I propose the following:

Current implementation: Converters are stored as a mapping of base URL to a function -> the base URL is determined -> the correct function is called. Converter functions return a URL.

Proposed implementation: Converters are stored as a list -> Converters are called one after another until one of them returned a URL, they return None otherwise. If no converter works, an error is thrown (similar to what is currently done). This can be seen as an implementation of the Chain of Responsibility Design Pattern.

Are you willing to help implement and maintain this feature?

I will be able to contribute the implementation of this feature. Given that I have a natural interest in the feature for supporting researchers at my institution, I will also be around for helping with maintenance.

dokempf avatar Jul 19 '22 08:07 dokempf

Sounds good to me @dokempf. It would be great to support more services and the implementation you laid out makes perfect sense.

leouieda avatar Jul 21 '22 23:07 leouieda