Skip to content

Commit 5fb87b3

Browse files
authored
Merge pull request #716 from superannotateai/develop
Develop
2 parents be6e92a + bbd34be commit 5fb87b3

File tree

82 files changed

+2678
-1712
lines changed

Some content is hidden

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

82 files changed

+2678
-1712
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ __pycache__/
1313
# Distribution / packaging
1414
.Python
1515
build/
16+
1617
develop-eggs/
1718
dist/
1819
downloads/

.pre-commit-config.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: 'https://github.com/asottile/reorder_python_imports'
3-
rev: v2.3.0
3+
rev: v3.13.0
44
hooks:
55
- id: reorder-python-imports
66
exclude: src/lib/app/analytics | src/lib/app/converters | src/lib/app/input_converters
@@ -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,W605
24+
- --ignore=D100,D203,D405,W503,E203,E501,F841,E126,E712,E123,E131,F821,E121,W605,E402
2525
- repo: 'https://github.com/asottile/pyupgrade'
2626
rev: v2.4.3
2727
hooks:
@@ -48,6 +48,19 @@ repos:
4848
- id: trailing-whitespace
4949
- id: end-of-file-fixer
5050
files: \.rst$
51+
# - repo: https://github.com/pre-commit/mirrors-mypy
52+
# rev: v1.11.2
53+
# hooks:
54+
# - id: mypy
55+
# additional_dependencies: [ types-six ]
56+
# - repo: 'https://github.com/PyCQA/pylint'
57+
# rev: v2.13.9
58+
# hooks:
59+
# - id: pylint
60+
# name: Python Linter (pylint)
61+
# exclude: tests/|src/lib/app/converters/|src/lib/app/analytics/|src/lib/app/input_converters/
62+
# args:
63+
# - '--disable=R0903,C0111,C0301,W0703,R0914,R0801,R0913,E0401,W0511,C0413,R0902,C0103,W0201,C0209,W1203,W0707,C0415,W0611'
5164
# - repo: 'https://github.com/asottile/dead'
5265
# rev: v1.3.0
5366
# hooks:

.pylintrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[VARIABLES]
2+
good-names=i,j,k,e,x,y,z,a,b,f,sa

CHANGELOG.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,24 @@ History
55
=======
66

77
All release highlights of this project will be documented in this file.
8+
4.4.25 - Sep 30, 2024
9+
________________________
10+
11+
**Added**
12+
13+
- ``SAClient.create_project`` method, a new ``workflow`` argument has been added to define the workflow for the project.
14+
- ``SAClient.get_project_steps`` method, added instead of ``get_project_workflow`` function.
15+
- ``SAClient.set_project_steps`` method, added instead of ``set_project_workflow`` function.
16+
- ``SAClient.list_items`` method has been added to search for items using advanced filtering criteria.
17+
18+
19+
**Updated**
20+
21+
- ``SAClient.create_project`` method, removed ``workflows`` argument, use ``set_project_steps`` function instead.
22+
- ``SAClient.clone_project`` method, removed ``copy_workflow`` argument, use ``set_project_steps`` function instead.
23+
- ``SAClient.get_project_metadata`` method, removed ``include_workflow`` argument, use ``get_project_steps`` function instead.
24+
- ``SAClient.get_project_workflow`` method deprecated, use ``get_project_steps`` function instead.
25+
- ``SAClient.set_project_workflow`` method deprecated, use ``set_project_steps`` function instead.
826

927
4.4.24 - July 2, 2024
1028
_______________________

docs/source/api_reference/api_item.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Items
55

66
.. automethod:: superannotate.SAClient.query
77
.. automethod:: superannotate.SAClient.get_item_by_id
8+
.. automethod:: superannotate.SAClient.list_items
89
.. automethod:: superannotate.SAClient.search_items
910
.. automethod:: superannotate.SAClient.attach_items
1011
.. automethod:: superannotate.SAClient.copy_items

docs/source/api_reference/api_metadata.rst

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ Project metadata example:
2828
}
2929
3030
31+
----------
32+
33+
Folder metadata
34+
_________________
35+
36+
Folder metadata example:
37+
38+
.. code-block:: python
39+
40+
{
41+
"name": "Example folder",
42+
"status": "NotStarted"
43+
}
44+
45+
3146
----------
3247

