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

fix: check if fields present in author before adding mention #1209

Merged
merged 1 commit into from
May 27, 2024

Conversation

ewan-escience
Copy link
Collaborator

Prevent undefined authors in mentions

Changes proposed in this pull request:

  • Prevent Crossref mentions form having undefined authors by checking if the fields are present first
  • Try to use the name field if either given or family is missing
  • Apply the same logic to the Crossref scraper

How to test:

  • docker compose down --volumes && docker compose build --parallel && docker compose up --scale data-generation=0
  • Create some page, add a mention with DOI 10.1103/physrevd.108.072003
  • Check the last author, this should be ATLAS Collaboration
  • The words undefined or null should not be part of the authors
  • Run the mention scraper: docker compose exec scrapers java -cp /usr/myjava/scrapers.jar nl.esciencecenter.rsd.scraper.doi.MainMentions
  • The last author should be unchanged
  • The words undefined or null should not be part of the authors

Closes #1208

PR Checklist:

  • Increase version numbers in docker-compose.yml
  • Link to a GitHub issue
  • Update documentation
  • Tests

@ewan-escience ewan-escience self-assigned this May 27, 2024
Copy link

sonarcloud bot commented May 27, 2024

Copy link

sonarcloud bot commented May 27, 2024

Copy link
Contributor

@dmijatovic dmijatovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@ewan-escience ewan-escience merged commit 56a347b into main May 27, 2024
5 checks passed
@ewan-escience ewan-escience deleted the 1208-undefined-authors branch July 23, 2024 08:38
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

Successfully merging this pull request may close these issues.

Undefined authors are imported on some mentions
2 participants