Skip to content

Commit

Permalink
fix: remove the "DOI" from alternateIdentifiers
Browse files Browse the repository at this point in the history
It kinda historically dragged through time from the original
1056afb49fd945afc471e200d782bbff9de43cf1 in dandi-cli where it
was added to "identifiers".  As the wise @tmorell has mentioned,
since it is the datacite which is to provide DOI, it would ignore
DOI "alternateIdentifiers".  I think it makes sensse overall, although
there could potentially be multiple DOIs for a single dandiset -- nothing
in DOI principle forbids it. But since original purpose here is not
clear -- we better just strip it away since it should be the DOI
minted by datacite fabrica as the one for the PublishedDandiset
  • Loading branch information
yarikoptic committed Nov 20, 2024
1 parent ba9df7f commit c48079c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
5 changes: 0 additions & 5 deletions dandischema/datacite/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ def to_datacite(
attributes["event"] = "publish"

attributes["alternateIdentifiers"] = [
# TODO: the first element is ignored, not sure how to fix it...
{
"alternateIdentifier": f"https://doi.org/{meta.doi}",
"alternateIdentifierType": "DOI",
},
{
"alternateIdentifier": f"https://identifiers.org/{meta.id}",
"alternateIdentifierType": "URL",
Expand Down
7 changes: 0 additions & 7 deletions dandischema/datacite/tests/test_datacite.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,6 @@ def test_datacite_publish(metadata_basic: Dict[str, Any]) -> None:
],
"doi": f"10.80507/dandi.{dandi_id_noprefix}/{version}",
"alternateIdentifiers": [
{
"alternateIdentifier": (
f"https://doi.org/10.80507"
f"/dandi.{dandi_id_noprefix}/{version}"
),
"alternateIdentifierType": "DOI",
},
{
"alternateIdentifier": f"https://identifiers.org/{dandi_id}/{version}",
"alternateIdentifierType": "URL",
Expand Down

0 comments on commit c48079c

Please sign in to comment.