aboutsummaryrefslogtreecommitdiffstats
path: root/fuzzycat
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-11-19 03:26:55 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-11-19 03:26:55 +0100
commitc4d403f7f55ec0a9fee476dee637b8b44b7b7596 (patch)
tree4633feb305d7b56584e0c093233ec144cd1c52bd /fuzzycat
parentca0df663105335826d54baef8066f42a9d539961 (diff)
downloadfuzzycat-c4d403f7f55ec0a9fee476dee637b8b44b7b7596.tar.gz
fuzzycat-c4d403f7f55ec0a9fee476dee637b8b44b7b7596.zip
update notes
Diffstat (limited to 'fuzzycat')
-rw-r--r--fuzzycat/verify.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/fuzzycat/verify.py b/fuzzycat/verify.py
index 58fa0b8..88b7b71 100644
--- a/fuzzycat/verify.py
+++ b/fuzzycat/verify.py
@@ -182,6 +182,14 @@ def compare(a, b):
if re.match(r"appendix ?[^ ]*$", a.get("title", "").lower()):
return (Status.AMBIGUOUS, Miss.APPENDIX)
+ arxiv_id_a = a.get("ext_ids", {}).get("arxiv")
+ arxiv_id_b = b.get("ext_ids", {}).get("arxiv")
+ if arxiv_id_a and arxiv_id_b:
+ id_a, version_a = arxiv_id_a.split("v")
+ id_b, version_b = arxiv_id_b.split("v")
+ if id_a == id_b:
+ return (Status.STRONG, OK.ARXIV_VERSION)
+
if a.get("release_type") and b.get(
"release_type") and a.get("release_type") != b.get("release_type"):
return (Status.DIFFERENT, Miss.RELEASE_TYPE)
@@ -261,16 +269,6 @@ def compare(a, b):
if len(a_slug_authors & b_slug_authors) > 0:
return (Status.STRONG, OK.SLUG_TITLE_AUTHOR_MATCH)
- arxiv_id_a = a.get("ext_ids", {}).get("arxiv")
- arxiv_id_b = b.get("ext_ids", {}).get("arxiv")
- if arxiv_id_a and arxiv_id_b:
- id_a, version_a = arxiv_id_a.split("v")
- id_b, version_b = arxiv_id_b.split("v")
- if id_a == id_b:
- return (Status.STRONG, OK.ARXIV_VERSION)
- else:
- return (Status.DIFFERENT, Miss.ARXIV_VERSION)
-
if a_authors and len(a_slug_authors & b_slug_authors) == 0:
return (Status.DIFFERENT, Miss.CONTRIB_INTERSECTION_EMPTY)