aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_exact_contrib/0.yaml13
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_exact_contrib/1.yaml13
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_exact_contrib/2.yaml16
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_exact_contrib/3.yaml16
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_exact_contrib/4.yaml16
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/0.yaml14
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/1.yaml14
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/2.yaml17
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/3.yaml17
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/4.yaml17
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/5.yaml17
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/6.yaml14
-rw-r--r--tests/files/fuzzy_release_match_release_exact_title_partial_contrib/7.yaml17
-rw-r--r--tests/files/fuzzy_release_matcher/0.yaml (renamed from tests/files/simple_fuzzy_release_matcher/0.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/1.yaml (renamed from tests/files/simple_fuzzy_release_matcher/1.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/2.yaml (renamed from tests/files/simple_fuzzy_release_matcher/2.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/3.yaml (renamed from tests/files/simple_fuzzy_release_matcher/3.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/4.yaml (renamed from tests/files/simple_fuzzy_release_matcher/4.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/5.yaml (renamed from tests/files/simple_fuzzy_release_matcher/5.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/6.yaml (renamed from tests/files/simple_fuzzy_release_matcher/6.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/7.yaml (renamed from tests/files/simple_fuzzy_release_matcher/7.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/8.yaml (renamed from tests/files/simple_fuzzy_release_matcher/8.yaml)0
-rw-r--r--tests/files/fuzzy_release_matcher/9.yaml (renamed from tests/files/simple_fuzzy_release_matcher/9.yaml)0
-rw-r--r--tests/test_matching.py2
24 files changed, 1 insertions, 202 deletions
diff --git a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/0.yaml b/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/0.yaml
deleted file mode 100644
index 2df8d9a..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/0.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-title: titles are case insensitive
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Michael Adams"
- }
- ],
- "title": "digital libraries",
- "ext_ids": {}
- }
-expected: 2
diff --git a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/1.yaml b/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/1.yaml
deleted file mode 100644
index 1070408..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/1.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-title: another vanilla query
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Poul-Henning Kamp"
- }
- ],
- "title": "The hyperdimensional tar pit",
- "ext_ids": {}
- }
-expected: 2
diff --git a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/2.yaml b/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/2.yaml
deleted file mode 100644
index 882e746..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/2.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-title: order of contribs does not matter
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Maurice Florence"
- },
- {
- "raw_name": "Tuomo Tiisala"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-expected: 1
diff --git a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/3.yaml b/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/3.yaml
deleted file mode 100644
index 0a2ad12..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/3.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-title: order of contribs does not matter
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Tuomo Tiisala"
- },
- {
- "raw_name": "Maurice Florence"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-expected: 1
diff --git a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/4.yaml b/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/4.yaml
deleted file mode 100644
index 36ea0fe..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_exact_contrib/4.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-title: short version of name should not work
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Tuomo Tiisala"
- },
- {
- "raw_name": "M. Florence"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-expected: 0
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/0.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/0.yaml
deleted file mode 100644
index 07230e8..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/0.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-title: titles are case insensitive
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Michael Adams"
- }
- ],
- "title": "digital libraries",
- "ext_ids": {}
- }
-jaccard_index_threshold: 1.0
-expected: 2
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/1.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/1.yaml
deleted file mode 100644
index 62e9586..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/1.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-title: another vanilla query
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Poul-Henning Kamp"
- }
- ],
- "title": "The hyperdimensional tar pit",
- "ext_ids": {}
- }
-jaccard_index_threshold: 1.0
-expected: 2
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/2.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/2.yaml
deleted file mode 100644
index b89e825..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/2.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-title: order of contribs does not matter
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Maurice Florence"
- },
- {
- "raw_name": "Tuomo Tiisala"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-jaccard_index_threshold: 1.0
-expected: 1
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/3.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/3.yaml
deleted file mode 100644
index 3de7262..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/3.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-title: order of contribs does not matter
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Tuomo Tiisala"
- },
- {
- "raw_name": "Maurice Florence"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-jaccard_index_threshold: 1.0
-expected: 1
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/4.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/4.yaml
deleted file mode 100644
index 39fb065..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/4.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-title: short version of name should not work
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Tuomo Tiisala"
- },
- {
- "raw_name": "M. Florence"
- }
- ],
- "title": "Foucault",
- "ext_ids": {}
- }
-jaccard_index_threshold: 1.0
-expected: 0
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/5.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/5.yaml
deleted file mode 100644
index fff19fa..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/5.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-title: here, Iz Beltagy is missing from author, but still retrieved
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Arman Cohan"
- },
- {
- "raw_name": "Kyle Lo"
- }
- ],
- "title": "SciBERT: A Pretrained Language Model for Scientific Text",
- "ext_ids": {}
- }
-jaccard_index_threshold: 0.5
-expected: 3
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/6.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/6.yaml
deleted file mode 100644
index d4e0025..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/6.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-title: here, 2/3 authors are missing, we fail with jaccard index 0.5
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Arman Cohan"
- }
- ],
- "title": "SciBERT: A Pretrained Language Model for Scientific Text",
- "ext_ids": {}
- }
-jaccard_index_threshold: 0.5
-expected: 0
diff --git a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/7.yaml b/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/7.yaml
deleted file mode 100644
index 23d5a8d..0000000
--- a/tests/files/fuzzy_release_match_release_exact_title_partial_contrib/7.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-title: match, despite trailing whitespace
-date: 2021-11-08
-input: >
- {
- "contribs": [
- {
- "raw_name": "Arman Cohan"
- },
- {
- "raw_name": "Kyle Lo"
- }
- ],
- "title": "SciBERT: A Pretrained Language Model for Scientific Text ",
- "ext_ids": {}
- }
-jaccard_index_threshold: 0.5
-expected: 3
diff --git a/tests/files/simple_fuzzy_release_matcher/0.yaml b/tests/files/fuzzy_release_matcher/0.yaml
index 71fc992..71fc992 100644
--- a/tests/files/simple_fuzzy_release_matcher/0.yaml
+++ b/tests/files/fuzzy_release_matcher/0.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/1.yaml b/tests/files/fuzzy_release_matcher/1.yaml
index df6a954..df6a954 100644
--- a/tests/files/simple_fuzzy_release_matcher/1.yaml
+++ b/tests/files/fuzzy_release_matcher/1.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/2.yaml b/tests/files/fuzzy_release_matcher/2.yaml
index df6a954..df6a954 100644
--- a/tests/files/simple_fuzzy_release_matcher/2.yaml
+++ b/tests/files/fuzzy_release_matcher/2.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/3.yaml b/tests/files/fuzzy_release_matcher/3.yaml
index 1ab761b..1ab761b 100644
--- a/tests/files/simple_fuzzy_release_matcher/3.yaml
+++ b/tests/files/fuzzy_release_matcher/3.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/4.yaml b/tests/files/fuzzy_release_matcher/4.yaml
index 9419406..9419406 100644
--- a/tests/files/simple_fuzzy_release_matcher/4.yaml
+++ b/tests/files/fuzzy_release_matcher/4.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/5.yaml b/tests/files/fuzzy_release_matcher/5.yaml
index 1eb435b..1eb435b 100644
--- a/tests/files/simple_fuzzy_release_matcher/5.yaml
+++ b/tests/files/fuzzy_release_matcher/5.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/6.yaml b/tests/files/fuzzy_release_matcher/6.yaml
index ae52b23..ae52b23 100644
--- a/tests/files/simple_fuzzy_release_matcher/6.yaml
+++ b/tests/files/fuzzy_release_matcher/6.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/7.yaml b/tests/files/fuzzy_release_matcher/7.yaml
index 2330f0d..2330f0d 100644
--- a/tests/files/simple_fuzzy_release_matcher/7.yaml
+++ b/tests/files/fuzzy_release_matcher/7.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/8.yaml b/tests/files/fuzzy_release_matcher/8.yaml
index b43e53a..b43e53a 100644
--- a/tests/files/simple_fuzzy_release_matcher/8.yaml
+++ b/tests/files/fuzzy_release_matcher/8.yaml
diff --git a/tests/files/simple_fuzzy_release_matcher/9.yaml b/tests/files/fuzzy_release_matcher/9.yaml
index b43e53a..b43e53a 100644
--- a/tests/files/simple_fuzzy_release_matcher/9.yaml
+++ b/tests/files/fuzzy_release_matcher/9.yaml
diff --git a/tests/test_matching.py b/tests/test_matching.py
index b9d7fae..eb54751 100644
--- a/tests/test_matching.py
+++ b/tests/test_matching.py
@@ -55,7 +55,7 @@ def test_simple_fuzzy_release_matcher(es_client, caplog):
"""
matcher = FuzzyReleaseMatcher(es=es_client)
Case = collections.namedtuple("Case", "about input release_year_padding expected")
- cases = yaml_to_cases(Case, "tests/files/simple_fuzzy_release_matcher/*.yaml")
+ cases = yaml_to_cases(Case, "tests/files/fuzzy_release_matcher/*.yaml")
for i, c in enumerate(cases):
matcher.release_year_padding = c.release_year_padding
entity = entity_from_json(c.input, ReleaseEntity)