dandi / dandi/dandi-archive

Use settings.DANDI_DOI_API_PREFIX instead of 10.80507 in tests

Open
#472 1 comment 0 reactions 1 assignee Claimed by @asmacdo View on GitHub
DOI enhancement refactor tests
Dominant language
Python
Stars
26
Forks
21
Avg merge
5d 6h
Merged PRs (30d)
14

Description

Where does that hardcoded DOI prefix come from? Should it be parameterized somehow?

I realize this is a testing module, so maybe it doesn't matter here, but if this value corresponds to a production datacite instance or something like that, I wonder if it should be stored in and retrieved from an environment variable or something like that.

_Originally posted by @waxlamp in https://github.com/dandi/dandi-api/pull/467#discussion_r686293117_

`10.80507` is the test datacite ID for DANDI, which is what we should be using. It should be parameterized though instead of being hardcoded in tests everywhere.

I think we will need to add `DANDI_DOI_API_PREFIX=10.80507` to the test configuration as well.

However, it is very important that we don't specify all of the `DANDI_DOI_*` fields. If they are all present, a new draft DOI will be minted every time tox runs a publish test.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.