diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-12-09 23:11:43 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-12-09 23:11:43 +0100 |
commit | 1657965ce70a51532a3879dc4a7afed4ea076a8a (patch) | |
tree | 694d56e3484b520323bb25c9331e8a1a44dfcb08 /fuzzycat | |
parent | 7f81b1f2f1067b1835a4882f3ec8cf39fd9fb611 (diff) | |
download | fuzzycat-1657965ce70a51532a3879dc4a7afed4ea076a8a.tar.gz fuzzycat-1657965ce70a51532a3879dc4a7afed4ea076a8a.zip |
add a few more dummy cases
Diffstat (limited to 'fuzzycat')
-rw-r--r-- | fuzzycat/verify.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py index 4daed97..f4a5444 100644 --- a/fuzzycat/verify.py +++ b/fuzzycat/verify.py @@ -332,6 +332,15 @@ def compare(a, b): except PathAccessError: pass + try: + if glom(a, "extra.crossref.type") == "component" and glom(b, "extra.crossref.type"): + a_doi = glom(a, "ext_ids.doi") + b_doi = glom(b, "ext_ids.doi") + if a_doi != b_doi: + return (Status.DIFFERENT, Miss.COMPONENT) + except PathAccessError: + pass + # https://fatcat.wiki/release/knzhequchfcethcyyi3gsp5gry, some title contain newlines a_slug_title = slugify_string(a.get("title", "")).replace("\n", " ") b_slug_title = slugify_string(b.get("title", "")).replace("\n", " ") |