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

Doi2cff fails for any DOI I tried #10

Open
tillea opened this issue Jun 25, 2019 · 5 comments
Open

Doi2cff fails for any DOI I tried #10

tillea opened this issue Jun 25, 2019 · 5 comments

Comments

@tillea
Copy link

tillea commented Jun 25, 2019

  • DOI 2 cff version: 1.0.0
  • Python version: 3.7.3
  • Operating System: Debian Buster

Description

I'm trying to build a Debian package from doi2cff. The usage example

doi2cff init https://doi.org/10.5281/zenodo.1149011

works. However, if I try random other DOIs I get:

$ doi2cff init https://doi.org/10.1186/1471-2105-13-187
Traceback (most recent call last):
  File "/usr/bin/doi2cff", line 11, in <module>
    load_entry_point('doi2cff==1.0.0', 'console_scripts', 'doi2cff')()
  File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/doi2cff/cli.py", line 54, in init
    raise NotImplemented('Unable to process doi, converter not implemented')
TypeError: 'NotImplementedType' object is not callable

Same happens for

doi2cff init https://doi.org/10.1093/bioinformatics/btp347
doi2cff init https://doi.org/10.1099/mgen.0.000131
doi2cff init https://doi.org/10.1093/bioinformatics/btr703

Any idea what might went wrong for these DOIs?

Kind regards, Andreas.

@jspaaks
Copy link
Member

jspaaks commented Jun 25, 2019

Hi Andreas,
Thanks for your comment. I think I remember that doi2cff only covers zenodo dois ( or maybe even Zenodo software dois? Not sure). Also when looking at the specific error that indeed seems to be the cause.

When I do

doi2cff init https://doi.org/10.5281/zenodo.2609141

I get something that looks like valid CFF, based on the metadata from the corresponding Zenodo record.

Hope this helps,
-Jurriaan

@tillea
Copy link
Author

tillea commented Jun 25, 2019 via email

@jspaaks
Copy link
Member

jspaaks commented Jun 25, 2019

So the difference between dois from various sources is that they potentially have metadata in a different format, which doi2cff then must translate to CFF. Since we (the Netherlands eScience Center) use Zenodo to assign dois to releases of software that we create, @sverhoeven thought it useful to have a tool that helps people with creation of a CFF file based on whatever metadata can already be harvested from (in our case) Zenodo; with the option to extend the software for other sources/other doi issuers, like for example FigShare.

Note that the doi2cff workflow assumes that the metadata from Zenodo is good. And that is also its main problem, because the metadata is usually not good unless authors really make an effort, either by manually editing the metadata for their records, or as I myself tend to do, by including a .zenodo.json file in my repos (basically a way to tell Zenodo what you want the metadata to be).

Because of this, I personally prefer to have the reverse flow direction of information, so I use the following workflow:

  1. create a CITATION.cff by hand using cffinit
  2. use cffconvert to convert the CFF information to a .zenodo.json file (other formats are available as well)
  3. git add CITATION.cff .zenodo.json, commit and push to the repo
  4. use the github-zenodo integration to archive copies of my software releases: this way, whenever I push make a new release on github, I'll get a persistent identifier (doi) from Zenodo.

With this workflow, I get good metadata on Zenodo, I get a DOI, and I get CFF which is consistent with whatever the metadata is on Zenodo.

As for your question, Does this mean other dois then Zenodo will not supported?: if I may speak for @sverhoeven: we are not against creating/incorporating converters that convert from e.g FigShare dois to CFF, it's just that it is not near the top of our todo list. We'd welcome Pull Requests that extend or improve doi2cff's functionality, but note that this is generally only useful when you have a whole bunch of records for which the metadata is good, and for which you want to create CFF files.

@tillea
Copy link
Author

tillea commented Jun 25, 2019 via email

@astrochun
Copy link

It may be better to use the DataCite metadata as that would provide support for other data repositories (e.g. Figshare). But regarding journal article DOIs, this should be possible using the Crossref API.

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

No branches or pull requests

3 participants