Skip to content

scripts for manual author page corrections with new library#7653

Open
nschneid wants to merge 12 commits intomasterfrom
manual-author-scripts
Open

scripts for manual author page corrections with new library#7653
nschneid wants to merge 12 commits intomasterfrom
manual-author-scripts

Conversation

@nschneid
Copy link
Collaborator

@nschneid nschneid commented Mar 2, 2026

This is a suite of scripts that I have been using for manual corrections to author page requests, complementing the bulk processing scripts in #7397 (author verifications) and #7517 (paper metadata). Manual scripts are run for individual changes specified as arguments. Bulk processing scripts query the GitHub issue tracker for relevant approved requests that can be processed automatically.

The manual scripts are in bin/correct, alongside the two bulk processing scripts. They are:

  • verify_author.py: The main one. Add ORCID/degree to verify an author; also allows merging additional unverified authors, or listing specific papers to link (or exclude from linking) to the author.
  • disable_name_matching.py: Updates existing verified authors to prevent implicit matching to papers.
  • unlink_items.py: Removes explicitly linked papers from a verified author.
  • [NEW] rename_person.py: Change an author ID.
  • [NEW] merge_verified.py: Merge multiple verified persons (WIP, awaiting library updates).

[A few of the non-covered operations: merging two verified authors (as sometimes happen with a legacy-verified and an ORCID-verified author); adding disambiguating comments to author entries; changing a verified author's canonical name; changing a verified author's ORCID-based suffix to a degree institution suffix with a redirect (if we want this; #7615).]

The code can be simplified when library changes in #7570 are merged.

@nschneid
Copy link
Collaborator Author

nschneid commented Mar 2, 2026

@mbollmann Any idea why black is failing? I am running black locally (version 24.3.0, black -t py312 verify_author.py) and it makes no changes.

@mbollmann
Copy link
Member

I strongly suggest going through pre-commit. It defines the correct black version (26.1.0) and config file.

@nschneid
Copy link
Collaborator Author

nschneid commented Mar 2, 2026

How does pre-commit work? I was relying on bin/requirements.txt for the black version.

@mbollmann
Copy link
Member

Just do pre-commit run to run it on staged changes, pre-commit run --all-files to run it on everything, or pre-commit install to run it on every commit automatically (aka the intended way).

Both black and the requirements.txt are going away in #7394 and this way you don’t need to think about tools or their versions at all.

@nschneid nschneid force-pushed the manual-author-scripts branch from ee32a30 to 54990ca Compare March 3, 2026 15:48
@nschneid
Copy link
Collaborator Author

nschneid commented Mar 3, 2026

OK, black is happy now. Not sure what's up with hugo....

@nschneid nschneid marked this pull request as ready for review March 3, 2026 16:16
@nschneid nschneid requested a review from mbollmann March 3, 2026 16:17
@github-actions
Copy link

github-actions bot commented Mar 3, 2026

Build successful. Some useful links:

This preview will be removed when the branch is merged.

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.

2 participants