From 419f0db3a09e5a2853578daf309bac42217f876d Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 17:11:19 +0100 Subject: [PATCH 01/16] publish on pypi --- deepomatic/version.py | 2 +- make_release.sh | 13 +++++++++++++ requirements.txt | 2 +- setup.py | 3 ++- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100755 make_release.sh diff --git a/deepomatic/version.py b/deepomatic/version.py index 1451df8..60985cd 100644 --- a/deepomatic/version.py +++ b/deepomatic/version.py @@ -1,6 +1,6 @@ __title__ = 'deepomatic' __description__ = 'Deepomatic API client', -__version__ = '0.7.7' +__version__ = '0.7.8' __author__ = 'deepomatic' __author_email__ = 'support@deepomatic.com' __url__ = 'https://www.deepomatic.com' diff --git a/make_release.sh b/make_release.sh new file mode 100755 index 0000000..453f065 --- /dev/null +++ b/make_release.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +rm -rf build dist *.egg-info +python3 setup.py sdist bdist_wheel + +# For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload +# https://www.python.org/dev/peps/pep-0440/#post-releases +# twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +# For release +# twine upload dist/* + +# More info here https://packaging.python.org/tutorials/packaging-projects/ diff --git a/requirements.txt b/requirements.txt index 235b807..6b5ec8c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -numpy>=1.10,<2 +numpy>=1.10.0,<2 promise>=2.1,<3 six>=1.10.0,<2 requests>=2.19.0,<3 # will not work below in python3 diff --git a/setup.py b/setup.py index 18261e8..e0b42e5 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) # Read requirements -install_reqs = parse_requirements('requirements.txt', session='hack') +install_reqs = parse_requirements(os.path.join(here, 'requirements.txt'), session='hack') setup( name=about['__title__'], @@ -35,6 +35,7 @@ packages=find_packages(), include_package_data=True, long_description=README, + data_files=[('', ['requirements.txt'])], install_requires=[str(ir.req) for ir in install_reqs], python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", classifiers=[ From 2d6fa84263607dbf7c7416c37a53615f1038fcfe Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 17:34:44 +0100 Subject: [PATCH 02/16] Better links and doc --- README.md | 14 +++++--------- deepomatic/version.py | 9 +++++++-- setup.py | 1 + 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 572c2c5..206b7a9 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,26 @@ # deepomatic-client-python -Deepomatic API Client for Python. +[Deepomatic](https://www.deepomatic.com) API Client for Python. This client have been made in order to help you integrating our services within your apps in python. Tested on python 2.7 & 3.5. -
- # API Documentation https://developers.deepomatic.com/docs/v0.7 -
# Installation +```bash +pip install deepomatic ``` -git clone https://github.com/Deepomatic/deepomatic-client-python.git -pip install ./deepomatic-client-python -``` -
# Client Initialize a client. Does not make any call to the server. + ```python import deepomatic @@ -42,4 +38,4 @@ You will find examples of usage in [demo.py](demo.py). # Bugs -Please send bug reports to support@deepomatic.com +Please send bug reports to support@deepomatic.com or open an issue here. diff --git a/deepomatic/version.py b/deepomatic/version.py index 60985cd..5be0e89 100644 --- a/deepomatic/version.py +++ b/deepomatic/version.py @@ -1,7 +1,12 @@ __title__ = 'deepomatic' __description__ = 'Deepomatic API client', -__version__ = '0.7.8' +__version__ = '0.7.9' __author__ = 'deepomatic' __author_email__ = 'support@deepomatic.com' -__url__ = 'https://www.deepomatic.com' +__url__ = 'https://github.com/deepomatic/deepomatic-client-python' __license__ = 'MIT License' +__project_urls__ = { + 'Documentation': 'https://developers.deepomatic.com/docs/v0.7', + 'Source': 'https://github.com/deepomatic/deepomatic-client-python', + 'Tracker': 'https://github.com/deepomatic/deepomatic-client-python/issues', +} diff --git a/setup.py b/setup.py index e0b42e5..54cde6a 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ author=about['__author__'], author_email=about['__author_email__'], url=about['__url__'], + project_urls=about['__project_urls__'], license=about['__license__'], packages=find_packages(), include_package_data=True, From c6f75da7e58e0dd60073f325024c6aca3372ce60 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 18:25:31 +0100 Subject: [PATCH 03/16] Use makefile --- Makefile | 14 ++++++++++++++ deepomatic/version.py | 1 + make_release.sh | 13 ------------- 3 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 Makefile delete mode 100755 make_release.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7ce43c4 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +all: release + +release: + rm -rf build dist *.egg-info + python3 setup.py sdist bdist_wheel + +test-publish: release + # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload + # https://www.python.org/dev/peps/pep-0440/#post-releases + twine upload --repository-url https://test.pypi.org/legacy/ dist/* + +publish: release + # More info here https://packaging.python.org/tutorials/packaging-projects/ + twine upload dist/* diff --git a/deepomatic/version.py b/deepomatic/version.py index 5be0e89..4859391 100644 --- a/deepomatic/version.py +++ b/deepomatic/version.py @@ -6,6 +6,7 @@ __url__ = 'https://github.com/deepomatic/deepomatic-client-python' __license__ = 'MIT License' __project_urls__ = { + 'Product': 'https://www.deepomatic.com', 'Documentation': 'https://developers.deepomatic.com/docs/v0.7', 'Source': 'https://github.com/deepomatic/deepomatic-client-python', 'Tracker': 'https://github.com/deepomatic/deepomatic-client-python/issues', diff --git a/make_release.sh b/make_release.sh deleted file mode 100755 index 453f065..0000000 --- a/make_release.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -rm -rf build dist *.egg-info -python3 setup.py sdist bdist_wheel - -# For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload -# https://www.python.org/dev/peps/pep-0440/#post-releases -# twine upload --repository-url https://test.pypi.org/legacy/ dist/* - -# For release -# twine upload dist/* - -# More info here https://packaging.python.org/tutorials/packaging-projects/ From 586a0b2d3e88034ebb98e6d20b05e842ca3182d0 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 18:41:09 +0100 Subject: [PATCH 04/16] renamed --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7ce43c4..06c0efd 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ release: rm -rf build dist *.egg-info python3 setup.py sdist bdist_wheel -test-publish: release +publish-test: release # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload # https://www.python.org/dev/peps/pep-0440/#post-releases twine upload --repository-url https://test.pypi.org/legacy/ dist/* From efa260d7fc7a752226830f8552da35b5dfcd381b Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 18:45:02 +0100 Subject: [PATCH 05/16] clean rule --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 06c0efd..66f5266 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,11 @@ all: release -release: - rm -rf build dist *.egg-info +release: clean python3 setup.py sdist bdist_wheel +clean: + rm -rf build dist *.egg-info + publish-test: release # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload # https://www.python.org/dev/peps/pep-0440/#post-releases From 46b7cccc02d931a680d608b55d93c1359dc20975 Mon Sep 17 00:00:00 2001 From: Hugo Date: Wed, 31 Oct 2018 21:54:57 +0100 Subject: [PATCH 06/16] forgot to add setup.cfg --- setup.cfg | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 setup.cfg diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..ed8a958 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[bdist_wheel] +universal = 1 + +[metadata] +license_file = LICENSE From 3403fac7975aab3108c8906f8a35845556b0d071 Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:20:33 +0100 Subject: [PATCH 07/16] typo --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 518cd60..6161692 100644 --- a/setup.py +++ b/setup.py @@ -36,7 +36,7 @@ project_urls=about['__project_urls__'], license=about['__license__'], packages=find_packages(), - namespaces=namespaces, + namespace_packages=namespaces, include_package_data=True, long_description=README, data_files=[('', ['requirements.txt'])], From 2ff80934805bf5b66bd3d85fec9971b51dc3413e Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:23:36 +0100 Subject: [PATCH 08/16] fix package name doc --- Dockerfile | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5cb03f2..1004312 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN python setup.py bdist_wheel FROM ${BASE_IMAGE} as runtime # copy egg -COPY --from=builder /app/dist/deepomatic-*.whl /tmp/ +COPY --from=builder /app/dist/deepomatic-api-*.whl /tmp/ COPY --from=builder /app/demo.py /samples/ -RUN pip install /tmp/deepomatic-*.whl +RUN pip install /tmp/deepomatic-api-*.whl diff --git a/README.md b/README.md index 206b7a9..f12bf3a 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ https://developers.deepomatic.com/docs/v0.7 # Installation ```bash -pip install deepomatic +pip install deepomatic-api ``` # Client From 4963960c1a6431a613a15919874cf555fcc04c3d Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:26:27 +0100 Subject: [PATCH 09/16] typo --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1004312..91c2c14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ RUN python setup.py bdist_wheel FROM ${BASE_IMAGE} as runtime # copy egg -COPY --from=builder /app/dist/deepomatic-api-*.whl /tmp/ +COPY --from=builder /app/dist/deepomatic_api-*.whl /tmp/ COPY --from=builder /app/demo.py /samples/ -RUN pip install /tmp/deepomatic-api-*.whl +RUN pip install /tmp/deepomatic_api-*.whl From 4b0139443bb89782814641cd0ae30484ae1b4b6f Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:33:38 +0100 Subject: [PATCH 10/16] fixed import --- deepomatic/api/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepomatic/api/__init__.py b/deepomatic/api/__init__.py index d70f852..97cf7a6 100644 --- a/deepomatic/api/__init__.py +++ b/deepomatic/api/__init__.py @@ -1 +1 @@ -from deepomatic.version import __version__ +from deepomatic.api.version import __version__ From 4509aa4fab9f99bd2aa519d82ac08cf92a6551f9 Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:46:52 +0100 Subject: [PATCH 11/16] fixed import --- .travis.yml | 2 +- deepomatic/api/__init__.py | 2 +- deepomatic/api/client.py | 10 +++++----- deepomatic/api/http_helper.py | 4 ++-- deepomatic/api/inputs.py | 2 +- deepomatic/api/mixins.py | 4 ++-- deepomatic/api/resource.py | 2 +- deepomatic/api/resources/account.py | 2 +- deepomatic/api/resources/network.py | 8 ++++---- deepomatic/api/resources/recognition.py | 8 ++++---- deepomatic/api/resources/task.py | 6 +++--- deepomatic/api/utils.py | 6 +++--- 12 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index 598102a..f5f10a3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,7 @@ python: # command to install dependencies install: - python setup.py bdist_wheel - - pip install dist/deepomatic-*.whl + - pip install dist/deepomatic_api-*.whl - mkdir samples - cp demo.py samples/demo.py diff --git a/deepomatic/api/__init__.py b/deepomatic/api/__init__.py index 97cf7a6..82df61a 100644 --- a/deepomatic/api/__init__.py +++ b/deepomatic/api/__init__.py @@ -1 +1 @@ -from deepomatic.api.version import __version__ +from deepomatic.api.api.version import __version__ diff --git a/deepomatic/api/client.py b/deepomatic/api/client.py index 4468c21..ec7d89d 100644 --- a/deepomatic/api/client.py +++ b/deepomatic/api/client.py @@ -22,11 +22,11 @@ THE SOFTWARE. """ -from deepomatic.http_helper import HTTPHelper -from deepomatic.resources.network import Network -from deepomatic.resources.recognition import RecognitionSpec, RecognitionVersion -from deepomatic.resources.task import Task -from deepomatic.resources.account import Account +from deepomatic.api.http_helper import HTTPHelper +from deepomatic.api.resources.network import Network +from deepomatic.api.resources.recognition import RecognitionSpec, RecognitionVersion +from deepomatic.api.resources.task import Task +from deepomatic.api.resources.account import Account ############################################################################### diff --git a/deepomatic/api/http_helper.py b/deepomatic/api/http_helper.py index 8d7caf8..9049c2f 100644 --- a/deepomatic/api/http_helper.py +++ b/deepomatic/api/http_helper.py @@ -30,8 +30,8 @@ from requests.structures import CaseInsensitiveDict from six import string_types -from deepomatic.exceptions import DeepomaticException, BadStatus -from deepomatic.version import __version__ +from deepomatic.api.exceptions import DeepomaticException, BadStatus +from deepomatic.api.version import __version__ ############################################################################### diff --git a/deepomatic/api/inputs.py b/deepomatic/api/inputs.py index ed5c866..0aaa7bf 100644 --- a/deepomatic/api/inputs.py +++ b/deepomatic/api/inputs.py @@ -26,7 +26,7 @@ import copy import base64 -from deepomatic.exceptions import DeepomaticException +from deepomatic.api.exceptions import DeepomaticException ############################################################################### diff --git a/deepomatic/api/mixins.py b/deepomatic/api/mixins.py index 93f0a11..0ca100b 100644 --- a/deepomatic/api/mixins.py +++ b/deepomatic/api/mixins.py @@ -22,8 +22,8 @@ THE SOFTWARE. """ -from deepomatic.exceptions import DeepomaticException -from deepomatic.resource import ResourceList +from deepomatic.api.exceptions import DeepomaticException +from deepomatic.api.resource import ResourceList ############################################################################### diff --git a/deepomatic/api/resource.py b/deepomatic/api/resource.py index e163137..32405d5 100644 --- a/deepomatic/api/resource.py +++ b/deepomatic/api/resource.py @@ -25,7 +25,7 @@ import json import copy -from deepomatic.exceptions import DeepomaticException, NoData +from deepomatic.api.exceptions import DeepomaticException, NoData ############################################################################### diff --git a/deepomatic/api/resources/account.py b/deepomatic/api/resources/account.py index 62929a8..d62faff 100644 --- a/deepomatic/api/resources/account.py +++ b/deepomatic/api/resources/account.py @@ -22,7 +22,7 @@ THE SOFTWARE. """ -from deepomatic.resource import Resource +from deepomatic.api.api.resource import Resource ############################################################################### diff --git a/deepomatic/api/resources/network.py b/deepomatic/api/resources/network.py index 0bf76e7..0014327 100644 --- a/deepomatic/api/resources/network.py +++ b/deepomatic/api/resources/network.py @@ -25,10 +25,10 @@ from six import string_types import numpy as np -from deepomatic.resource import Resource -from deepomatic.utils import InferenceResource -from deepomatic.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource -from deepomatic.mixins import RequiredArg, OptionnalArg, ImmutableArg +from deepomatic.api.api.resource import Resource +from deepomatic.api.api.utils import InferenceResource +from deepomatic.api.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource +from deepomatic.api.api.mixins import RequiredArg, OptionnalArg, ImmutableArg ############################################################################### diff --git a/deepomatic/api/resources/recognition.py b/deepomatic/api/resources/recognition.py index 619b08e..68a5196 100644 --- a/deepomatic/api/resources/recognition.py +++ b/deepomatic/api/resources/recognition.py @@ -24,10 +24,10 @@ from six import string_types -from deepomatic.resource import Resource, ResourceList -from deepomatic.utils import InferenceResource -from deepomatic.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource -from deepomatic.mixins import RequiredArg, OptionnalArg, ImmutableArg, UpdateOnlyArg +from deepomatic.api.api.resource import Resource, ResourceList +from deepomatic.api.api.utils import InferenceResource +from deepomatic.api.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource +from deepomatic.api.api.mixins import RequiredArg, OptionnalArg, ImmutableArg, UpdateOnlyArg ############################################################################### diff --git a/deepomatic/api/resources/task.py b/deepomatic/api/resources/task.py index 0394e31..b3de24b 100644 --- a/deepomatic/api/resources/task.py +++ b/deepomatic/api/resources/task.py @@ -24,9 +24,9 @@ from tenacity import Retrying, wait_random_exponential, stop_after_delay, retry_if_result, before_log, after_log, RetryError -from deepomatic.resource import Resource -from deepomatic.mixins import ListableResource -from deepomatic.exceptions import TaskError, TaskTimeout +from deepomatic.api.api.resource import Resource +from deepomatic.api.api.mixins import ListableResource +from deepomatic.api.api.exceptions import TaskError, TaskTimeout import logging diff --git a/deepomatic/api/utils.py b/deepomatic/api/utils.py index 06e0974..2b94b48 100644 --- a/deepomatic/api/utils.py +++ b/deepomatic/api/utils.py @@ -22,9 +22,9 @@ THE SOFTWARE. """ -from deepomatic.exceptions import DeepomaticException -from deepomatic.resources.task import Task -from deepomatic.inputs import format_inputs +from deepomatic.api.exceptions import DeepomaticException +from deepomatic.api.resources.task import Task +from deepomatic.api.inputs import format_inputs ############################################################################### From b12076106049d2344ffdb093026c99ebd4bda649 Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 16:49:49 +0100 Subject: [PATCH 12/16] Updated readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f12bf3a..58b8519 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ This client have been made in order to help you integrating our services within your apps in python. -Tested on python 2.7 & 3.5. +Tested on python 2.7, 3.4, 3.5, 3.6. # API Documentation @@ -22,15 +22,15 @@ Initialize a client. Does not make any call to the server. ```python -import deepomatic +from deepomatic.api.client import Client # You should find your app_id and api_key in your account on https://developers.deepomatic.com/dashboard -client = deepomatic.Client(app_id, api_key) +client = Client(app_id, api_key) ``` ### Client methods -All client methods can be found in [deepomatic/client.py](deepomatic/client.py) and detail for each type of resource is located in [deepomatic/resources](deepomatic/resources). +All client methods can be found in [deepomatic/api/client.py](deepomatic/api/client.py) and detail for each type of resource is located in [deepomatic/api/resources](deepomatic/api/resources). ### Examples From ce5d999c389332c2b42477261bc23d8612abc689 Mon Sep 17 00:00:00 2001 From: Hugo Maingonnat Date: Thu, 24 Jan 2019 17:05:59 +0100 Subject: [PATCH 13/16] fixed import --- deepomatic/api/__init__.py | 2 +- deepomatic/api/resources/account.py | 2 +- deepomatic/api/resources/network.py | 8 ++++---- deepomatic/api/resources/recognition.py | 8 ++++---- deepomatic/api/resources/task.py | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/deepomatic/api/__init__.py b/deepomatic/api/__init__.py index 82df61a..97cf7a6 100644 --- a/deepomatic/api/__init__.py +++ b/deepomatic/api/__init__.py @@ -1 +1 @@ -from deepomatic.api.api.version import __version__ +from deepomatic.api.version import __version__ diff --git a/deepomatic/api/resources/account.py b/deepomatic/api/resources/account.py index d62faff..d0b26c5 100644 --- a/deepomatic/api/resources/account.py +++ b/deepomatic/api/resources/account.py @@ -22,7 +22,7 @@ THE SOFTWARE. """ -from deepomatic.api.api.resource import Resource +from deepomatic.api.resource import Resource ############################################################################### diff --git a/deepomatic/api/resources/network.py b/deepomatic/api/resources/network.py index 0014327..28dae55 100644 --- a/deepomatic/api/resources/network.py +++ b/deepomatic/api/resources/network.py @@ -25,10 +25,10 @@ from six import string_types import numpy as np -from deepomatic.api.api.resource import Resource -from deepomatic.api.api.utils import InferenceResource -from deepomatic.api.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource -from deepomatic.api.api.mixins import RequiredArg, OptionnalArg, ImmutableArg +from deepomatic.api.resource import Resource +from deepomatic.api.utils import InferenceResource +from deepomatic.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource +from deepomatic.api.mixins import RequiredArg, OptionnalArg, ImmutableArg ############################################################################### diff --git a/deepomatic/api/resources/recognition.py b/deepomatic/api/resources/recognition.py index 68a5196..b8e2974 100644 --- a/deepomatic/api/resources/recognition.py +++ b/deepomatic/api/resources/recognition.py @@ -24,10 +24,10 @@ from six import string_types -from deepomatic.api.api.resource import Resource, ResourceList -from deepomatic.api.api.utils import InferenceResource -from deepomatic.api.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource -from deepomatic.api.api.mixins import RequiredArg, OptionnalArg, ImmutableArg, UpdateOnlyArg +from deepomatic.api.resource import Resource, ResourceList +from deepomatic.api.utils import InferenceResource +from deepomatic.api.mixins import CreateableResource, ListableResource, UpdatableResource, DeletableResource +from deepomatic.api.mixins import RequiredArg, OptionnalArg, ImmutableArg, UpdateOnlyArg ############################################################################### diff --git a/deepomatic/api/resources/task.py b/deepomatic/api/resources/task.py index b3de24b..d6ba23d 100644 --- a/deepomatic/api/resources/task.py +++ b/deepomatic/api/resources/task.py @@ -24,9 +24,9 @@ from tenacity import Retrying, wait_random_exponential, stop_after_delay, retry_if_result, before_log, after_log, RetryError -from deepomatic.api.api.resource import Resource -from deepomatic.api.api.mixins import ListableResource -from deepomatic.api.api.exceptions import TaskError, TaskTimeout +from deepomatic.api.resource import Resource +from deepomatic.api.mixins import ListableResource +from deepomatic.api.exceptions import TaskError, TaskTimeout import logging From 7f0038afa6639b301a15a74df62a066374debf37 Mon Sep 17 00:00:00 2001 From: Thomas Riccardi Date: Fri, 25 Jan 2019 11:58:17 +0100 Subject: [PATCH 14/16] Re-indent the Makefile --- Makefile | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 66f5266..48cd18a 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,16 @@ all: release release: clean - python3 setup.py sdist bdist_wheel + python3 setup.py sdist bdist_wheel clean: - rm -rf build dist *.egg-info + rm -rf build dist *.egg-info publish-test: release - # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload - # https://www.python.org/dev/peps/pep-0440/#post-releases - twine upload --repository-url https://test.pypi.org/legacy/ dist/* + # For testing, note that once one version is uploaded, you have to increment the version number or make a post release to re-upload + # https://www.python.org/dev/peps/pep-0440/#post-releases + twine upload --repository-url https://test.pypi.org/legacy/ dist/* publish: release - # More info here https://packaging.python.org/tutorials/packaging-projects/ - twine upload dist/* + # More info here https://packaging.python.org/tutorials/packaging-projects/ + twine upload dist/* From 6cde6b739173ea15621a2bb32318afda38d127ff Mon Sep 17 00:00:00 2001 From: Thomas Riccardi Date: Fri, 25 Jan 2019 11:58:32 +0100 Subject: [PATCH 15/16] Fix description --- deepomatic/api/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepomatic/api/version.py b/deepomatic/api/version.py index 0786ece..b87509f 100644 --- a/deepomatic/api/version.py +++ b/deepomatic/api/version.py @@ -1,5 +1,5 @@ __title__ = 'deepomatic-api' -__description__ = 'Deepomatic API client', +__description__ = 'Deepomatic API client' __version__ = '0.7.10' __author__ = 'deepomatic' __author_email__ = 'support@deepomatic.com' From af58067d7bee02c08182052325daa90e16a7888f Mon Sep 17 00:00:00 2001 From: Thomas Riccardi Date: Fri, 25 Jan 2019 11:58:40 +0100 Subject: [PATCH 16/16] Fix pypi long description rendering: it's markdowk --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 6161692..bed6697 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ namespace_packages=namespaces, include_package_data=True, long_description=README, + long_description_content_type='text/markdown', data_files=[('', ['requirements.txt'])], install_requires=[str(ir.req) for ir in install_reqs], python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",