Skip to content

Commit 610c541

Browse files
committed
Merge branch 'friday' into assests_provider
# Conflicts: # src/superannotate/lib/app/interface/sdk_interface.py # src/superannotate/lib/core/service_types.py # src/superannotate/lib/core/serviceproviders.py # src/superannotate/lib/infrastructure/controller.py # src/superannotate/lib/infrastructure/services.py # tests/unit/test_validators.py
2 parents 52aca0a + 5face32 commit 610c541

Some content is hidden

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

58 files changed

+3241
-1017
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:

CHANGELOG.md

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,92 @@
11
# Changelog
2-
All release higlighths of this project will be documented in this file.
2+
All release highlights of this project will be documented in this file.
3+
## 4.4.1 - July 24, 2022
4+
### Added
5+
- `SAClient.create_custom_fields()` _method_ to create/add new custom fields to a project’s custom field schema.
6+
- `SAClient.get_custom_fields()` _method_ to get a project’s custom field schema.
7+
- `SAClient.delete_custom_fields()` _method_ to remove existing custom fields from a project’s custom field schema.
8+
- `SAClient.upload_custom_values()` _method_ to attach custom field-value pairs to items.
9+
- `SAClient.delete_custom_values()` _method_ to remove custom field-value pairs from items.
10+
### Updated
11+
- the **schema** of `classes JSON` to support the new `"default_value"` key to set a default attribute(s) for a given attribute group.
12+
- `SAClient.get_item_metadata()` _method_ to add a new input argument `include_custom_metadata` to return custom metadata in the result items.
13+
- `SAClient.search_items()` _method_ to add a new input argument `include_custom_metadata` to return custom metadata in the result items.
14+
- `SAClient.query()` _method_ to return custom metadata in the result items.
15+
### Fixed
16+
- `SAClient` _class_ to address the system crash that occurs on instantiation via `config.json` file.
17+
- `SAClient.query()` _method_ to address the issue of not returning more than 50 items.
18+
- `SAClient.upload_annotations_from_folder_to_project()` to address the issue of some fields not being auto populated after the upload is finished.
19+
- `SAClient.get_folder_metadata()`, `SAClient.search_folders()` to address the issue of transforming the ‘+’ sign in a folder to a whitespace.
20+
### Removed
21+
- `superannotate.assign_images()` _function_. Please use the `SAClient.assign_items()` _method_ instead.
22+
- `superannotate.unassign_images()` _function_. Please use the `SAClient.unassign_items()` _method_ instead.
23+
- `superannotate.delete_images()` _function_. Please use the `SAClient.delete_items()` _method_ instead.
24+
###
25+
## 4.4.0 - July 03, 2022
26+
### Added
27+
- `superannotate.SAClient()` _class_ to instantiate team-level authentication and inheriting methods to access the back-end.
28+
- `SAClient.download_annotations()` _method_ to download annotations without preparing an Export object.
29+
- `SAClient.get_subsets()` _method_ to get the existing subsets for a given project.
30+
- `SAClient.assign_items()` _method_ to assign items in a given project to annotators or quality specialists.
31+
- `SAClient.unassign_items()` _method_ to remove assignments from items.
32+
- `SAClient.delete_items()` _method_ to delete items in a given project.
33+
### Updated
34+
- `JSON Schema` for video annotations to version `1.0.45` to show **polygon** and **polyline** annotations.
35+
- `SAClient.get_annotations_per_frame()` _method_ to show **polygon** and **polyline** annotations.
36+
- `SAClient.get_annotations_per_frame()` _method_ to pick instances closer to a given **frame start** instead of the **median**.
37+
- `SAClient.query()` _method_ to add the `subset` argument to support querying in a subset.
38+
### Fixed
39+
- `SAClient.set_annotation_statuses()` _method_ to address the issue occurring with more than 500 items.
40+
- `SAClient.get_annotations()` _method_ to address the `PayloadError` occurring with more than 20000 items.
41+
- `SAClient.get_annotations()` _method_ to address the missing `'duration'` and `'tags'` keys for newly uploaded and unannotated videos.
42+
- `SAClient.get_annotations_per_frame()` _method_ to address missing `'duration'` and `'tags'` keys for newly uploaded and unannotated videos.
43+
- `SAClient.get_annotations_per_frame()` _method_ to address the wrong `classId` value for unclassified instances.
44+
### Removed
45+
- `superannotate.init()` _function_. Please instantiate `superannotate.SAClient()` _class_ to authenticate.
46+
- `superannotate.set_image_annotation_status()` _function_. Please use the `SAClient.set_annotation_statuses()` _method_ instead.
47+
- `superannotate.set_images_annotations_statuses()` _function_. Please use the `SAClient.set_annotation_statuses()` _method_ instead.
48+
## 4.3.4 - May 22, 2022
49+
### Updated
50+
- `JSON Schema` for video annotations to version `x` to reflect point annotations.
51+
- `superannotate.download_export()` function to preserve SA folder structure while downloading to S3 bucket.
52+
- `superannotate.get_item_metadata()` function to have string type values instead of int type for the `approval_status` key.
53+
- `superannotate.get_item_metadata()` function to change the value for the `path` key in the item metadata from `project/folder/item` format to `project/folder`.
54+
- `superannotate.get_item_metadata()` function to add the `is_pinned` key in the returned metadata.
55+
- `superannotate.clone_project()` function to have `NotStarted` project status for the newly created project.
56+
### Fixed
57+
- `superannotate.query()` function to address the missing value for the `path` key.
58+
- `superannotate.import_annotation()` function to address the extension issue with JPEG files while converting from `VOC` to SA.
59+
- `superannotate.import_annotation()` function to address int type pointlabels in the converted `JSON` from `COCO` to SA.
60+
- `superannotate_get_annotations()` & `superannotate.add_annotation_comment_to_image()` to address the issue with `asyncio` occuring on Windows.
61+
- `superannotate.set_image_annotation_status()` function add a deprecation warning.
62+
- `superannotate.set_images_annotation_statuses()` function add a deprecation warning.
63+
### Removed
64+
- `share_projects()` function.
65+
- `superannotate.attach_image_urls_to_project()` function. Please use the `superannotate.attach_items()` function instead.
66+
- `superannotate.attach_document_urls_to_project()` function. Please use the `superannotate.attach_items()` function instead.
67+
- `superannotate.attach_video_urls_to_project()` function. Please use the `superannotate.attach_items()` function instead.
68+
- `superannotate.copy_images()` function. Please use the `superannotate.copy_items()` function instead.
69+
- `superannotate.move_images()` function. Please use the `superannotate.move_items()` function instead.
70+
###
71+
## 4.3.3 - May 01 2022
72+
### Added
73+
- `attach_items()` function to link items (images, videos, and documents) from external storages to SuperAnnotate using URLs.
74+
- `copy_items()` function to copy items (images, videos, and documents) in bulk between folders in a project.
75+
- `move_items()` function to move items (images, videos, and documents) in bulk between folders in a project.
76+
- `set_annotation_statuses()` function to change the annotation status of items (images, videos, and documents) in bulk.
77+
### Updated
78+
- `aggregate_annotations_as_df()` function now supports Text Projects.
79+
### Fixed
80+
- `validate_annotations()` function to accept only numeric type values for the `points` field.
81+
- `prepare_export()` function to address the issue when the entire project is prepared when a wrong folder name is provided.
82+
- `search_team_contributors()` function to address the error message when `email` parameter is used.
83+
- `get_item_metadata()` to address the issue with approved/disapproved items.
84+
### Removed
85+
- `get_project_and_folder_metadata()` function.
86+
- `get_image_metadata()` function. Please use `get_item_metadata()` instead.
87+
- `search_images()` function. Please use `search_items()` instead.
88+
- `search images_all_folders()` function. Please use `search_items()` instead.
89+
###
390
## 4.3.2 - April 10 2022
491
### Added
592
- `query()` function to run SAQuL queries via SDK.

