Skip to content

Commit 907a3cd

Browse files
committed
Merge branch 'folder_structure2'
2 parents 3e0afc8 + 7d9f952 commit 907a3cd

File tree

85 files changed

+1752
-7386
lines changed

Some content is hidden

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

85 files changed

+1752
-7386
lines changed

.coveragerc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
[run]
22
branch = True
3-
omit =
4-
# copied pycocotools module from github
5-
superannotate/pycocotools_sa/*
63

74

85
[report]

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,4 @@ pylint.html
140140
_mask.c
141141
tags
142142
temp
143+
debug_*

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"python.formatting.provider": "yapf",
3-
"python.linting.pylintPath": "~/miniconda3/bin/pylint",
3+
"python.linting.pylintPath": "venv_sa_conv/bin/pylint",
44
"python.linting.pylintEnabled": true,
55
"python.testing.pytestArgs": [
66
"tests"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 SuperAnnotate AI
3+
Copyright (c) 2021 SuperAnnotate AI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ PYTESTS=pytest
88
COVERAGE=coverage
99

1010
tests: check_formatting docs
11-
$(PYTESTS) -n 8 --full-trace tests
11+
$(PYTESTS) -n auto --full-trace tests
1212

1313
stress-tests: SA_STRESS_TESTS=1
1414
stress-tests: tests

docs/source/cli.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ To create a new project:
4949
5050
----------
5151

52+
Creating a folder in a project
53+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
54+
55+
To create a new folder:
56+
57+
.. code-block:: bash
58+
59+
superannotatecli create-folder --project <project_name> --name <folder_name>
60+
61+
----------
62+
5263
.. _ref_upload_images:
5364

5465
Uploading images

docs/source/superannotate.sdk.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ ________
3030
.. _ref_get_project_metadata:
3131
.. autofunction:: superannotate.get_project_metadata
3232
.. autofunction:: superannotate.get_project_image_count
33+
.. autofunction:: superannotate.get_project_and_folder_metadata
34+
.. autofunction:: superannotate.create_folder
35+
.. autofunction:: superannotate.delete_folders
36+
.. autofunction:: superannotate.rename_folder
3337
.. autofunction:: superannotate.upload_images_to_project
3438
.. autofunction:: superannotate.upload_images_from_public_urls_to_project
3539
.. autofunction:: superannotate.upload_images_from_google_cloud_to_project
@@ -73,16 +77,20 @@ ______
7377
.. autofunction:: superannotate.get_image_bytes
7478
.. autofunction:: superannotate.download_image
7579
.. autofunction:: superannotate.set_image_annotation_status
80+
.. autofunction:: superannotate.set_images_annotation_statuses
7681
.. autofunction:: superannotate.get_image_annotations
7782
.. autofunction:: superannotate.get_image_preannotations
7883
.. autofunction:: superannotate.download_image_annotations
7984
.. autofunction:: superannotate.download_image_preannotations
8085
.. autofunction:: superannotate.upload_image_annotations
8186
.. autofunction:: superannotate.copy_image
87+
.. autofunction:: superannotate.copy_images
8288
.. autofunction:: superannotate.move_image
89+
.. autofunction:: superannotate.move_images
8390
.. autofunction:: superannotate.pin_image
8491
.. autofunction:: superannotate.assign_images
8592
.. autofunction:: superannotate.delete_image
93+
.. autofunction:: superannotate.delete_images
8694
.. autofunction:: superannotate.add_annotation_bbox_to_image
8795
.. autofunction:: superannotate.add_annotation_polygon_to_image
8896
.. autofunction:: superannotate.add_annotation_polyline_to_image

install.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@ pip install -e .
1717
# pip install superannotate
1818

1919
# for testing
20-
pip install pytest pytest-xdist
20+
pip install pytest pytest-xdist pytest-timeout
2121

2222
# for coverage
2323
pip install coverage pytest-cov
2424

2525
# for linting
2626
pip install pylint pylint-json2html pylint-pytest
2727

28+
# for formatting
29+
pip install yapf
30+
2831
# for docs
2932
pip install sphinx sphinx_rtd_theme
3033

pytest.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[pytest]
2+
timeout = 300
3+
timeout_method=thread

superannotate/__init__.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import json
21
import logging
3-
from pathlib import Path
42

53
import packaging.version
64
import requests
@@ -54,8 +52,14 @@ def consensus(*args, **kwargs):
5452
get_image_metadata, get_image_preannotations, search_images,
5553
set_image_annotation_status, upload_image_annotations
5654
)
55+
from .db.project_api import (
56+
create_folder, delete_folders, get_folder_metadata,
57+
get_project_and_folder_metadata, rename_folder, search_folders,
58+
set_images_annotation_statuses
59+
)
5760
from .db.project_images import (
58-
assign_images, copy_image, move_image, pin_image, upload_image_to_project
61+
assign_images, copy_image, copy_images, delete_images, move_image,
62+
move_images, pin_image, upload_image_to_project
5963
)
6064
from .db.project_metadata import get_project_metadata
6165
from .db.projects import (
@@ -86,15 +90,14 @@ def consensus(*args, **kwargs):
8690
SANonExistingProjectNameException
8791
)
8892
from .input_converters.conversion import (
89-
coco_split_dataset, convert_project_type, export_annotation,
90-
import_annotation, convert_json_version
93+
coco_split_dataset, convert_json_version, convert_project_type,
94+
export_annotation, import_annotation
9195
)
9296
from .ml.ml_funcs import (
9397
delete_model, download_model, plot_model_metrics, run_prediction,
9498
run_segmentation, run_training, stop_model_training
9599
)
96100
from .ml.ml_models import search_models
97-
98101
from .old_to_new_format_convertor import update_json_format
99102
from .version import __version__
100103

0 commit comments

Comments
 (0)