aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-09 23:11:43 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-09 23:11:43 +0100
commit1657965ce70a51532a3879dc4a7afed4ea076a8a (patch)
tree694d56e3484b520323bb25c9331e8a1a44dfcb08
parent7f81b1f2f1067b1835a4882f3ec8cf39fd9fb611 (diff)
downloadfuzzycat-1657965ce70a51532a3879dc4a7afed4ea076a8a.tar.gz
fuzzycat-1657965ce70a51532a3879dc4a7afed4ea076a8a.zip
add a few more dummy cases
-rw-r--r--fuzzycat/verify.py9
-rw-r--r--notes/2020_11_testruns.md13
-rw-r--r--tests/data/release/eomug3y4afbynhcyzrtcvki55u20
-rw-r--r--tests/data/release/zcu2pugta5fttnqltgersan52q20
-rw-r--r--tests/data/verify.csv1
5 files changed, 63 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", " ")
diff --git a/notes/2020_11_testruns.md b/notes/2020_11_testruns.md
index 3ee4340..aa27be4 100644
--- a/notes/2020_11_testruns.md
+++ b/notes/2020_11_testruns.md
@@ -206,3 +206,16 @@ BSI, one is a subdocument of another. The subdocument has a subtitle. That's mor
* [ ] https://fatcat.wiki/release/3d73i34irjedjnhulyhmehnrvq https://fatcat.wiki/release/winjvljpu5al5deaz7v5qi7kta Status.AMBIGUOUS OK.DUMMY
* [ ] https://fatcat.wiki/release/jna6aodi2rfq7gwzxhb4s45kqy https://fatcat.wiki/release/3qst2qrdbvdhrdvu22kyqt22xy Status.AMBIGUOUS OK.DUMMY
+----
+
+* [ ] https://fatcat.wiki/release/eomug3y4afbynhcyzrtcvki55u https://fatcat.wiki/release/zcu2pugta5fttnqltgersan52q Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/5rcu6myqx5ezjjytzpvsauyut4 https://fatcat.wiki/release/zvsffdeufjb5dbchww7ydqdq3a Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/f5ebjc63j5dzpct5hsme5j3ote https://fatcat.wiki/release/zeoquc2f4nbmdbmbcbkmkxmtzi Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/cd5aik2whrd5jlvleyvdq6iwja https://fatcat.wiki/release/kfttghqcsbddvofqd7l4bhtavy Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/hwnqyz7n65eabhlivvkipkytji https://fatcat.wiki/release/cwqujxztefdghhssb7ysxj7b5m Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/yespzqkm2zed7n4vhjpkddap5e https://fatcat.wiki/release/5yixxzyl3vh4xd56lwcraowgty Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/47opwjqugjecjmiqgukahw6p2m https://fatcat.wiki/release/real7tmfxjan7j3fgkilt7fze4 Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/gaf7gjwetrbpzntrp4bt4nxaiy https://fatcat.wiki/release/htsa3mrirndbdjtdangr4mzrdu Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/pobnow7sxfhnxhltgwpru5k7oi https://fatcat.wiki/release/uplqxenmk5axjes6zokml6q73y Status.AMBIGUOUS OK.DUMMY
+* [ ] https://fatcat.wiki/release/tm3gaiumkvb3xc7t3i6suna6u4 https://fatcat.wiki/release/r6dj63wh3zcrrolisn6xuacnve Status.AMBIGUOUS OK.DUMMY
+
diff --git a/tests/data/release/eomug3y4afbynhcyzrtcvki55u b/tests/data/release/eomug3y4afbynhcyzrtcvki55u
new file mode 100644
index 0000000..6decd7b
--- /dev/null
+++ b/tests/data/release/eomug3y4afbynhcyzrtcvki55u
@@ -0,0 +1,20 @@
+{
+ "abstracts": [],
+ "contribs": [],
+ "ext_ids": {
+ "doi": "10.1021/ic0620891.s007"
+ },
+ "extra": {
+ "crossref": {
+ "type": "component"
+ }
+ },
+ "ident": "eomug3y4afbynhcyzrtcvki55u",
+ "publisher": "American Chemical Society (ACS)",
+ "refs": [],
+ "release_type": "component",
+ "revision": "f8552fc2-377e-465a-aa87-b966a6e59c1d",
+ "state": "active",
+ "title": "Single-Molecule Magnet Behavior in Heterometallic MII-MnIII2-MII Tetramers (MII = Cu, Ni) Containing MnIII Salen-Type Dinuclear Core",
+ "work_id": "yk5lasti45dlles3e5mfwwurn4"
+}
diff --git a/tests/data/release/zcu2pugta5fttnqltgersan52q b/tests/data/release/zcu2pugta5fttnqltgersan52q
new file mode 100644
index 0000000..e661321
--- /dev/null
+++ b/tests/data/release/zcu2pugta5fttnqltgersan52q
@@ -0,0 +1,20 @@
+{
+ "abstracts": [],
+ "contribs": [],
+ "ext_ids": {
+ "doi": "10.1021/ic0620891.s014"
+ },
+ "extra": {
+ "crossref": {
+ "type": "component"
+ }
+ },
+ "ident": "zcu2pugta5fttnqltgersan52q",
+ "publisher": "American Chemical Society (ACS)",
+ "refs": [],
+ "release_type": "component",
+ "revision": "a2b8063e-67bc-474b-a396-22d9b499a8d1",
+ "state": "active",
+ "title": "Single-Molecule Magnet Behavior in Heterometallic MII-MnIII2-MII Tetramers (MII = Cu, Ni) Containing MnIII Salen-Type Dinuclear Core",
+ "work_id": "cjzr63koybhvhd5ofsswvwip2m"
+}
diff --git a/tests/data/verify.csv b/tests/data/verify.csv
index d3c8dbe..18a899b 100644
--- a/tests/data/verify.csv
+++ b/tests/data/verify.csv
@@ -138,3 +138,4 @@ voruupqxhvggfex4zlczcmjxxu,jg72qhdvmncfdfxg5l47hw3uba,Status.AMBIGUOUS,OK.DUMMY
arqtphat7fashokettncepu7xe,v6p7xct6kfgwtdbh57zfjqmuua,Status.AMBIGUOUS,
zwru5ugcsfcyzeuqlygfw46vwq,b3uhit7b4vhvliocdzwxr7peyy,Status.AMBIGUOUS,Miss.CUSTOM_PREFIX_10_7916
s7a4o5v5gfg4tbzna6poyg7nzy,tcro5wr6brhqnf5wettyiauw34,Status.STRONG,OK.CUSTOM_BSI_SUBDOC
+eomug3y4afbynhcyzrtcvki55u,zcu2pugta5fttnqltgersan52q,Status.DIFFERENT,Miss.COMPONENT