From acfa266fd370d4c9401e31466aa09a82763ace27 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 10:22:43 +0000 Subject: [PATCH 1/2] Initial plan From 7fc3fc107353d32b00273f55c1a793eefde8d198 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 10:26:26 +0000 Subject: [PATCH 2/2] Fix arxiv_to_publications_correct.py: handle year mismatch between arXiv and publication IDs Co-authored-by: pancetta <7158893+pancetta@users.noreply.github.com> --- bin/arxiv_to_publications_correct.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/arxiv_to_publications_correct.py b/bin/arxiv_to_publications_correct.py index 682e835b..b0ebff05 100644 --- a/bin/arxiv_to_publications_correct.py +++ b/bin/arxiv_to_publications_correct.py @@ -36,15 +36,16 @@ id = data['author'][0]['family'] + 'EtAl' + str(data['issued']['date-parts'][0][0]) else: id = data['author'][0]['family'] + str(data['issued']['date-parts'][0][0]) - assert id == id_db, f"ID generated with new DOI ({id}) is different than the original in database ({id_db})" + if id != id_db: + print(f'Note: ID generated with new DOI ({id}) differs from the original in database ({id_db}). Keeping original ID.') entries = db.get_entry_dict() - assert entries[id]["ENTRYTYPE"] == 'unpublished', "original entry in bib file was NOT unpublished !" - db.entries.remove(entries[id]) + assert entries[id_db]["ENTRYTYPE"] == 'unpublished', "original entry in bib file was NOT unpublished !" + db.entries.remove(entries[id_db]) bType, *rest1 = bib.split("{") oldID, *rest2 = rest1[0].split(",") - bib = "{".join([bType] + [','.join([id]+rest2)] + rest1[1:]) + bib = "{".join([bType] + [','.join([id_db]+rest2)] + rest1[1:]) bib_db = bibtexparser.loads(bib) db.entries.extend(bib_db.get_entry_list())