Skip to content

Use publication year in bib keys when updating arXiv entries to DOI#1062

Merged
pancetta merged 2 commits intobibtex-arxivbot-1057-22cf4bdfrom
copilot/sub-pr-1061
Mar 16, 2026
Merged

Use publication year in bib keys when updating arXiv entries to DOI#1062
pancetta merged 2 commits intobibtex-arxivbot-1057-22cf4bdfrom
copilot/sub-pr-1061

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

arxiv_to_publications_correct.py was keeping the original arXiv-era key (e.g., BossuytEtAl2023) when converting unpublished entries to DOI records, even when the publication year differed. Keys should reflect the actual publication year.

Script changes (bin/arxiv_to_publications_correct.py)

  • Generate the new key from DOI data (first author family name + publication year) instead of reusing the old arXiv key
  • After removing the old entry, check the remaining database for key conflicts and append letter suffixes (b, c, …) following the existing convention
  • Added .replace(" ", "_") on the generated key for consistency with issue_to_bibtex.py
# Before: always kept old arXiv key regardless of publication year
bib = "{".join([bType] + [','.join([id_db]+rest2)] + rest1[1:])

# After: uses DOI-derived key, with duplicate handling
remaining = db.get_entry_dict()
id_orig = id
letters = 'bcdefghijklmnopqrstuvwxyz'
i = 0
while id in remaining:
    id = id_orig + letters[i]
    i += 1
bib = "{".join([bType] + [','.join([id]+rest2)] + rest1[1:])

_bibliography/pint.bib — retroactive fixes for issue #1057 entries

Removed 4 duplicate old-key entries (new year-based keys already existed with identical DOI data):

Removed Kept
HeinzelreiterEtAl2024 HeinzelreiterEtAl2025
SterckEtAl2024 KrzysikEtAl2025b
AlexandersenEtAl2025 AlexandersenEtAl2026
DurastanteEtAl2025 DurastanteEtAl2026

Renamed 11 entries to match publication year:

Old key New key Note
BossuytEtAl2023 BossuytEtAl2025
DanieliEtAl2023 DanieliEtAl2025
AppelEtAl2024 AppelEtAl2025b AppelEtAl2025 taken by different paper
BonteEtAl2024 BonteEtAl2026
FreeseEtAl2024 FreeseEtAl2025
GattiglioEtAl2024 GattiglioEtAl2025b GattiglioEtAl2025 taken by different paper
GattiglioEtAl2024b GattiglioEtAl2024 Now sole Gattiglio 2024 entry
MardalEtAl2024 MardalEtAl2026
SelvamEtAl2024 ErmonEtAl2024 DOI first author is Ermon
EngwerEtAl2025 EngwerEtAl2026
HahnEtAl2025 HahnEtAl2026

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ys and fix pint.bib entries

Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com>
Copilot AI changed the title [WIP] [#1057] Update pint.bib keys for publication years Use publication year in bib keys when updating arXiv entries to DOI Mar 16, 2026
Copilot AI requested a review from pancetta March 16, 2026 06:08
@pancetta pancetta marked this pull request as ready for review March 16, 2026 06:09
@pancetta pancetta merged commit 63d7100 into bibtex-arxivbot-1057-22cf4bd Mar 16, 2026
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