Skip to content

Commit b6ee64b

Browse files
committed
2 parents b1e80cd + c7ffa66 commit b6ee64b

File tree

8 files changed

+37
-28
lines changed

8 files changed

+37
-28
lines changed

docs/source/index.rst

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,13 @@ for COCO annotation format converters support also need to install:
5151

5252
.. code-block:: bash
5353
54-
pip install 'git+https://github.com/cocodataset/panopticapi.git'
55-
pip install 'git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI'
54+
pip install "git+https://github.com/cocodataset/panopticapi.git"
55+
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
5656
5757
The package officially supports Python 3.6+ and was tested under Linux platform.
58-
For Windows based Anaconda distribution
59-
you might also need to install :py:obj:`shapely` package separately:
6058

61-
.. code-block:: bash
62-
63-
conda install shapely
64-
65-
For further steps please have a look at the :ref:`tutorial <ref_tutorial>`.
59+
For more detailed installation steps and package usage please have a look at
60+
the :ref:`tutorial <ref_tutorial>`.
6661

6762
----------
6863

docs/source/tutorial.sdk.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,21 @@ for COCO annotation format converters support also need to install:
2121

2222
.. code-block:: bash
2323
24-
pip install 'git+https://github.com/cocodataset/panopticapi.git'
25-
pip install 'git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI'
24+
pip install "git+https://github.com/cocodataset/panopticapi.git"
25+
pip install "git+https://github.com/philferriere/cocoapi.git#egg=pycocotools&subdirectory=PythonAPI"
2626
2727
The package officially supports Python 3.6+ and was tested under Linux platform.
28+
2829
For Windows based Anaconda distribution
2930
you might also need to install :py:obj:`shapely` package separately:
3031

3132
.. code-block:: bash
3233
3334
conda install shapely
3435
36+
and also need to install C++ build tools from `Microsoft Visual Studio Tools
37+
<https://visualstudio.microsoft.com/visual-cpp-build-tools/>`_.
38+
3539
----------
3640

3741
Config file

superannotate/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import numpy as np
21
import functools
32
import logging
43
from pathlib import Path
54

5+
import numpy as np
6+
67
from .exceptions import SABaseException
78

89
logger = logging.getLogger("superannotate-python-sdk")

superannotate/db/projects.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44
import logging
55
import math
6+
import os
67
import random
78
import threading
89
import tempfile
@@ -462,10 +463,12 @@ def upload_videos_from_folder_to_project(
462463
for extension in extensions:
463464
if not recursive_subfolders:
464465
paths += list(Path(folder_path).glob(f'*.{extension.lower()}'))
465-
paths += list(Path(folder_path).glob(f'*.{extension.upper()}'))
466+
if os.name != "nt":
467+
paths += list(Path(folder_path).glob(f'*.{extension.upper()}'))
466468
else:
467469
paths += list(Path(folder_path).rglob(f'*.{extension.lower()}'))
468-
paths += list(Path(folder_path).rglob(f'*.{extension.upper()}'))
470+
if os.name != "nt":
471+
paths += list(Path(folder_path).rglob(f'*.{extension.upper()}'))
469472
filtered_paths = []
470473
for path in paths:
471474
not_in_exclude_list = [
@@ -552,10 +555,16 @@ def upload_images_from_folder_to_project(
552555
for extension in extensions:
553556
if not recursive_subfolders:
554557
paths += list(Path(folder_path).glob(f'*.{extension.lower()}'))
555-
paths += list(Path(folder_path).glob(f'*.{extension.upper()}'))
558+
if os.name != "nt":
559+
paths += list(
560+
Path(folder_path).glob(f'*.{extension.upper()}')
561+
)
556562
else:
557563
paths += list(Path(folder_path).rglob(f'*.{extension.lower()}'))
558-
paths += list(Path(folder_path).rglob(f'*.{extension.upper()}'))
564+
if os.name != "nt":
565+
paths += list(
566+
Path(folder_path).rglob(f'*.{extension.upper()}')
567+
)
559568
else:
560569
s3_client = boto3.client('s3')
561570
paginator = s3_client.get_paginator('list_objects_v2')

superannotate/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.3.11"
1+
__version__ = "2.3.15"

tests/test_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_cli_image_upload_project_export(tmpdir):
1818
sa.delete_project(pr)
1919
subprocess.run(
2020
[
21-
f"superannotate create-project --name '{PROJECT_NAME}' --description gg --type Vector "
21+
f'superannotate create-project --name "{PROJECT_NAME}" --description gg --type Vector '
2222
],
2323
check=True,
2424
shell=True
@@ -29,7 +29,7 @@ def test_cli_image_upload_project_export(tmpdir):
2929
)
3030
subprocess.run(
3131
[
32-
f"superannotate upload-images --project '{PROJECT_NAME}' --folder ./tests/sample_recursive_test --extensions=jpg --set-annotation-status QualityCheck"
32+
f'superannotate upload-images --project "{PROJECT_NAME}" --folder ./tests/sample_recursive_test --extensions=jpg --set-annotation-status QualityCheck'
3333
],
3434
check=True,
3535
shell=True
@@ -38,7 +38,7 @@ def test_cli_image_upload_project_export(tmpdir):
3838
assert len(sa.search_images(project)) == 1
3939
subprocess.run(
4040
[
41-
f"superannotate upload-images --project '{PROJECT_NAME}' --folder ./tests/sample_recursive_test --extensions=jpg --recursive"
41+
f'superannotate upload-images --project "{PROJECT_NAME}" --folder ./tests/sample_recursive_test --extensions=jpg --recursive'
4242
],
4343
check=True,
4444
shell=True
@@ -51,7 +51,7 @@ def test_cli_image_upload_project_export(tmpdir):
5151
)
5252
subprocess.run(
5353
[
54-
f"superannotate export-project --project '{PROJECT_NAME}' --folder {tmpdir}"
54+
f'superannotate export-project --project "{PROJECT_NAME}" --folder {tmpdir}'
5555
],
5656
check=True,
5757
shell=True
@@ -64,7 +64,7 @@ def test_cli_image_upload_project_export(tmpdir):
6464

6565
subprocess.run(
6666
[
67-
f"superannotate export-project --project '{PROJECT_NAME}' --folder {tmpdir} --include-fuse"
67+
f'superannotate export-project --project "{PROJECT_NAME}" --folder {tmpdir} --include-fuse'
6868
],
6969
check=True,
7070
shell=True

tests/test_preannotation_upload_cli.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_preannotation_folder_upload_download_cli(
3535
)
3636
subprocess.run(
3737
[
38-
f"superannotate upload-preannotations --project '{name}' --folder '{from_folder}'"
38+
f'superannotate upload-preannotations --project "{name}" --folder "{from_folder}"'
3939
],
4040
check=True,
4141
shell=True
@@ -73,7 +73,7 @@ def test_annotation_folder_upload_download_cli_vector_COCO(tmpdir):
7373
# )
7474
subprocess.run(
7575
[
76-
f"superannotate upload-annotations --project '{name}' --folder '{from_folder}' --format COCO --task {task} --dataset-name {dataset_name}"
76+
f'superannotate upload-annotations --project "{name}" --folder "{from_folder}" --format COCO --task {task} --dataset-name {dataset_name}'
7777
],
7878
check=True,
7979
shell=True
@@ -111,7 +111,7 @@ def test_preannotation_folder_upload_download_cli_vector_COCO(tmpdir):
111111
# )
112112
subprocess.run(
113113
[
114-
f"superannotate upload-preannotations --project '{name}' --folder '{from_folder}' --format COCO --task {task} --dataset-name {dataset_name}"
114+
f'superannotate upload-preannotations --project "{name}" --folder "{from_folder}" --format COCO --task {task} --dataset-name {dataset_name}'
115115
],
116116
check=True,
117117
shell=True
@@ -149,7 +149,7 @@ def test_preannotation_folder_upload_download_cli_vector_object_COCO(tmpdir):
149149
# )
150150
subprocess.run(
151151
[
152-
f"superannotate upload-preannotations --project '{name}' --folder '{from_folder}' --format COCO --task {task} --dataset-name {dataset_name}"
152+
f'superannotate upload-preannotations --project "{name}" --folder "{from_folder}" --format COCO --task {task} --dataset-name {dataset_name}'
153153
],
154154
check=True,
155155
shell=True
@@ -177,7 +177,7 @@ def test_preannotation_folder_upload_download_cli_pixel_object_COCO(tmpdir):
177177
# )
178178
subprocess.run(
179179
[
180-
f"superannotate upload-preannotations --project '{name}' --folder '{from_folder}' --format COCO --task {task} --dataset-name {dataset_name}"
180+
f'superannotate upload-preannotations --project "{name}" --folder "{from_folder}" --format COCO --task {task} --dataset-name {dataset_name}'
181181
],
182182
check=True,
183183
shell=True

tests/test_video.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_image_quality_setting1(tmpdir):
3232

3333
subprocess.run(
3434
[
35-
f"superannotate upload-videos --project '{PROJECT_NAME2}' --folder ./tests/sample_videos --target-fps 2"
35+
f'superannotate upload-videos --project "{PROJECT_NAME2}" --folder ./tests/sample_videos --target-fps 2'
3636
],
3737
check=True,
3838
shell=True

0 commit comments

Comments
 (0)