File tree Expand file tree Collapse file tree 8 files changed +37
-28
lines changed
Expand file tree Collapse file tree 8 files changed +37
-28
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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+
2829For Windows based Anaconda distribution
2930you 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
3741Config file
Original file line number Diff line number Diff line change 1- import numpy as np
21import functools
32import logging
43from pathlib import Path
54
5+ import numpy as np
6+
67from .exceptions import SABaseException
78
89logger = logging .getLogger ("superannotate-python-sdk" )
Original file line number Diff line number Diff line change 33import json
44import logging
55import math
6+ import os
67import random
78import threading
89import 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' )
Original file line number Diff line number Diff line change 1- __version__ = "2.3.11 "
1+ __version__ = "2.3.15 "
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments