From 00a9297efaf948ab3f4dd435b8597fb3df74be80 Mon Sep 17 00:00:00 2001 From: Rob Svirskas Date: Wed, 7 Oct 2026 11:20:45 -0400 Subject: [PATCH] refactor(update_dois): drop the orphaned add_pmid function The last call to add_pmid went away in 53952c1 ("Removed PMID update", 2025-06-18), but the function itself stayed behind. Nothing has called it since, and nothing imports it. PMID population is not lost: sync_pmid_to_dois.py does that work with its own JRC.get_pmid call. The 'add_pmid' string in that file is a processing-event action label and is unrelated to this function. No behavior change. JRC and terminate_program, the two names the function used, are still used throughout the module. Co-Authored-By: Claude Opus 5 (1M context) --- sync/bin/update_dois.py | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/sync/bin/update_dois.py b/sync/bin/update_dois.py index ccec3348..8e412379 100644 --- a/sync/bin/update_dois.py +++ b/sync/bin/update_dois.py @@ -7,7 +7,7 @@ to DIS MongoDB. """ -__version__ = '22.7.0' +__version__ = '22.8.0' import argparse import collections @@ -905,24 +905,6 @@ def get_suporg_code(name): return None -def add_pmid(key, persist): - ''' Add the PMID to a DOI record - Keyword arguments: - key: DOI - persist: dict keyed by DOI with value of the Crossref/DataCite record - Returns: - None - ''' - try: - pmid = JRC.get_pmid(key) - except JRC.PMIDNotFound: - return - except Exception as err: - terminate_program(err) - if pmid: - persist[key]['jrc_pmid'] = pmid - - def get_tags(persist, rec): ''' Get tags and names from a DOI record Keyword arguments: