summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-12-17 22:35:57 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-12-17 23:03:08 -0800
commit5c08b407f679674912605d1cece72f916370fe7a (patch)
tree0b0f46db75beda61e515622dda5a7a6d1cc8cfe6 /python/fatcat_tools
parent256130846a27d55009acc9ea337a0f53f337ffdd (diff)
downloadfatcat-5c08b407f679674912605d1cece72f916370fe7a.tar.gz
fatcat-5c08b407f679674912605d1cece72f916370fe7a.zip
dblp: flesh out update code path (especially to add container_id linkage)
Diffstat (limited to 'python/fatcat_tools')
-rw-r--r--python/fatcat_tools/importers/dblp_release.py8
1 files changed, 6 insertions, 2 deletions
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