diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-05 18:54:39 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-09-05 18:54:39 -0700 |
commit | a65dfc914517376b5ededb82e594236c5d61c721 (patch) | |
tree | 381a5d346dfad7f020c344d2c4740eefb71be61d | |
parent | 28d2d94a9100c1a809955cde93fdbb7a36263057 (diff) | |
download | fatcat-a65dfc914517376b5ededb82e594236c5d61c721.tar.gz fatcat-a65dfc914517376b5ededb82e594236c5d61c721.zip |
update all other mentions of python client lib
-rw-r--r-- | .gitlab-ci.yml | 2 | ||||
-rw-r--r-- | LICENSE.md | 6 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | extra/demo_entities/delete_builtins.py | 4 | ||||
-rw-r--r-- | extra/demo_entities/enrich_examples.py | 10 | ||||
-rwxr-xr-x | extra/fixups/fixup_longtail_issnl_unique.py | 4 | ||||
-rw-r--r-- | python/.coveragerc | 2 | ||||
-rw-r--r-- | python/Pipfile | 4 | ||||
-rw-r--r-- | python/Pipfile.lock | 6 | ||||
-rw-r--r-- | python/README.md | 4 |
10 files changed, 22 insertions, 22 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ecf87203..d47259f4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ unified_test: - cargo build - cargo test -- --test-threads 1 - cargo run --bin fatcatd & - - cd ../python_client + - cd ../python_openapi_client - pytest-3 - cd ../python - cp example.env .env @@ -5,8 +5,8 @@ The schema files are: Copyright, 2018 Bryan Newbold <bnewbold@robocracy.org) -The python 'fatcat_client' API client library (under the -./python/fatcat_client/ directory), which is auto-generated from a +The python 'fatcat_openapi_client' API client library (under the +./python/fatcat_openapi_client/ directory), which is auto-generated from a swagger/openapi schema specification, is released to the public domain. The rust 'fatcat-api-spec' API library (under the ./rust/fatcat-api-spec/ @@ -14,7 +14,7 @@ directory), which is auto-generated from the swagger/openapi schema specification, is released to the public domain. The python 'fatcat' web interface, tests, scripts, and bots (under the -./python/ directory, not including fatcat_client), unless otherwise specified +./python/ directory, not including fatcat_openapi_client), unless otherwise specified are released under the GNU Affero General Public License, version 3. A copy of this license should be included in this repository. Unless otherwise indicated this code is: @@ -41,7 +41,7 @@ See `./python/README.md` and `./rust/README.md` for details on building, running, and testing these components. The python client library, which is automatically generated from the API -schema, lives under `./python_client/`. +schema, lives under `./python_openapi_client/`. ## Status diff --git a/extra/demo_entities/delete_builtins.py b/extra/demo_entities/delete_builtins.py index 31af7a8f..928f06e0 100644 --- a/extra/demo_entities/delete_builtins.py +++ b/extra/demo_entities/delete_builtins.py @@ -2,7 +2,7 @@ # cp ../extra/demo_entities/delete_builtins.py . # pipenv run python3 delete_builtins.py -import fatcat_client +import fatcat_openapi_client from fatcat_tools import * import os @@ -10,7 +10,7 @@ token = os.environ['FATCAT_API_AUTH_TOKEN'] assert token api = authenticated_api('http://localhost:9411/v0', token) -eg = api.create_editgroup(fatcat_client.Editgroup( +eg = api.create_editgroup(fatcat_openapi_client.Editgroup( description="Clear out built-in database example entities")) container_ids = ( diff --git a/extra/demo_entities/enrich_examples.py b/extra/demo_entities/enrich_examples.py index a97263b9..10b9534f 100644 --- a/extra/demo_entities/enrich_examples.py +++ b/extra/demo_entities/enrich_examples.py @@ -7,18 +7,18 @@ Ugh, it needs to be copied to ../../python (with ./files/) to actually run. Derp import os import datetime -import fatcat_client -from fatcat_client.rest import ApiException -from fatcat_client import * +import fatcat_openapi_client +from fatcat_openapi_client.rest import ApiException +from fatcat_openapi_client import * from fatcat_tools import * import datetime # setup env #admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae" -#local_conf = fatcat_client.Configuration() +#local_conf = fatcat_openapi_client.Configuration() #local_conf.host = 'http://localhost:9411/v0' -#local_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(local_conf)) +#local_api = fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(local_conf)) #api = local_api api = authenticated_api( 'http://localhost:9411/v0', diff --git a/extra/fixups/fixup_longtail_issnl_unique.py b/extra/fixups/fixup_longtail_issnl_unique.py index 385b0e29..ea615a13 100755 --- a/extra/fixups/fixup_longtail_issnl_unique.py +++ b/extra/fixups/fixup_longtail_issnl_unique.py @@ -54,7 +54,7 @@ import json import sqlite3 import itertools -import fatcat_client +import fatcat_openapi_client from fatcat_tools import authenticated_api from fatcat_tools.importers.common import EntityImporter, clean, LinePusher from fatcat_tools.importers.arabesque import b32_hex @@ -149,7 +149,7 @@ class LongtailIssnlSingleDomainFixup(EntityImporter): #print(sha1) try: file_entity = self.api.lookup_file(sha1=sha1, expand="releases") - except fatcat_client.rest.ApiException as err: + except fatcat_openapi_client.rest.ApiException as err: if err.status == 404: self.counts['skip-file-not-found'] += 1 return None diff --git a/python/.coveragerc b/python/.coveragerc index becac586..78764694 100644 --- a/python/.coveragerc +++ b/python/.coveragerc @@ -2,4 +2,4 @@ source = fatcat_tools fatcat_web - ../python_client/fatcat_client + ../python_openapi_client/fatcat_openapi_client diff --git a/python/Pipfile b/python/Pipfile index 0de97b25..b488f210 100644 --- a/python/Pipfile +++ b/python/Pipfile @@ -1,5 +1,5 @@ # This file is *not* used as part of bundling or distributing the python client -# library (fatcat_client). It *is* shared by the web interface (flask app), +# library (fatcat-openapi-client). It *is* shared by the web interface (flask app), # workers, and import scripts. [[source]] @@ -18,7 +18,7 @@ pylint = "*" pg-view = "*" [packages] -fatcat_client = {path = "./../python_client"} +fatcat-openapi-client = {path = "./../python_openapi_client"} python-dotenv = "*" Flask = ">=1" flask-uuid = "*" diff --git a/python/Pipfile.lock b/python/Pipfile.lock index e1e9a8a6..d82121c4 100644 --- a/python/Pipfile.lock +++ b/python/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "dd219787aa7a52cc030aab7b256663b538e61c7420fe06fb73c7d0b3173eae6e" + "sha256": "ea087a8b88fbbcb81a0b97279273fcdf0d6e759a2971d4e576cca4593594eb97" }, "pipfile-spec": 6, "requires": { @@ -107,8 +107,8 @@ ], "version": "==7.0" }, - "fatcat-client": { - "path": "./../python_client" + "fatcat-openapi-client": { + "path": "./../python_openapi_client" }, "flask": { "hashes": [ diff --git a/python/README.md b/python/README.md index 783ed966..dc6ca415 100644 --- a/python/README.md +++ b/python/README.md @@ -3,7 +3,7 @@ This directory contains python code for the fatcat project: a web interface (`fatcat_web`) and a series of utilities and worker processes (`fatcat_tools`). -These depend on the API client library (`fatcat_client`, see below). +These depend on the API client library (`fatcat_openapi_client`, see below). Most of this code is an "application" which is tightly interwoven and intended to be run from this directory, but the client library is distributed on @@ -23,7 +23,7 @@ versions had a bug which caused problems with our local path dependency. ## API Client Library The auto-generated python client library for the fatcat API lives under -`../fatcat_client`. It includes entity model objects and functions to call all +`../fatcat_openapi_client`. It includes entity model objects and functions to call all API endpoints; see the `README.md` for details. To re-generate swagger-codegen python client library (requires docker installed |