From b1e8f3337bcde0f58176e79edb204e8003152090 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 16:10:23 -0800 Subject: python code: update python_openapi_client in lockfile --- python/Pipfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/Pipfile.lock b/python/Pipfile.lock index a5c26410..fde6ca9a 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -262,7 +262,7 @@ }, "fatcat-openapi-client": { "path": "./../python_openapi_client", - "version": "==0.4.0" + "version": "==0.4.1" }, "filelock": { "hashes": [ -- cgit v1.2.3 From f64a469b8a8aa9319013d6099ad38e7cde495e18 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 15:58:43 -0800 Subject: minimal python test coverage of content_scope fields --- python/tests/api_files.py | 2 ++ python/tests/api_filesets.py | 2 ++ python/tests/api_webcaptures.py | 2 ++ 3 files changed, 6 insertions(+) (limited to 'python') diff --git a/python/tests/api_files.py b/python/tests/api_files.py index 8f9caf3e..cd08eef7 100644 --- a/python/tests/api_files.py +++ b/python/tests/api_files.py @@ -13,6 +13,7 @@ def test_file(api): sha1="027e7ed3ea1a40e92dd2657a1e3c992b5dc45dd2", sha256="f1f4f18a904e76818863ccbc6141fce92b0dcb47b0d6041aec98bc6806e393c3", mimetype="application/pdf", + content_scope="article", urls=[ FileUrl( url="https://web.archive.org/web/12345542/something.com/blah.pdf", @@ -39,6 +40,7 @@ def test_file(api): assert f1.sha1 == f2.sha1 assert f1.sha256 == f2.sha256 assert f1.mimetype == f2.mimetype + assert f1.content_scope == f2.content_scope assert f1.extra == f2.extra assert f1.urls == f2.urls assert f1.release_ids == f2.release_ids diff --git a/python/tests/api_filesets.py b/python/tests/api_filesets.py index d7654eb9..8ab658f5 100644 --- a/python/tests/api_filesets.py +++ b/python/tests/api_filesets.py @@ -34,6 +34,7 @@ def test_fileset(api): FilesetUrl(url="https://humble-host.com/~user123/dataset/", rel="web"), ], release_ids=[r1edit.ident], + content_scope="dataset", extra=dict(t=4, u=9), edit_extra=dict(test_key="filesets rule"), ) @@ -52,6 +53,7 @@ def test_fileset(api): assert fs1.urls == fs2.urls assert fs1.manifest == fs2.manifest assert fs1.release_ids == fs2.release_ids + assert fs1.content_scope == fs2.content_scope assert fs1.extra == fs2.extra # expansion diff --git a/python/tests/api_webcaptures.py b/python/tests/api_webcaptures.py index 76bc68c0..6a477ff2 100644 --- a/python/tests/api_webcaptures.py +++ b/python/tests/api_webcaptures.py @@ -44,6 +44,7 @@ def test_webcapture(api): FileUrl(rel="wayback", url="https://web.archive.org/web/"), ], release_ids=[r1edit.ident], + content_scope="landing-page", extra=dict(c=1, b=2), edit_extra=dict(test_key="webcaptures rule"), ) @@ -69,6 +70,7 @@ def test_webcapture(api): assert wc1.release_ids == wc2.release_ids assert wc1.timestamp == wc2.timestamp assert wc1.original_url == wc2.original_url + assert wc1.content_scope == wc2.content_scope assert wc1.extra == wc2.extra # check release expansion -- cgit v1.2.3 From 09a1829a10caf9759762b41c36169c0b88cd5ed7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 16:36:16 -0800 Subject: content_scope: include in file ES schema and transform --- extra/elasticsearch/file_schema.json | 1 + python/fatcat_tools/transforms/elasticsearch.py | 1 + 2 files changed, 2 insertions(+) (limited to 'python') diff --git a/extra/elasticsearch/file_schema.json b/extra/elasticsearch/file_schema.json index a8dbc6d0..34e2b0b3 100644 --- a/extra/elasticsearch/file_schema.json +++ b/extra/elasticsearch/file_schema.json @@ -37,6 +37,7 @@ "release_ids": { "type": "keyword", "normalizer": "default", "doc_values": false }, "release_count": { "type": "integer" }, "mimetype": { "type": "keyword", "normalizer": "default" }, + "content_scope": { "type": "keyword", "normalizer": "default" }, "size_bytes": { "type": "integer" }, "sha1": { "type": "keyword", "normalizer": "default", "doc_values": false }, "sha256": { "type": "keyword", "normalizer": "default", "doc_values": false }, diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py index d4962205..c16053ec 100644 --- a/python/fatcat_tools/transforms/elasticsearch.py +++ b/python/fatcat_tools/transforms/elasticsearch.py @@ -650,6 +650,7 @@ def file_to_elasticsearch(entity: FileEntity) -> Dict[str, Any]: release_ids=entity.release_ids, release_count=len(entity.release_ids), mimetype=entity.mimetype, + content_scope=entity.content_scope, size_bytes=entity.size, sha1=entity.sha1, sha256=entity.sha256, -- cgit v1.2.3 From 574a3cacafab2f32c7371ce24ef58c95b925e596 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 17 Nov 2021 16:55:27 -0800 Subject: bump python client to 0.5.0 --- python/Pipfile.lock | 2 +- python_openapi_client/README.md | 4 ++-- python_openapi_client/codegen_python_client.sh | 2 +- python_openapi_client/fatcat_openapi_client/__init__.py | 4 ++-- python_openapi_client/fatcat_openapi_client/__version__.py | 2 +- python_openapi_client/fatcat_openapi_client/api_client.py | 4 ++-- python_openapi_client/fatcat_openapi_client/configuration.py | 6 +++--- python_openapi_client/fatcat_openapi_client/models/file_entity.py | 2 +- .../fatcat_openapi_client/models/fileset_entity.py | 2 +- .../fatcat_openapi_client/models/webcapture_entity.py | 2 +- 10 files changed, 15 insertions(+), 15 deletions(-) (limited to 'python') diff --git a/python/Pipfile.lock b/python/Pipfile.lock index fde6ca9a..2c7d08b0 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -262,7 +262,7 @@ }, "fatcat-openapi-client": { "path": "./../python_openapi_client", - "version": "==0.4.1" + "version": "==0.5.0" }, "filelock": { "hashes": [ diff --git a/python_openapi_client/README.md b/python_openapi_client/README.md index 5dcee5a6..316b9dfd 100644 --- a/python_openapi_client/README.md +++ b/python_openapi_client/README.md @@ -3,8 +3,8 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -- API version: 0.4.1 -- Package version: 0.4.1 +- API version: 0.5.0 +- Package version: 0.5.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://fatcat.wiki](https://fatcat.wiki) diff --git a/python_openapi_client/codegen_python_client.sh b/python_openapi_client/codegen_python_client.sh index 670fb190..17782c68 100755 --- a/python_openapi_client/codegen_python_client.sh +++ b/python_openapi_client/codegen_python_client.sh @@ -20,7 +20,7 @@ docker run \ --input-spec /tmp/swagger/api.yml \ --output /tmp/swagger/ \ --package-name=fatcat_openapi_client \ - -p packageVersion="0.4.1" + -p packageVersion="0.5.0" sudo chown -R `whoami`:`whoami` $OUTPUT mkdir -p fatcat_openapi_client diff --git a/python_openapi_client/fatcat_openapi_client/__init__.py b/python_openapi_client/fatcat_openapi_client/__init__.py index 329e5488..8749264e 100644 --- a/python_openapi_client/fatcat_openapi_client/__init__.py +++ b/python_openapi_client/fatcat_openapi_client/__init__.py @@ -7,7 +7,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "0.4.1" +__version__ = "0.5.0" # import apis into sdk package from fatcat_openapi_client.api.default_api import DefaultApi diff --git a/python_openapi_client/fatcat_openapi_client/__version__.py b/python_openapi_client/fatcat_openapi_client/__version__.py index 30c2fffe..b0634514 100644 --- a/python_openapi_client/fatcat_openapi_client/__version__.py +++ b/python_openapi_client/fatcat_openapi_client/__version__.py @@ -1,3 +1,3 @@ -VERSION = (0, 4, 1) # eg, (0, 2, '0dev0') +VERSION = (0, 5, 0) # eg, (0, 2, '0dev0') __version__ = '.'.join(map(str, VERSION)) diff --git a/python_openapi_client/fatcat_openapi_client/api_client.py b/python_openapi_client/fatcat_openapi_client/api_client.py index ed083dfa..eb23f1cd 100644 --- a/python_openapi_client/fatcat_openapi_client/api_client.py +++ b/python_openapi_client/fatcat_openapi_client/api_client.py @@ -4,7 +4,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -77,7 +77,7 @@ class ApiClient(object): self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.4.1/python' + self.user_agent = 'OpenAPI-Generator/0.5.0/python' def __del__(self): if self._pool: diff --git a/python_openapi_client/fatcat_openapi_client/configuration.py b/python_openapi_client/fatcat_openapi_client/configuration.py index 0b186c5b..dacf77c9 100644 --- a/python_openapi_client/fatcat_openapi_client/configuration.py +++ b/python_openapi_client/fatcat_openapi_client/configuration.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ @@ -267,8 +267,8 @@ class Configuration(object): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 0.4.1\n"\ - "SDK Package Version: 0.4.1".\ + "Version of the API: 0.5.0\n"\ + "SDK Package Version: 0.5.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/python_openapi_client/fatcat_openapi_client/models/file_entity.py b/python_openapi_client/fatcat_openapi_client/models/file_entity.py index d0c86d47..d97a0a03 100644 --- a/python_openapi_client/fatcat_openapi_client/models/file_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/file_entity.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ diff --git a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py index 44d5bebf..dfc0787a 100644 --- a/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/fileset_entity.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ diff --git a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py index 61d0e5ad..968b0b1c 100644 --- a/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py +++ b/python_openapi_client/fatcat_openapi_client/models/webcapture_entity.py @@ -5,7 +5,7 @@ Fatcat is a scalable, versioned, API-oriented catalog of bibliographic entities and file metadata. # noqa: E501 - The version of the OpenAPI document: 0.4.1 + The version of the OpenAPI document: 0.5.0 Contact: webservices@archive.org Generated by: https://openapi-generator.tech """ -- cgit v1.2.3