From f702293e0dd43a5800e45387a4719e33100c2423 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 27 Oct 2021 16:20:55 -0700 Subject: deps: pin elasticsearch to less than 7.14 This is to avoid 'elasticsearch.exceptions.UnsupportedProductError' errors in newer versions of the elasticsearch client libraries. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 99519e7..290740f 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,8 @@ with open("README.md", "r") as fh: ]}, install_requires=[ "dynaconf>=3", - "elasticsearch-dsl>=7.0.0,<8.0.0", + "elasticsearch>=7.8.0,<7.14.0", + "elasticsearch-dsl>=7.0.0,<8.0.0", "fatcat-openapi-client>=0.3.3", # https://pypi.org/project/fatcat-openapi-client/ "ftfy", "glom", -- cgit v1.2.3 From 4d19937ddb69cc26bb8a1e997abf21c0f910130d Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 27 Oct 2021 16:24:33 -0700 Subject: packaging: include py.typed for mypy to detect --- fuzzycat/py.typed | 0 setup.py | 1 + 2 files changed, 1 insertion(+) create mode 100644 fuzzycat/py.typed diff --git a/fuzzycat/py.typed b/fuzzycat/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index 290740f..51b5008 100644 --- a/setup.py +++ b/setup.py @@ -15,6 +15,7 @@ with open("README.md", "r") as fh: long_description_content_type="text/markdown", url="https://github.com/miku/fuzzycat", packages=setuptools.find_packages(), + package_data={"fuzzycat": ["py.typed"]}, classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", -- cgit v1.2.3 From 0cbfab6b85d1f098686edd62381ffffc901daece Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 27 Oct 2021 16:25:21 -0700 Subject: matching: include contribs,files in release entity This makes several downstream applications simpler, like showing PDF links without an additional fatcat API fetch. The 'contrib' entities may be required as part of bibliographic matching (checking the creator names as well as the release-local versions of the name) In theory we could add webcaptures,filesets as well, but those are still rare, and occasionally result in very large sub-documents. --- fuzzycat/matching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fuzzycat/matching.py b/fuzzycat/matching.py index bcda46d..b358899 100644 --- a/fuzzycat/matching.py +++ b/fuzzycat/matching.py @@ -207,7 +207,7 @@ def retrieve_entity_list( if entity_type == ReleaseEntity: for id in ids: try: - re = api.get_release(id, hide="refs,abstracts", expand="container") + re = api.get_release(id, hide="refs,abstracts", expand="container,contribs,files") result.append(re) except ApiException as exc: if exc.status == 404: -- cgit v1.2.3 From b9f43f58be717ab56bb3c07691c422e88da997c9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 27 Oct 2021 16:29:35 -0700 Subject: bump fatcat-openapi-client version to 0.4.0 There isn't any new feature required in the new version of the client library, but feels like we should aggressively update everywhere when possible. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 51b5008..040bbc6 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ with open("README.md", "r") as fh: "dynaconf>=3", "elasticsearch>=7.8.0,<7.14.0", "elasticsearch-dsl>=7.0.0,<8.0.0", - "fatcat-openapi-client>=0.3.3", # https://pypi.org/project/fatcat-openapi-client/ + "fatcat-openapi-client>=0.4.0", # https://pypi.org/project/fatcat-openapi-client/ "ftfy", "glom", "jellyfish", -- cgit v1.2.3