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

validate ORCID iDs #122

Open
atmodatcode opened this issue Apr 3, 2022 · 2 comments
Open

validate ORCID iDs #122

atmodatcode opened this issue Apr 3, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@atmodatcode
Copy link
Member

For future ATMODAT versions, we could consider checking if users correctly specified their ORCIDs, especially in the property creator_id.
This is how it should work.

import re
pattern = re.compile(r"^(https://orcid.org/[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{3}[0-9|X])+$")
orcid = "https://orcid.org/0000-0001-7057-194X"
bool(re.match(pattern, orcid)) # False if ORCID syntax is wrongly specified

@jkretz jkretz added the enhancement New feature or request label Apr 8, 2022
@jkretz
Copy link
Collaborator

jkretz commented Apr 8, 2022

Yes, we could relatively easily implement that. The only issue I see is that we need to know in advance in which global attributes an ORCID could be present. At the moment, we cannot run such a check over all global attributes.

@jkretz
Copy link
Collaborator

jkretz commented May 20, 2022

I set up the functionality for this check in the orcid_check branch. As long as it is not in the ATMODAT standard, I am not sure if we should merge it. To activate those checks, they have to be added to the atmodat_standard_checks.yml.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants