Skip to content

report cited arXiv preprints that have since been published - #5722

Open
ayush1298 wants to merge 11 commits into
mainfrom
add_citation_update_test
Open

ayush1298 wants to merge 11 commits into
mainfrom
add_citation_update_test

Conversation

@ayush1298

@ayush1298 ayush1298 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

closes #5703

Adds a monthly check that lists works we cite as arXiv preprints that have since been published, and opens or updates an issue listing them.

  • scripts/tools/check_preprints.py: finds the citations that only cite arXiv (387 on main today) and looks them all up in one Semantic Scholar batch request. Preprints Semantic Scholar knows no published version of are also looked up in OpenAlex, since neither index links every preprint to its published version.
    • A DOI is reported only if Crossref holds it under the cited title, which rejects OpenAlex's wrong merges and conference-talk DOIs.
    • A venue without a DOI (e.g. ICLR, NeurIPS) is reported only if the titles match.
    • Links point to the DOI, the ACL Anthology, or Semantic Scholar, in that order.
    • It reuses citations() from check_citations.py and refaudit's Crossref and OpenAlex clients.
  • check_citations.py, citation_cache.json and citation_allowlist.json move from tests/test_validate_metadata/ to scripts/tools/, since they are scripts rather than pytest tests. The JSON files are moved unchanged. Both checks run as modules (python -m scripts.tools.check_citations).
  • citation_check.yml: new preprint-check and report-preprints jobs instead of a separate workflow. They run monthly and on manual trigger, never on PRs, and use the SEMANTIC_SCHOLAR_API_KEY secret. A separate job with issues: write opens or updates the issue.
  • scripts/tools/preprint_allowlist.json: citations that should stay on the preprint. It lists MS MARCO and Jina Embeddings 2.
  • pyproject.toml: refaudit moves from the test group to a new citations group (part of dev and the default groups), used by make citation-check, make preprint-check and the citation workflow.
  • make preprint-check runs the check locally.

A local run found about 210 published preprints. Their citations are updated in #5724.

Copilot AI balanced review requested due to automatic review settings October 20, 2026 04:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Samoed

Samoed commented Oct 20, 2026

Copy link
Copy Markdown
Member

A local run finds about 200 published preprints. Their citations will be updated in follow-up PRs.

I think better to update before pr

Comment thread scripts/tools/check_preprints.py
Comment thread .github/workflows/preprint_check.yml Outdated
@ayush1298

ayush1298 commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator Author

I think better to update before pr

open PR for this #5724

with:
name: preprints

- name: Open or update the issue

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

instead of making an issue should we instead make a PR?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I kept issue because there is some part which can be automated and some which cant:

  1. What it automates: for findings with a DOI or ACL Anthology id, it would fetch the BibTeX, keep each key, run the formatter and the citation check, and open a PR.
  2. What it can't automate: findings with only a venue (ICLR, NeurIPS). OpenReview and DBLP now block automated requests, so those would be listed in the PR description and we have to fix them again

So, I was leaning towards more on keeping issue, but will change to PR if you want

@emrehangorgec

Copy link
Copy Markdown
Contributor

Hi @ayush1298, would offline tests for check_preprints.py be useful here? I can cover arXiv DOI filtering, title mismatch rejection and API retry/error handling with mocked Semantic Scholar and Crossref responses, so the tests would run without API keys or network access.

@ayush1298

ayush1298 commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator Author

Hi @ayush1298, would offline tests for check_preprints.py be useful here? I can cover arXiv DOI filtering, title mismatch rejection and API retry/error handling with mocked Semantic Scholar and Crossref responses, so the tests would run without API keys or network access.

I dont think mock is required here, I have added some basic tests, but no HTTP call and use of API Key

Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
"tabulate>=0.9.0",
"bibtexparser>=2.0.0,<3.0.0", # used for tests/test_citation_formatting.py
"refaudit>=0.4.9", # used for tests/test_validate_metadata/check_citations.py
"refaudit>=0.4.9", # used for scripts/tools/check_citations.py and scripts/tools/check_preprints.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small note. Overall I think this is a good library, but I'm a bit afraid that it won't work after some time, because it have only one maintainer and not have any stars on github

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

check_citations.py uses most part of this library, maybe we can refactor it then if possible

Comment on lines +13 to +19
from scripts.tools.check_preprints import (
Version,
confirm,
parse_openalex_work,
parse_semantic_scholar_paper,
preprint_arxiv_id,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think that tests should import from scripts

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

where we should add it then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need tests for that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I guess not necessary, mostly those are sanity checks kind of tests

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I have remove the test file

This branch has not been deployed

No deployments
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.

Add test to check if preprint has been published and needs to be updated

5 participants