diff options
author | Martin Czygan <martin.czygan@gmail.com> | 2020-11-05 23:07:07 +0100 |
---|---|---|
committer | Martin Czygan <martin.czygan@gmail.com> | 2020-11-05 23:07:07 +0100 |
commit | aa3c37bebeddfe8f631403a2bc0a238f5a0dfe97 (patch) | |
tree | 2a3f328866ef985d7fc863edc567a268531d7e5d | |
parent | a7960c19c61a4686d80ff68b653fb0f43007ea85 (diff) | |
download | fuzzycat-aa3c37bebeddfe8f631403a2bc0a238f5a0dfe97.tar.gz fuzzycat-aa3c37bebeddfe8f631403a2bc0a238f5a0dfe97.zip |
apply styles
-rw-r--r-- | fuzzycat/cluster.py | 2 | ||||
-rw-r--r-- | tests/test_cluster.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fuzzycat/cluster.py b/fuzzycat/cluster.py index 150e18e..832a333 100644 --- a/fuzzycat/cluster.py +++ b/fuzzycat/cluster.py @@ -30,10 +30,10 @@ get_ident_title = operator.itemgetter("ident", "title") ws_replacer = str.maketrans({"\t": " ", "\n": " "}) non_word_re = re.compile(r'[\W_]+', re.UNICODE) - # Notes: untie from release_entity, as we are only using a few fields. Maybe # it's a jsob blob, with a pydantic spec and schema. + def release_key_title(release_entity, get_ident_title=get_ident_title): id, title = get_ident_title(release_entity) if not title: diff --git a/tests/test_cluster.py b/tests/test_cluster.py index 05c2218..a010c04 100644 --- a/tests/test_cluster.py +++ b/tests/test_cluster.py @@ -101,9 +101,11 @@ def test_release_key_title_nysiis(): assert case.output == release_key_title_nysiis(case.input), 'failed case {}'.format( case.input) + def test_release_key_title_authors_ngram(): pass + def test_sort_by_column(): with tempfile.NamedTemporaryFile(delete=False, mode="w") as tf: tf.write("2 b\n") @@ -148,4 +150,3 @@ def test_group_by(): for case in cases: assert case.result == list(group_by(case.seq, case.keyfunc, case.valuefunc)) - |