summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/importers/ingest.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-11-15 16:49:21 -0800
committerBryan Newbold <bnewbold@robocracy.org>2019-11-15 16:51:55 -0800
commit4693394d69667570a81126ea727e9ad0ed8e1582 (patch)
tree9bd99a425bfc0b8cbc19617d045f26afac18402f /python/fatcat_tools/importers/ingest.py
parent24010700fcf9717d2166cdef319d4916d87529fb (diff)
downloadfatcat-4693394d69667570a81126ea727e9ad0ed8e1582.tar.gz
fatcat-4693394d69667570a81126ea727e9ad0ed8e1582.zip
project -> ingest_request_source
Diffstat (limited to 'python/fatcat_tools/importers/ingest.py')
-rw-r--r--python/fatcat_tools/importers/ingest.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/python/fatcat_tools/importers/ingest.py b/python/fatcat_tools/importers/ingest.py
index dbb8149e..12e14e52 100644
--- a/python/fatcat_tools/importers/ingest.py
+++ b/python/fatcat_tools/importers/ingest.py
@@ -28,8 +28,8 @@ class IngestFileResultImporter(EntityImporter):
print("Requiring GROBID status == 200")
else:
print("NOT checking GROBID success")
- #self.project_whitelist = ['fatcat-changelog']
- self.project_whitelist = []
+ self.ingest_request_source_whitelist = ['fatcat-changelog']
+ #self.ingest_request_source_whitelist = []
def want(self, row):
"""
@@ -49,8 +49,8 @@ class IngestFileResultImporter(EntityImporter):
if self.require_grobid and not row.get('grobid', {}).get('status_code') == 200:
self.counts['skip-grobid'] += 1
return False
- if self.project_whitelist and row.get('project') not in self.project_whitelist:
- self.counts['skip-project'] += 1
+ if self.ingest_request_source_whitelist and row.get('ingest_request_source') not in self.ingest_request_source_whitelist:
+ self.counts['skip-ingest_request_source'] += 1
return False
if row.get('hit') == True and row.get('file_meta'):
return True
@@ -122,10 +122,10 @@ class IngestFileResultImporter(EntityImporter):
)
if fatcat and fatcat.get('edit_extra'):
fe.edit_extra = fatcat['edit_extra']
- if request.get('project'):
+ if request.get('ingest_request_source'):
if not fe.edit_extra:
fe.edit_extra = dict()
- fe.edit_extra['project'] = request['project']
+ fe.edit_extra['ingest_request_source'] = request['ingest_request_source']
return fe
def try_update(self, fe):