diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 377e8c4a9..dd4572911 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -14,7 +14,8 @@ jobs: strategy: max-parallel: 1 matrix: - python-version: [3.7, 3.8] + # TODO: unlock parallel testing by using more API keys + python-version: [3.6] steps: @@ -57,7 +58,7 @@ jobs: mypy -p labelbox --pretty --show-error-codes - name: Install package and test dependencies run: | - pip install tox==3.18.1 tox-gh-actions==1.3.0 + pip install tox==3.18.1 tox-gh-actions==1.3.0 pytest-parallel==0.1.0 # TODO: replace tox.ini with what the Makefile does # to make sure local testing is @@ -72,4 +73,4 @@ jobs: # randall+staging-python@labelbox.com LABELBOX_TEST_API_KEY_STAGING: ${{ secrets.STAGING_LABELBOX_API_KEY }} run: | - tox -- -svv + pytest --workers 2 -svv diff --git a/CHANGELOG.md b/CHANGELOG.md index 31dc844fa..97f7c6f11 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 2.4.7 (2020-09-10) +### Added +* `Ontology` schema for interacting with ontologies and their schema nodes + ## Version 2.4.6 (2020-09-03) ### Fix * fix failing `create_metadata` calls diff --git a/Dockerfile b/Dockerfile index d825f76ab..91c97e336 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3 +FROM python:3.6 COPY . /usr/src/labelbox WORKDIR /usr/src/labelbox diff --git a/labelbox/schema/project.py b/labelbox/schema/project.py index c83b2db96..3d387b7f8 100644 --- a/labelbox/schema/project.py +++ b/labelbox/schema/project.py @@ -15,6 +15,12 @@ from labelbox.orm.model import Entity, Field, Relationship from labelbox.pagination import PaginatedCollection +try: + datetime.fromisoformat # type: ignore[attr-defined] +except AttributeError: + from backports.datetime_fromisoformat import MonkeyPatch + MonkeyPatch.patch_fromisoformat() + logger = logging.getLogger(__name__) diff --git a/setup.py b/setup.py index a5f4cbb0c..8d0f0a610 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="labelbox", - version="2.4.6", + version="2.4.7", author="Labelbox", author_email="engineering@labelbox.com", description="Labelbox Python API", @@ -15,6 +15,8 @@ packages=setuptools.find_packages(), install_requires=[ "backoff==1.10.0", + "backports-datetime-fromisoformat", + "dataclasses", "ndjson==0.3.1", "requests>=2.22.0", "google-api-core>=1.22.1", @@ -23,9 +25,10 @@ 'Development Status :: 3 - Alpha', 'License :: OSI Approved :: Apache Software License', 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', ], - python_requires='>=3.7', + python_requires='>=3.6', keywords=["labelbox"], ) diff --git a/tox.ini b/tox.ini index 709763dea..3297034c3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,9 +1,10 @@ # content of: tox.ini , put in same dir as setup.py [tox] -envlist = py37, py38 +envlist = py36, py37, py38 [gh-actions] python = + 3.6: py36 3.7: py37 3.8: py38