File tree Expand file tree Collapse file tree 8 files changed +44
-14
lines changed
Expand file tree Collapse file tree 8 files changed +44
-14
lines changed Original file line number Diff line number Diff line change 22minversion = 3.0
33log_cli =true
44python_files = test_*.py
5- ; addopts = -n32 --dist=loadscope
5+ addopts = -n32 --dist =loadscope
Original file line number Diff line number Diff line change 2727 name = 'superannotate' ,
2828 version = version ,
2929 package_dir = {"" : "src" },
30-
30+ package_data = { "superannotate" : [ "logging.conf" ]},
3131 packages = find_packages (where = "src" ),
3232 description = 'Python SDK to SuperAnnotate platform' ,
3333 license = 'MIT' ,
Original file line number Diff line number Diff line change 1+ import logging
2+ import logging .config
3+
14from superannotate .lib .app .analytics .class_analytics import attribute_distribution
25from superannotate .lib .app .analytics .class_analytics import class_distribution
36from superannotate .lib .app .annotation_helpers import add_annotation_bbox_to_json
243246 "upload_videos_from_folder_to_project" ,
244247 # Annotation Section
245248 "create_annotation_class" ,
249+ "delete_annotation_class" ,
246250 "prepare_export" ,
247251 "download_export" ,
248252 "set_images_annotation_statuses" ,
284288]
285289
286290__author__ = "Superannotate"
291+ import os
292+ file_dir = os .path .split (os .path .realpath (__file__ ))[0 ]
293+
294+ logging .config .fileConfig (os .path .join (file_dir , "logging.conf" ))
Original file line number Diff line number Diff line change 4545from tqdm import tqdm
4646
4747
48- logging .basicConfig (level = logging .INFO )
49- formatter = logging .Formatter (fmt = "SA-PYTHON-SDK - %(levelname)s - %(message)s" )
50-
51- handler = logging .StreamHandler ()
52- handler .setFormatter (formatter )
53-
5448logger = logging .getLogger ("superannotate-python-sdk" )
55- logger .setLevel (logging .INFO )
56- logger .addHandler (handler )
5749
5850controller = Controller (logger )
5951
Original file line number Diff line number Diff line change @@ -1940,6 +1940,7 @@ def execute(self):
19401940 project = self ._projects .get_one (
19411941 uuid = self ._project .uuid , team_id = self ._project .team_id
19421942 )
1943+ data ["project" ] = project
19431944 if self ._include_complete_image_count :
19441945 projects = self ._projects .get_all (
19451946 condition = (
@@ -1950,8 +1951,6 @@ def execute(self):
19501951 )
19511952 if projects :
19521953 data ["project" ] = projects [0 ]
1953- else :
1954- data ["project" ] = project
19551954
19561955 if self ._include_annotation_classes :
19571956 self .annotation_classes_use_case .execute ()
Original file line number Diff line number Diff line change 66from typing import Tuple
77from urllib .parse import urljoin
88
9- import lib .core as constance
109import requests
10+ from requests .packages .urllib3 .exceptions import InsecureRequestWarning
11+ import lib .core as constance
1112from lib .core .exceptions import AppException
1213from lib .core .serviceproviders import SuerannotateServiceProvider
1314from requests .exceptions import HTTPError
1415
16+ requests .packages .urllib3 .disable_warnings ()
17+
1518
1619class BaseBackendService (SuerannotateServiceProvider ):
1720 AUTH_TYPE = "sdk"
Original file line number Diff line number Diff line change 1+ [loggers]
2+ keys=root,superannotate-python-sdk
3+
4+ [handlers]
5+ keys=consoleHandler
6+
7+ [formatters]
8+ keys=consoleFormatter
9+
10+ [logger_root]
11+ level=DEBUG
12+ handlers=consoleHandler
13+
14+ [logger_superannotate-python-sdk]
15+ level=DEBUG
16+ handlers=consoleHandler
17+ qualname=consoleFormatter
18+ propagate=0
19+
20+ [handler_consoleHandler]
21+ class=StreamHandler
22+ level=INFO
23+ formatter=consoleFormatter
24+ args=(sys.stdout,)
25+
26+ [formatter_consoleFormatter]
27+ format=SA-PYTHON-SDK - %(levelname)s - %(message)s
28+ datefmt=
Original file line number Diff line number Diff line change @@ -13,5 +13,5 @@ def test_get_project_default_image_quality_in_editor(self):
1313 self .assertIsNotNone (sa .get_project_default_image_quality_in_editor (self .PROJECT_NAME ))
1414
1515 def test_get_project_metadata (self ):
16- metadata = sa .get_team_metadata ( )
16+ metadata = sa .get_project_metadata ( include_complete_image_count = True )
1717 pass
You can’t perform that action at this time.
0 commit comments