3348
Setting metadata
@@ -89,45 +104,29 @@ Item metadata example:
89104
.. code-block:: python
90105
91106
{
92-
"name": "example.jpeg",
93-
"path": "project/folder_1/meow.jpeg",
94-
"url": "https://sa-public-files.s3.../text_file_example_1.jpeg",
95-
"annotation_status": "NotStarted",
96-
"annotator_name": None,
97-
"qa_name": None,
98-
"entropy_value": None,
99-
"createdAt": "2022-02-15T20:46:44.000Z",
100-
"updatedAt": "2022-02-15T20:46:44.000Z"
101-
}
102-
103-
----------
104-
105-
106-
Image metadata
107-
_______________
108-
109-
110-
Image metadata example:
111-
112-
.. code-block:: python
113-
114-
{
115-
"name": "000000000001.jpg",
116-
"annotation_status": "Completed",
117-
"prediction_status": "NotStarted",
118-
"segmentation_status": "NotStarted",
119-
"annotator_id": None,
120-
"annotator_name": None,
121-
"qa_id": None,
122-
"qa_name": None,
123-
"entropy_value": None,
124-
"approval_status": None,
125-
"createdAt": "2020-08-18T07:30:06.000Z",
126-
"updatedAt": "2020-08-18T07:30:06.000Z"
127-
"is_pinned": 0,
128-
"...": "...",
107+
"createdAt": "2022-09-14T07:06:53.000Z",
108+
"updatedAt": "2022-09-30T13:14:26.000Z",
109+
"id": 33027004,
110+
"name": "5199856037_03d1929b7b_o.jpg",
111+
"path": "New Classes",
112+
"url": "None",
113+
"assignments": [
114+
{
115+
"user_role": "Annotator",
116+
"user_id": "annotator@example.com"
117+
},
118+
{
119+
"user_role": "QA",
120+
"user_id": "qa@example.com"
121+
}
122+
],
123+
"entropy_value": "None",
124+
"custom_metadata": {
125+
"study_date": "2021-12-31",
126+
"patient_id": "A1234567890",
127+
"medical_specialist": "dr.smith@clinic.com",
128+
}
129129
}
130-
131130
132131
----------
133132

docs/source/api_reference/api_project.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,7 @@ Projects
2222
.. automethod:: superannotate.SAClient.add_contributors_to_project
2323
.. automethod:: superannotate.SAClient.get_project_settings
2424
.. automethod:: superannotate.SAClient.set_project_default_image_quality_in_editor
25+
.. automethod:: superannotate.SAClient.set_project_steps
26+
.. automethod:: superannotate.SAClient.get_project_steps
2527
.. automethod:: superannotate.SAClient.set_project_workflow
2628
.. automethod:: superannotate.SAClient.get_project_workflow

docs/source/userguide/quickstart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Custom config.ini example:
8585
8686
[DEFAULT]
8787
SA_TOKEN = <token>
88-
LOGGING_LEVEL = DEBUG
88+
LOGGING_LEVEL = INFO
8989
LOGGING_PATH = /Users/username/data/superannotate_logs
9090
9191
----------

pytest.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ minversion = 3.7
33
log_cli=true
44
python_files = test_*.py
55
;pytest_plugins = ['pytest_profiling']
6-
;addopts = -n auto --dist=loadscope
7-
6+
addopts = -n 2 --dist loadscope

setup.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@
66

77

88
def get_version():
9-
init = open(
9+
with open(
1010
os.path.join(os.path.dirname(__file__), "src", "superannotate", "__init__.py")
11-
).read()
12-
version_re = re.compile(
13-
r"""__version__ = ["']((\d+)\.(\d+)\.(\d+)((dev(\d+))?(b(\d+))?))['"]"""
14-
)
15-
return version_re.search(init).group(1)
11+
) as f:
12+
init = f.read()
13+
version_re = re.compile(
14+
r"""__version__ = ["']((\d+)\.(\d+)\.(\d+)((dev(\d+))?(b(\d+))?))['"]"""
15+
)
16+
return version_re.search(init).group(1)
1617

1718

1819
sdk_version = get_version()
@@ -22,6 +23,8 @@ def get_version():
2223
with open("requirements.txt") as f:
2324
requirements.extend(f.read().splitlines())
2425

26+
with open("README.rst") as f:
27+
long_description = f.read()
2528

2629
setup(
2730
name="superannotate",
@@ -38,7 +41,7 @@ def get_version():
3841
author="SuperAnnotate AI",
3942
author_email="support@superannotate.com",
4043
url="https://github.com/superannotateai/superannotate-python-sdk",
41-
long_description=open("README.rst").read(),
44+
long_description=long_description,
4245
long_description_content_type="text/x-rst",
4346
install_requires=requirements,
4447
setup_requires=["wheel"],

0 commit comments

Comments
 (0)