Skip to content

fix: recognize valid PMID and legacy arXiv identifiers - #118

Merged
njzjz merged 2 commits into
njzjz:masterfrom
njzjz-bot:agent/fix-112-identifier-detection
Aug 16, 2026
Merged

fix: recognize valid PMID and legacy arXiv identifiers#118
njzjz merged 2 commits into
njzjz:masterfrom
njzjz-bot:agent/fix-112-identifier-detection

Conversation

@njzjz-bot

Copy link
Copy Markdown
Contributor

Summary

  • accept historical 1–8 digit PMIDs
  • support legacy arXiv identifiers and version suffixes
  • require full identifier matches so trailing junk is rejected
  • add regression tests for valid and malformed identifier forms

Root cause

Identifier detection used an exact 8-digit PMID regex, only supported the modern arXiv format, and called match() rather than fullmatch().

Validation

Added focused unit coverage in tests/test_identifier.py. Full repository CI should run on this PR.

Fixes #112

Agent: ChatGPT
Model: GPT-5.6 Sol

Use full identifier matching, accept historical short PMIDs, and support legacy arXiv identifiers.

Agent: ChatGPT
Model: GPT-5.6 Sol
Add regression coverage for short PMIDs, legacy/versioned arXiv IDs, and trailing junk.

Agent: ChatGPT
Model: GPT-5.6 Sol
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.41%. Comparing base (079b00e) to head (fe18b04).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #118   +/-   ##
=======================================
  Coverage   94.41%   94.41%           
=======================================
  Files          15       15           
  Lines         949      949           
=======================================
  Hits          896      896           
  Misses         53       53           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@njzjz
njzjz marked this pull request as ready for review August 16, 2026 12:28
Copilot AI lite review requested due to automatic review settings August 16, 2026 12:28

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.

@njzjz
njzjz merged commit 891cd18 into njzjz:master Aug 16, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Identifier detection rejects valid short PMIDs and legacy arXiv IDs

3 participants