diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-12-09 01:42:16 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-12-09 01:42:16 +0100 |
commit | 4b5d71b8ca085c102fff1cf6629fa58582873d27 (patch) | |
tree | 982b306b9a4a1230f51c11d27b3a18a37716937b /fuzzycat/verify.py | |
parent | 26c71fe52d4cabc3cca8b29f6fa3d99c66e5f912 (diff) | |
download | fuzzycat-4b5d71b8ca085c102fff1cf6629fa58582873d27.tar.gz fuzzycat-4b5d71b8ca085c102fff1cf6629fa58582873d27.zip |
add another case
Diffstat (limited to 'fuzzycat/verify.py')
-rw-r--r-- | fuzzycat/verify.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py index e945a15..dd2ced8 100644 --- a/fuzzycat/verify.py +++ b/fuzzycat/verify.py @@ -437,6 +437,20 @@ def compare(a, b): (dict_key_exists(b, "ext_ids.pmid") and not dict_key_exists(b, "ext_ids.doi"))): return (Status.STRONG, OK.PMID_DOI_PAIR) + # Publication from same publisher and different DOI or year a probably + # different. + try: + a_container_id = glom(a, "container_id") + b_container_id = glom(b, "container_id") + a_doi = glom(a, "ext_ids.doi") + b_doi = glom(b, "ext_ids.doi") + + if a_container_id == b_container_id and a_doi != b_doi and not has_doi_prefix( + a_doi, "10.1126"): + return (Status.DIFFERENT, Miss.SHARED_DOI_PREFIX) + except PathAccessError: + pass + if a_authors and len(a_slug_authors & b_slug_authors) == 0: # Before we bail out, run an authors similarity check. TODO: This is # not the right place, but lives here now, since these cases popped up |