hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Having publications (identifiers) in CITATION.cff leads to errors at deposit stage

Open kostrzewa opened this issue 1 year ago • 4 comments

We (https://github.com/etmc/tmLQCD) would like to list a number of relevant publications in our CITATION.cff:

identifiers:
  - type: "doi"
    value: "10.1016/j.cpc.2009.05.016"
    description: >-
      tmLQCD: A Program suite to simulate Wilson Twisted
      mass Lattice QCD
  - type: "doi"
    value: "10.22323/1.187.0416"
    description: "Experiences with OpenMP in tmLQCD"
  - type: "doi"
    value: "10.22323/1.187.0414"
    description: "Recent developments in the tmLQCD software suite"
  - type: "doi"
    value: "10.1016/j.cpc.2018.10.013"
    description: "Multigrid approach in shifted linear systems for the non-degenerated twisted mass operator"
  - type: "doi"
    value: "10.1103/PhysRevD.94.114509"
    description: "Adaptive aggregation-based domain decomposition multigrid for twisted mass fermions"
  - type: "doi"
    value: "10.22323/1.430.0340"
    description: "Twisted mass ensemble generation on GPU machines"

These would ideally somehow show up in the Zenodo record. Unfortunately, having them in there leads to errors at the deposit stage (extracted from the github workflow which I've set up based on the template workflow):

Run hermes deposit --initial -O invenio_rdm.auth_token  ***  --file src.zip --file doc/main.pdf
  hermes deposit --initial -O invenio_rdm.auth_token  ***  --file src.zip --file doc/main.pdf
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.10.13/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.13/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.13/x64/lib
  
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.13/x64/bin/hermes", line 8, in <module>
Namespace(subcommand='deposit', path=PosixPath('.'), config=PosixPath('hermes.toml'), options=[['invenio_rdm.auth_token', '***']], file=[['src.zip'], ['doc/main.pdf']], initial=True, command=<hermes.commands.deposit.base.HermesDepositCommand object at 0x7f67c656c970>)
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/cli.py", line 61, in main
    args.command(args)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/deposit/base.py", line 142, in __call__
    plugin_func(self)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/deposit/base.py", line 38, in __call__
    self.prepare()
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/deposit/invenio.py", line 300, in prepare
    rec_id, rec_meta = self.resolver.resolve_latest_id(
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/deposit/invenio.py", line 139, in resolve_latest_id
    record_id = self.resolve_doi(doi)
  File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/hermes/commands/deposit/invenio.py", line 163, in resolve_doi
    raise ValueError(f"{res.url} is not on configured host {self.client.site_url}.")
ValueError: https://linkinghub.elsevier.com/retrieve/pii/S0010465509001647 is not on configured host https://sandbox.zenodo.org./

The URL https://linkinghub.elsevier.com/retrieve/pii/S0010465509001647 is related to the first publication listed in the CITATION.cff above.

Any ideas?

kostrzewa avatar Mar 08 '24 19:03 kostrzewa

The full CITATION.cff is this one: https://github.com/etmc/tmLQCD/blob/zenodo/CITATION.cff where you will find (line 117) that I've commented out the publications because of the above error.

kostrzewa avatar Mar 11 '24 10:03 kostrzewa

An appropriate place for the additional identifiers would be "Related works" in the Zenodo record

kostrzewa avatar Mar 11 '24 10:03 kostrzewa

I guess we should probably add these additional identifiers as "references".

kostrzewa avatar Mar 11 '24 14:03 kostrzewa

First of all, thank you for considering Hermes and also for the valuable feedback.

Yes, the identifiers key is meant for different identifiers that reference the Software itself. I'm not sure whether the references is already mapped to the correct Zenodo metadata field, but I'll keep this issue open until I checked (and maybe even implemented) it.

led02 avatar Mar 15 '24 13:03 led02