From 5c08b407f679674912605d1cece72f916370fe7a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 17 Dec 2020 22:35:57 -0800 Subject: dblp: flesh out update code path (especially to add container_id linkage) --- python/fatcat_tools/importers/dblp_release.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'python/fatcat_tools/importers') diff --git a/python/fatcat_tools/importers/dblp_release.py b/python/fatcat_tools/importers/dblp_release.py index 6cf7037b..9cebcdc2 100644 --- a/python/fatcat_tools/importers/dblp_release.py +++ b/python/fatcat_tools/importers/dblp_release.py @@ -338,15 +338,19 @@ class DblpReleaseImporter(EntityImporter): self.counts["exists-fuzzy"] += 1 return False - # create entity + # if no existing, then create entity if not existing: return True - # other logic could go here about skipping updates if not self.do_updates or existing.ext_ids.dblp: self.counts['exists'] += 1 return False + # logic for whether to do update or skip + if (existing.container_id and existing.release_type and existing.release_stage) or existing.ext_ids.arxiv_id: + self.counts['skip-update'] += 1 + return False + # fields to copy over for update # TODO: granular contrib metadata existing.contribs = existing.contribs or re.contribs -- cgit v1.2.3