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

doi prereserve_doi argument in deposit_new not respected #103

Open
collinschwantes opened this issue Aug 21, 2024 · 0 comments
Open

doi prereserve_doi argument in deposit_new not respected #103

collinschwantes opened this issue Aug 21, 2024 · 0 comments

Comments

@collinschwantes
Copy link

collinschwantes commented Aug 21, 2024

Deposit is given doi even if prereserve_doi is set to FALSE. Deposits made into the sandbox cannot be previewed because the doi is malformed.

library(deposits)

dotenv::load_dot_env()

metadata <- list (
  title = "Please no DOI",
  description = "This is the abstract",
  creator = list (list (name = "A. Person", orcid = "https://orcid.org/0000-0002-0872-9950"), list (name = "B. Person", orcid = "https://orcid.org/0000-0002-9882-941X")),
  subject = list(name = "hello",name = "world"),
  format = "dataset",
  created = "2024-08-01",
  license = "cc-by"
)

cli_test <- depositsClient$new (
  service = "zenodo",
  sandbox = TRUE,
  metadata = metadata
)

print(cli_test)

cli_test$metadata

cli_test$deposit_new(prereserve_doi = FALSE)

dir.create("data/beaver")

beaver1 |>
  write.csv(file = "data/beaver/beaver.csv")

cli_test$deposit_add_resource(path = "data/beaver")

cli_test$deposit_upload_file(path = "data/beaver")

When trying to preview the record in the sandbox I get:

Record saved with validation errors:
DOI: Wrong DOI 10.5281 prefix provided, it should be 10.5072 as defined in the rest client

Note that the doi prefix is correct for production zenodo.

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

1 participant