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

Vocabularies: 'id' Field Requirement for Names Schema in InvenioRDM #2545

Closed
Samk13 opened this issue Dec 2, 2023 · 4 comments · Fixed by inveniosoftware/docs-invenio-rdm#597 · May be fixed by inveniosoftware/cookiecutter-invenio-rdm#274
Labels
bug Something isn't working

Comments

@Samk13
Copy link
Member

Samk13 commented Dec 2, 2023

Package version (if known): V12dev > 25

Describe the bug

The 'id' field requirement within the names schema in InvenioRDM is either an intentional change or a bug.
When manually adding names through instance setup or command line, these entries lack an 'id' field leading to validation error that was not the case before V12dev25.

The Question:

  • Should we update the requirement for an id field in the names schema so we update names ex: here and update the documentation here by adding their id fields

  • Or It's an oversight in handling vocabulary that needs correction.

Steps to Reproduce

1- on a fresh v12 latest using app_data/vocabularies/names.yaml

- affiliations:
  - name: University of Zurich
  - name: Humboldt University of Berlin
  - name: Kaiser Wilhelm Institute for Physics
  family_name: Einstein # <-- This will not be imported
  given_name: Albert
  identifiers:
  - identifier: gnd:118529579
    scheme: gnd
- affiliations:
  - name: University of Cambridge
  - name: California Institute of Technology
  - name: University of Oxford
  family_name: Hawking
  given_name: Stephen
  id: 0000-0002-9079-593X # <-- this will be imported
  identifiers:
  - identifier: https://orcid.org/0000-0002-9079-593X
    scheme: orcid

2- Import names using the command:
invenio vocabularies import --vocabulary names --filepath app_data/vocabularies-future.yaml

3- Observe the behavior: names with an 'id' field (e.g., Stephen Hawking) are imported, while those without an 'id' (e.g., Albert Einstein) are not with validation error.

Expected behavior

Names should be imported consistently, regardless of the presence of an 'id' field in the YAML file.

Screenshots (if applicable)

This is before and after adding idfield to each names vocabularies:
Screenshot 2023-12-02 152923

Additional context

This problem seems to have arisen in versions after V12dev25. specifically, after this big refactor:
inveniosoftware/invenio-vocabularies@ba8d3c6

I did not test other ways of importing names like ORCiD public dataset or other ways...

Copy link
Contributor

github-actions bot commented Feb 1, 2024

This issue was automatically marked as stale.

@github-actions github-actions bot added the stale No activity for more than 60 days. label Feb 1, 2024
@Samk13 Samk13 removed the stale No activity for more than 60 days. label Feb 1, 2024
@tmorrell
Copy link
Contributor

tmorrell commented Feb 5, 2024

I suspect this was an intended change, since previously it was difficult to figure out how to update name entries if multiple identifiers were present.

The update functionality still doesn't work from invenio vocabularies update, but I think that's a separate bug.

@Samk13
Copy link
Member Author

Samk13 commented Feb 6, 2024

@tmorrell Could you share the issue link for the invenio vocabularies update, or if it doesn't exist, could you create one for this matter on how to reproduce?

@tmorrell
Copy link
Contributor

tmorrell commented Feb 6, 2024

Just added the issue: inveniosoftware/invenio-vocabularies#292

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants