aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-06-02 00:32:21 -0700
committerBryan Newbold <bnewbold@archive.org>2021-06-02 00:38:51 -0700
commit58734fbe4121ed65c8ad8853acf8e7dd1780e9cf (patch)
tree05b642e71f50603acd21f37e60d4cc87b2de8723 /fatcat_scholar
parent621e58c701dabecb79386fb87ac58e4f91e56045 (diff)
downloadfatcat-scholar-58734fbe4121ed65c8ad8853acf8e7dd1780e9cf.tar.gz
fatcat-scholar-58734fbe4121ed65c8ad8853acf8e7dd1780e9cf.zip
refs: use fatcat prefix for some sources
This makes debugging what is going on much easier
Diffstat (limited to 'fatcat_scholar')
-rw-r--r--fatcat_scholar/transform.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/fatcat_scholar/transform.py b/fatcat_scholar/transform.py
index a8f6357..daccfd4 100644
--- a/fatcat_scholar/transform.py
+++ b/fatcat_scholar/transform.py
@@ -664,11 +664,11 @@ def refs_from_release_refs(release: ReleaseEntity) -> List[RefStructured]:
key = key[1:]
if release.extra and release.extra.get("pubmed"):
- ref_source = "pubmed"
+ ref_source = "fatcat-pubmed"
elif release.extra and release.extra.get("crossref"):
- ref_source = "crossref"
+ ref_source = "fatcat-crossref"
elif release.extra and release.extra.get("datacite"):
- ref_source = "datacite"
+ ref_source = "fatcat-datacite"
extra = ref.extra or dict()
authors = extra.get("authors") or []
@@ -812,14 +812,14 @@ def refs_from_heavy(heavy: IntermediateBundle) -> Sequence[RefStructured]:
if (
fatcat_refs
and crossref_refs
- and all([r.ref_source == "crossref" for r in fatcat_refs])
+ and all([r.ref_source in ["crossref", "fatcat-crossref"] for r in fatcat_refs])
):
# priorize recent crossref over old-fatcat-imported-from-crossref (?)
fatcat_refs = []
elif (
fatcat_refs
and fulltext_refs
- and all([r.ref_source == "grobid" for r in fatcat_refs])
+ and all([r.ref_source == ["grobid", "fatcat-grobid"] for r in fatcat_refs])
):
# prioritize newer GROBID fulltext extraction (?)
fatcat_refs = []