From 62930065914d3d281094d0f9a7fe797922601f75 Mon Sep 17 00:00:00 2001 From: David Pape Date: Tue, 18 Aug 2026 19:06:55 +0200 Subject: [PATCH] Use HERMES' Zenodo concept DOI for "isCompiledBy" relations When depositing to Invenio- and InvenioRDM-based platforms, HERMES adds a "isCompiledBy" relation to the deposit metadata. This pull request updates the code to use HERMES' concept DOI (`10.5281/zenodo.13221383`) instead of the frequently out-of-date "current" DOI. While this makes the relation metadata slightly less helpful (e.g. we can't track any more which HERMES version introduced a potential issue in metadata generation), at least we don't use wrong version metadata for the depositions. Closes #487 This pull request also updates the "current" HERMES DOI to the latest published version 0.9.1. --- src/hermes/commands/deposit/invenio.py | 4 ++-- src/hermes/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hermes/commands/deposit/invenio.py b/src/hermes/commands/deposit/invenio.py index 7d8e4c0a..14957b0e 100644 --- a/src/hermes/commands/deposit/invenio.py +++ b/src/hermes/commands/deposit/invenio.py @@ -22,7 +22,7 @@ from hermes.error import MisconfigurationError from hermes.model.context import CodeMetaContext from hermes.model.path import ContextPath -from hermes.utils import hermes_doi, hermes_user_agent +from hermes.utils import hermes_concept_doi, hermes_user_agent _log = logging.getLogger("cli.deposit.invenio") @@ -385,7 +385,7 @@ def related_identifiers(self): """ return [ { - "identifier": hermes_doi, + "identifier": hermes_concept_doi, "relation": "isCompiledBy", "scheme": "doi", }, diff --git a/src/hermes/utils.py b/src/hermes/utils.py index d6464321..397fa451 100644 --- a/src/hermes/utils.py +++ b/src/hermes/utils.py @@ -40,7 +40,7 @@ def retrieve_project_urls(metadata_urls: list[str]) -> dict[str, str]: # Publication metadata # TODO: Fetch this from somewhere -hermes_doi = "10.5281/zenodo.14931650" # "10.5281/zenodo.13311079" for hermes v0.8.1 +hermes_doi = "10.5281/zenodo.21643617" # hermes 0.9.1 hermes_doi_url = "https://doi.org/10.5281/zenodo.14931650" hermes_concept_doi = "10.5281/zenodo.13221383" """Fix "concept" DOI that always refers to the newest version."""