Skip to content

Commit 9b1e73f

Browse files
authored
Merge pull request #394 from superannotateai/friday
Friday
2 parents 7f4cdb1 + cfedef9 commit 9b1e73f

29 files changed

+638
-56
lines changed

docs/source/superannotate.sdk.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Exports
6161
_______
6262

6363
.. autofunction:: superannotate.prepare_export
64+
.. autofunction:: superannotate.get_annotations
65+
.. autofunction:: superannotate.get_annotations_per_frame
6466
.. _ref_download_export:
6567
.. autofunction:: superannotate.download_export
6668
.. autofunction:: superannotate.get_exports

pytest.ini

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

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ mixpanel==4.8.3
1818
pydantic>=1.8.2
1919
pydantic[email]
2020
setuptools~=57.4.0
21-
superannotate_schemas
21+
aiohttp==3.8.1
22+

requirements_dev.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
Sphinx==3.1.2
2-
tox==3.24.2
3-
pytest==6.2.4
4-
pytest-xdist==2.3.0
5-
pytest-parallel==0.1.0
6-
pytest-rerunfailures==10.2
7-
sphinx_rtd_theme==1.0.0
1+
superannotate_schemas>=1.0.38.b1
82

requirements_extra.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
Sphinx==3.1.2
22
tox==3.24.2
3+
pytest==6.2.4
4+
pytest-xdist==2.3.0
5+
pytest-parallel==0.1.0
6+
pytest-rerunfailures==10.2
7+
sphinx_rtd_theme==1.0.0

requirements_prod.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
superannotate_schemas=1.0.39

setup.py

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
import sys
22

3+
from packaging.version import parse
34
from setuptools import find_packages, setup
45

56

67
with open('src/superannotate/version.py') as f:
78
version = f.read().rstrip()[15:-1]
89

10+
requirements_path = "requirements_{}.txt".format('dev' if parse(version).is_prerelease else 'prod')
11+
requirements = []
912

10-
with open('requirements.txt') as f:
11-
requirements = f.read()
12-
requirements = requirements.splitlines()
13+
with open(requirements_path) as f:
14+
requirements.extend(f.read().splitlines())
1315

14-
if sys.platform == 'linux':
15-
with open('requirements_extra.txt') as f:
16-
requirements_extra = f.read()
17-
18-
requirements_extra = requirements_extra.splitlines()
19-
requirements += requirements_extra
16+
with open("requirements.txt") as f:
17+
requirements.extend(f.read().splitlines())
2018

2119
with open('README.md') as f:
2220
readme = f.read()
21+
2322
readme = "\n".join(readme.split('\n')[2:])
2423

2524

src/superannotate/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import requests
66
import superannotate.lib.core as constances
7-
from superannotate.lib import get_default_controller
87
from packaging.version import parse
8+
from superannotate.lib import get_default_controller
99
from superannotate.lib.app.analytics.class_analytics import class_distribution
1010
from superannotate.lib.app.exceptions import AppException
1111
from superannotate.lib.app.input_converters.conversion import convert_json_version
@@ -50,6 +50,7 @@
5050
from superannotate.lib.app.interface.sdk_interface import download_image
5151
from superannotate.lib.app.interface.sdk_interface import download_image_annotations
5252
from superannotate.lib.app.interface.sdk_interface import download_model
53+
from superannotate.lib.app.interface.sdk_interface import get_annotations
5354
from superannotate.lib.app.interface.sdk_interface import get_exports
5455
from superannotate.lib.app.interface.sdk_interface import get_folder_metadata
5556
from superannotate.lib.app.interface.sdk_interface import get_image_annotations
@@ -107,7 +108,6 @@
107108
)
108109
from superannotate.lib.app.interface.sdk_interface import validate_annotations
109110
from superannotate.logger import get_default_logger
110-
from superannotate.lib.infrastructure.controller import Controller
111111
from superannotate.version import __version__
112112

113113

@@ -128,6 +128,8 @@
128128
"class_distribution",
129129
"aggregate_annotations_as_df",
130130
"get_exports",
131+
# annotations
132+
"get_annotations",
131133
# converters
132134
"convert_json_version",
133135
"import_annotation",

src/superannotate/lib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@
99
def get_default_controller():
1010
from lib.infrastructure.controller import Controller
1111
return Controller.get_default()
12-

src/superannotate/lib/app/analytics/aggregators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import copy
22
import json
3-
from dataclasses import dataclass
43
from pathlib import Path
54
from typing import List
65
from typing import Optional
76
from typing import Union
87

98
import lib.core as constances
109
import pandas as pd
10+
from dataclasses import dataclass
1111
from lib.app.exceptions import AppException
1212
from lib.core import ATTACHED_VIDEO_ANNOTATION_POSTFIX
1313
from lib.core import PIXEL_ANNOTATION_POSTFIX

0 commit comments

Comments
 (0)