Skip to content

Commit da766e6

Browse files
authored
Merge pull request #478 from superannotateai/develop
Develop
2 parents 87d1181 + c5a93c5 commit da766e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1526
-754
lines changed

.github/workflows/checks_and_dev_deploy.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/pre_release.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
1-
name: Release
1+
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
22

33
on:
44
release:
5-
types: [released]
6-
5+
types: [prereleased,released]
6+
77
jobs:
8-
deploy:
9-
runs-on: ubuntu-20.04
8+
build-n-publish:
9+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
10+
runs-on: ubuntu-18.04
1011
steps:
11-
- uses: actions/checkout@v2
12-
- name: Set up Python
13-
uses: actions/setup-python@v2
14-
with:
15-
python-version: "3.7"
16-
- name: Install dependencies
17-
run: |
18-
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine packaging
20-
- name: Create distribution files
21-
run: python setup.py sdist
22-
- name: Publish distribution to PyPI
23-
if: startsWith(github.ref, 'refs/tags')
24-
uses: pypa/gh-action-pypi-publish@master
25-
with:
26-
password: ${{ secrets.pypi_password }}
27-
verbose: true
28-
12+
- uses: actions/checkout@v2
13+
- name: Set up Python
14+
uses: actions/setup-python@v1
15+
with:
16+
python-version: "3.7"
17+
- name: Install pypi/build
18+
run: >-
19+
python -m
20+
pip install
21+
build
22+
--user
23+
- name: Build a binary wheel and a source tarball
24+
run: >-
25+
python -m
26+
build
27+
--sdist
28+
--wheel
29+
--outdir dist/
30+
.
31+
- name: Publish distribution 📦 to PyPI
32+
if: startsWith(github.ref, 'refs/tags')
33+
uses: pypa/gh-action-pypi-publish@master
34+
with:
35+
password: ${{ secrets.pypi_password }}
36+
verbose: true

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
name: Style Guide Enforcement (flake8)
2222
args:
2323
- '--max-line-length=120'
24-
- --ignore=D100,D203,D405,W503,E203,E501,F841,E126,E712,E123,E131,F821,E121
24+
- --ignore=D100,D203,D405,W503,E203,E501,F841,E126,E712,E123,E131,F821,E121,W605
2525
- repo: 'https://github.com/asottile/pyupgrade'
2626
rev: v2.4.3
2727
hooks:

docs/source/conf.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
#
1313
import os
1414
import sys
15-
sys.path.insert(0, os.path.abspath('../../src'))
1615

16+
sys.path.insert(0, os.path.abspath('../../src'))
1717

1818
# -- Project information -----------------------------------------------------
1919

@@ -22,7 +22,8 @@
2222
author = 'SuperAnnotate AI'
2323

2424
# The full version, including alpha/beta/rc tags
25-
from superannotate.version import __version__
25+
from superannotate import __version__
26+
2627
release = __version__
2728

2829
# -- General configuration ---------------------------------------------------
@@ -57,7 +58,7 @@
5758
html_show_sourcelink = False
5859

5960
html_context = {
60-
"display_github": False, # Add 'Edit on Github' link instead of 'View page source'
61-
"last_updated": True,
62-
"commit": False,
63-
}
61+
"display_github": False, # Add 'Edit on Github' link instead of 'View page source'
62+
"last_updated": True,
63+
"commit": False,
64+
}

docs/source/superannotate.sdk.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,17 @@ ______
7979

8080
----------
8181

82+
Custom Metadata
83+
______
84+
85+
.. automethod:: superannotate.SAClient.create_custom_fields
86+
.. automethod:: superannotate.SAClient.get_custom_fields
87+
.. automethod:: superannotate.SAClient.delete_custom_fields
88+
.. automethod:: superannotate.SAClient.upload_custom_values
89+
.. automethod:: superannotate.SAClient.delete_custom_values
90+
91+
----------
92+
8293
Subsets
8394
______
8495

@@ -96,8 +107,6 @@ ______
96107
.. automethod:: superannotate.SAClient.upload_image_annotations
97108
.. automethod:: superannotate.SAClient.copy_image
98109
.. automethod:: superannotate.SAClient.pin_image
99-
.. automethod:: superannotate.SAClient.assign_images
100-
.. automethod:: superannotate.SAClient.delete_images
101110
.. automethod:: superannotate.SAClient.add_annotation_bbox_to_image
102111
.. automethod:: superannotate.SAClient.add_annotation_point_to_image
103112
.. automethod:: superannotate.SAClient.add_annotation_comment_to_image

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
5-
;addopts = -n auto --dist=loadscope
5+
addopts = -n auto --dist=loadscope

setup.py

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
1-
from packaging.version import parse
1+
import os
2+
import re
3+
24
from setuptools import find_packages, setup
35

46

5-
with open('src/superannotate/version.py') as f:
6-
version = f.read().rstrip()[15:-1]
7+
def get_version():
8+
init = open(os.path.join(os.path.dirname(__file__), 'src', 'superannotate', '__init__.py')).read()
9+
version_re = re.compile(r'''__version__ = ["']((\d+)\.(\d+)\.(\d+)((dev(\d+))?(b(\d+))?))['"]''')
10+
return version_re.search(init).group(1)
11+
12+
13+
sdk_version = get_version()
14+
15+
16+
requirements_path = "requirements_{}.txt".format('dev' if 'dev' in sdk_version else 'prod')
717

8-
requirements_path = "requirements_{}.txt".format('dev' if parse(version).is_prerelease else 'prod')
918
requirements = []
1019

1120
with open("requirements.txt") as f:
@@ -23,14 +32,13 @@
2332

2433
setup(
2534
name='superannotate',
26-
version=version,
35+
version=sdk_version,
2736
package_dir={"": "src"},
2837
package_data={"superannotate": ["logging.conf"]},
2938
packages=find_packages(where="src"),
3039
description='Python SDK to SuperAnnotate platform',
3140
license='MIT',
3241
author='SuperAnnotate AI',
33-
author_email='vaghinak@superannotate.com',
3442
url='https://github.com/superannotateai/superannotate-python-sdk',
3543
long_description=readme,
3644
long_description_content_type='text/markdown',
@@ -40,5 +48,17 @@
4048
entry_points={
4149
'console_scripts': ['superannotatecli = superannotate.lib.app.bin.superannotate:main']
4250
},
43-
python_requires='>=3.6'
51+
classifiers=[
52+
'Programming Language :: Python',
53+
'Programming Language :: Python :: 3',
54+
'Programming Language :: Python :: 3.7',
55+
'Programming Language :: Python :: 3.8',
56+
'Programming Language :: Python :: 3.9',
57+
'Programming Language :: Python :: 3.10',
58+
'Programming Language :: Python :: 3.11',
59+
],
60+
project_urls={
61+
'Documentation': 'https://superannotate.readthedocs.io/en/stable/',
62+
},
63+
python_requires='>=3.7'
4464
)

src/superannotate/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import os
22
import sys
33

4+
__version__ = "4.4.1b5"
5+
46
sys.path.append(os.path.split(os.path.realpath(__file__))[0])
57

68
import logging.config # noqa
@@ -19,7 +21,6 @@
1921
from superannotate.lib.core import PACKAGE_VERSION_MAJOR_UPGRADE # noqa
2022
from superannotate.lib.core import PACKAGE_VERSION_UPGRADE # noqa
2123
from superannotate.logger import get_default_logger # noqa
22-
from superannotate.version import __version__ # noqa
2324
import superannotate.lib.core.enums as enums # noqa
2425

2526
SESSIONS = {}

0 commit comments

Comments
 (0)