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

Yaml changes version string to integer/float -> deposit error #281

Open
SKernchen opened this issue Nov 18, 2024 · 1 comment
Open

Yaml changes version string to integer/float -> deposit error #281

SKernchen opened this issue Nov 18, 2024 · 1 comment
Labels
1️ harvesting The harvesting step in the workflow 4️ prepare/deposit The preparation/deposition step in the workflow bug Something isn't working Hackathon24 Issues that should be fixed in or until the Hackathon 24 (December)

Comments

@SKernchen
Copy link
Contributor

SKernchen commented Nov 18, 2024

At the HZDR Day we had a bug doing the deposit step. In the Cff the Version is given as an integer/float (from cff init). However in the deposit step the error occurs that
{"status": 400, "message": "A validation error occurred.", "errors": [{"field": "metadata.version", "messages": ["Not a valid string."]}]} .
It was solvable by putting the version in quotation marks.
Is that maybe changed in the newer cff version?
Should we make a workaround by changing the type in the harvest step?

@SKernchen SKernchen added bug Something isn't working 1️ harvesting The harvesting step in the workflow 4️ prepare/deposit The preparation/deposition step in the workflow Hackathon24 Issues that should be fixed in or until the Hackathon 24 (December) labels Nov 18, 2024
@zyzzyxdonta
Copy link
Contributor

zyzzyxdonta commented Nov 18, 2024

As far as I can tell, the version field in CITATION.cff is a string. But it is only parsed as a string by the yaml library if it has two dots in it, e.g. 0.1.0. If it has only one, it is parsed as a floating point number and without a dot as an integer. It's just one of the many problems with yaml.

We should update our examples and tutorials to correctly quote strings in the yaml files. There's probably a linter that can help with that. On the hermes side, I think adding an extra conversion to string won't hurt.

@SKernchen SKernchen changed the title Cff file deposit did not support integer Cff file deposit did not support integer/float Nov 18, 2024
@SKernchen SKernchen changed the title Cff file deposit did not support integer/float Yaml changes version string to integer/float -> deposit error Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1️ harvesting The harvesting step in the workflow 4️ prepare/deposit The preparation/deposition step in the workflow bug Something isn't working Hackathon24 Issues that should be fixed in or until the Hackathon 24 (December)
Projects
None yet
Development

No branches or pull requests

2 participants