docs/source/conf.py

Lines changed: 10 additions & 2 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 ---------------------------------------------------
@@ -54,3 +55,10 @@
5455
html_static_path = []
5556

5657
autodoc_typehints = "description"
58+
html_show_sourcelink = False
59+
60+
html_context = {
61+
"display_github": False, # Add 'Edit on Github' link instead of 'View page source'
62+
"last_updated": True,
63+
"commit": False,
64+
}

docs/source/index.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ SuperAnnotate Python SDK allows access to the platform without web browser:
2929

3030
.. code-block:: python
3131
32-
import superannotate as sa
32+
from superannotate import SAClient
33+
34+
sa = SAClient()
3335
3436
sa.create_project("Example Project 1", "example", "Vector")
3537

docs/source/superannotate.sdk.rst

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ API Reference
88
Remote functions
99
----------------
1010

11-
Initialization and authentication
11+
Instantiation and authentication
1212
_________________________________
1313

14-
.. automethod:: superannotate.SAClient.__init__
14+
.. autoclass:: superannotate.SAClient
1515

1616

17-
.. _ref_projects:
18-
1917
Projects
2018
________
2119

@@ -73,25 +71,42 @@ ______
7371
.. automethod:: superannotate.SAClient.attach_items
7472
.. automethod:: superannotate.SAClient.copy_items
7573
.. automethod:: superannotate.SAClient.move_items
74+
.. automethod:: superannotate.SAClient.delete_items
75+
.. automethod:: superannotate.SAClient.assign_items
76+
.. automethod:: superannotate.SAClient.unassign_items
7677
.. automethod:: superannotate.SAClient.get_item_metadata
7778
.. automethod:: superannotate.SAClient.set_annotation_statuses
7879

7980
----------
8081

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+
93+
Subsets
94+
______
95+
96+
.. automethod:: superannotate.SAClient.get_subsets
97+
98+
----------
99+
81100
Images
82101
______
83102

84103

85104
.. _ref_search_images:
86105
.. automethod:: superannotate.SAClient.download_image
87-
.. automethod:: superannotate.SAClient.set_image_annotation_status
88-
.. automethod:: superannotate.SAClient.set_images_annotation_statuses
89106
.. automethod:: superannotate.SAClient.download_image_annotations
90107
.. automethod:: superannotate.SAClient.upload_image_annotations
91108
.. automethod:: superannotate.SAClient.copy_image
92109
.. automethod:: superannotate.SAClient.pin_image
93-
.. automethod:: superannotate.SAClient.assign_images
94-
.. automethod:: superannotate.SAClient.delete_images
95110
.. automethod:: superannotate.SAClient.add_annotation_bbox_to_image
96111
.. automethod:: superannotate.SAClient.add_annotation_point_to_image
97112
.. automethod:: superannotate.SAClient.add_annotation_comment_to_image
@@ -399,4 +414,4 @@ Utility functions
399414
--------------------------------
400415

401416
.. autofunction:: superannotate.SAClient.consensus
402-
.. autofunction:: superannotate.SAClient.benchmark
417+
.. autofunction:: superannotate.SAClient.benchmark

0 commit comments

Comments
 (0)