superannotate 4.5.3.dev1__tar.gz → 4.5.4.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. {superannotate-4.5.3.dev1/src/superannotate.egg-info → superannotate-4.5.4.dev1}/PKG-INFO +2 -2
  2. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/requirements.txt +2 -2
  3. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/__init__.py +1 -1
  4. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/aggregators.py +5 -8
  5. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/helpers.py +5 -6
  6. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/base_interface.py +6 -10
  7. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/cli_interface.py +3 -4
  8. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk_interface.py +383 -260
  9. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/types.py +1 -1
  10. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/serializers.py +19 -22
  11. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/conditions.py +3 -2
  12. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/config.py +3 -2
  13. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/base.py +16 -20
  14. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/classes.py +14 -14
  15. superannotate-4.5.4.dev1/src/superannotate/lib/core/entities/filters.py +66 -0
  16. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/folder.py +14 -15
  17. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/integrations.py +1 -1
  18. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/items.py +7 -8
  19. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/multimodal_form.py +28 -30
  20. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/project.py +55 -56
  21. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/work_managament.py +43 -44
  22. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/enums.py +6 -5
  23. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/jsx_conditions.py +22 -22
  24. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/plugin.py +9 -11
  25. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/reporter.py +3 -4
  26. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/repositories.py +4 -5
  27. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/response.py +1 -2
  28. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/service_types.py +40 -42
  29. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/serviceproviders.py +56 -58
  30. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/types.py +5 -6
  31. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/annotations.py +60 -61
  32. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/base.py +4 -3
  33. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/classes.py +3 -2
  34. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/custom_fields.py +4 -5
  35. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/folders.py +4 -3
  36. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/images.py +16 -16
  37. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/integrations.py +5 -6
  38. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/items.py +19 -21
  39. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/models.py +5 -5
  40. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/projects.py +5 -4
  41. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/video_convertor.py +10 -10
  42. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/controller.py +89 -92
  43. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/query_builder.py +47 -26
  44. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/serviceprovider.py +9 -8
  45. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/annotation.py +10 -10
  46. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/annotation_class.py +2 -2
  47. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/explore.py +22 -32
  48. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/folder.py +2 -2
  49. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/http_client.py +8 -8
  50. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/integration.py +2 -2
  51. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/item.py +12 -12
  52. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/item_service.py +1 -2
  53. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/project.py +4 -4
  54. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/telemetry_scoring.py +3 -2
  55. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/work_management.py +12 -14
  56. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/stream_data_handler.py +5 -4
  57. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/utils.py +9 -12
  58. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/validators.py +4 -2
  59. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1/src/superannotate.egg-info}/PKG-INFO +2 -2
  60. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/requires.txt +1 -1
  61. superannotate-4.5.3.dev1/src/superannotate/lib/core/entities/filters.py +0 -62
  62. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/LICENSE +0 -0
  63. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/MANIFEST.in +0 -0
  64. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/README.rst +0 -0
  65. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/setup.cfg +0 -0
  66. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/setup.py +0 -0
  67. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/__init__.py +0 -0
  68. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/__init__.py +0 -0
  69. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/__init__.py +0 -0
  70. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/common.py +0 -0
  71. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/bin/__init__.py +0 -0
  72. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/bin/superannotate.py +0 -0
  73. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/common.py +0 -0
  74. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/exceptions.py +0 -0
  75. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/__init__.py +0 -0
  76. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/conversion.py +0 -0
  77. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/__init__.py +0 -0
  78. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/baseStrategy.py +0 -0
  79. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/__init__.py +0 -0
  80. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_api.py +0 -0
  81. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_converter.py +0 -0
  82. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_strategies.py +0 -0
  83. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_pixel.py +0 -0
  84. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_vector.py +0 -0
  85. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_pixel_to_coco.py +0 -0
  86. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_vector_to_coco.py +0 -0
  87. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/converters.py +0 -0
  88. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/__init__.py +0 -0
  89. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_helper.py +0 -0
  90. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_strategies.py +0 -0
  91. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_to_sa_vector.py +0 -0
  92. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/__init__.py +0 -0
  93. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_strategies.py +0 -0
  94. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_to_sa_vector.py +0 -0
  95. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/__init__.py +0 -0
  96. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_helper.py +0 -0
  97. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_to_sa_vector.py +0 -0
  98. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sa_json_helper.py +0 -0
  99. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/__init__.py +0 -0
  100. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_strategies.py +0 -0
  101. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_to_sa_vector.py +0 -0
  102. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/__init__.py +0 -0
  103. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_helper.py +0 -0
  104. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_strategies.py +0 -0
  105. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_to_sa_vector.py +0 -0
  106. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/__init__.py +0 -0
  107. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_helper.py +0 -0
  108. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_strategies.py +0 -0
  109. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_to_sa_vector.py +0 -0
  110. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/__init__.py +0 -0
  111. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_helper.py +0 -0
  112. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_strategies.py +0 -0
  113. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_pixel.py +0 -0
  114. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_vector.py +0 -0
  115. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vott_converters/__init__.py +0 -0
  116. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_strategies.py +0 -0
  117. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_to_sa_vector.py +0 -0
  118. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/yolo_converters/__init__.py +0 -0
  119. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_strategies.py +0 -0
  120. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_to_sa_vector.py +0 -0
  121. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/export_from_sa_conversions.py +0 -0
  122. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/import_to_sa_conversions.py +0 -0
  123. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/sa_conversion.py +0 -0
  124. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/__init__.py +0 -0
  125. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/__init__.py +0 -0
  126. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/folders.py +0 -0
  127. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/project.py +0 -0
  128. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/__init__.py +0 -0
  129. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/base_usecases.py +0 -0
  130. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/__init__.py +0 -0
  131. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/project_entities.py +0 -0
  132. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/exceptions.py +0 -0
  133. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/__init__.py +0 -0
  134. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/utils.py +0 -0
  135. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/__init__.py +0 -0
  136. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/annotation_adapter.py +0 -0
  137. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/custom_entities.py +0 -0
  138. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/helpers.py +0 -0
  139. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/repositories.py +0 -0
  140. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/__init__.py +0 -0
  141. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/SOURCES.txt +0 -0
  142. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/dependency_links.txt +0 -0
  143. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/entry_points.txt +0 -0
  144. {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: superannotate
3
- Version: 4.5.3.dev1
3
+ Version: 4.5.4.dev1
4
4
  Summary: Python SDK to SuperAnnotate platform
5
5
  Home-page: https://github.com/superannotateai/superannotate-python-sdk
6
6
  Author: SuperAnnotate AI
@@ -26,7 +26,7 @@ Requires-Dist: plotly~=6.5
26
26
  Requires-Dist: pandas~=2.0
27
27
  Requires-Dist: pillow~=12.1
28
28
  Requires-Dist: tqdm~=4.66
29
- Requires-Dist: requests~=2.32
29
+ Requires-Dist: requests~=2.33
30
30
  Requires-Dist: aiofiles~=25.1
31
31
  Requires-Dist: fire~=0.7
32
32
  Requires-Dist: mixpanel~=5.1
@@ -7,9 +7,9 @@ plotly~=6.5
7
7
  pandas~=2.0
8
8
  pillow~=12.1
9
9
  tqdm~=4.66
10
- requests~=2.32
10
+ requests~=2.33
11
11
  aiofiles~=25.1
12
12
  fire~=0.7
13
13
  mixpanel~=5.1
14
14
  typing_extensions~=4.15
15
- superannotate-schemas==1.0.49
15
+ superannotate-schemas==1.0.49
@@ -2,7 +2,7 @@ import logging
2
2
  import os
3
3
  import sys
4
4
 
5
- __version__ = "4.5.3dev1"
5
+ __version__ = "4.5.4dev1"
6
6
 
7
7
 
8
8
  os.environ.update({"sa_version": __version__})
@@ -3,9 +3,6 @@ import json
3
3
  import logging
4
4
  from dataclasses import dataclass
5
5
  from pathlib import Path
6
- from typing import List
7
- from typing import Optional
8
- from typing import Union
9
6
 
10
7
  import lib.core as constances
11
8
  import pandas as pd
@@ -143,8 +140,8 @@ class DataAggregator:
143
140
  def __init__(
144
141
  self,
145
142
  project_type: str,
146
- project_root: Union[str, Path],
147
- folder_names: Optional[List[Union[Path, str]]] = None,
143
+ project_root: str | Path,
144
+ folder_names: list[Path | str] | None = None,
148
145
  ):
149
146
  self.project_type = project_type
150
147
  if isinstance(project_type, str):
@@ -224,7 +221,7 @@ class DataAggregator:
224
221
  raws.append(element_raw)
225
222
  return raws
226
223
 
227
- def aggregate_video_annotations_as_df(self, annotation_paths: List[str]):
224
+ def aggregate_video_annotations_as_df(self, annotation_paths: list[str]):
228
225
  raws = []
229
226
  for annotation_path in annotation_paths:
230
227
  annotation_path = Path(annotation_path)
@@ -306,7 +303,7 @@ class DataAggregator:
306
303
  df = pd.DataFrame([raw.__dict__ for raw in raws], dtype=object)
307
304
  return df.where(pd.notnull(df), None)
308
305
 
309
- def aggregate_document_annotations_as_df(self, annotation_paths: List[str]):
306
+ def aggregate_document_annotations_as_df(self, annotation_paths: list[str]):
310
307
  raws = []
311
308
  for annotation_path in annotation_paths:
312
309
  annotation_path = Path(annotation_path)
@@ -359,7 +356,7 @@ class DataAggregator:
359
356
  df = pd.DataFrame([raw.__dict__ for raw in raws], dtype=object)
360
357
  return df.where(pd.notnull(df), None)
361
358
 
362
- def aggregate_image_annotations_as_df(self, annotations_paths: List[str]):
359
+ def aggregate_image_annotations_as_df(self, annotations_paths: list[str]):
363
360
  with open(self.classes_path) as f:
364
361
  classes_json = json.load(f)
365
362
  class_name_to_color = {}
@@ -1,9 +1,8 @@
1
+ from __future__ import annotations
2
+
1
3
  import os
2
4
  import uuid
3
5
  from pathlib import Path
4
- from typing import List
5
- from typing import Tuple
6
- from typing import Union
7
6
 
8
7
  import boto3
9
8
  import numpy as np
@@ -23,8 +22,8 @@ def get_annotation_paths(folder_path, s3_bucket=None, recursive=False):
23
22
 
24
23
 
25
24
  def get_local_annotation_paths(
26
- folder_path: Union[str, Path], annotation_paths: set, recursive: bool
27
- ) -> List[str]:
25
+ folder_path: str | Path, annotation_paths: set, recursive: bool
26
+ ) -> list[str]:
28
27
  all_items = [*Path(folder_path).glob("*")]
29
28
  all_folders = [i for i in all_items if i.is_dir()]
30
29
  all_not_folders = [i for i in all_items if not i.is_dir()]
@@ -112,7 +111,7 @@ def get_tabulation() -> int:
112
111
  return 48
113
112
 
114
113
 
115
- def wrap_error(errors_list: List[Tuple[str, str]]) -> str:
114
+ def wrap_error(errors_list: list[tuple[str, str]]) -> str:
116
115
  tabulation = get_tabulation()
117
116
  msgs = []
118
117
  for key, value in errors_list:
@@ -3,14 +3,12 @@ import json
3
3
  import os
4
4
  import platform
5
5
  import sys
6
- import typing
6
+ from collections.abc import Iterable
7
+ from collections.abc import Sized
7
8
  from functools import lru_cache
8
9
  from inspect import signature
9
10
  from pathlib import Path
10
11
  from types import FunctionType
11
- from typing import Iterable
12
- from typing import Optional
13
- from typing import Sized
14
12
 
15
13
  import lib.core as constants
16
14
  from lib.app.interface.types import validate_arguments
@@ -30,9 +28,7 @@ class BaseInterfaceFacade:
30
28
  REGISTRY = []
31
29
 
32
30
  @validate_arguments
33
- def __init__(
34
- self, token: Optional[TokenStr] = None, config_path: Optional[str] = None
35
- ):
31
+ def __init__(self, token: TokenStr | None = None, config_path: str | None = None):
36
32
  try:
37
33
  if token:
38
34
  config = ConfigEntity(SA_TOKEN=token)
@@ -75,7 +71,7 @@ class BaseInterfaceFacade:
75
71
  BaseInterfaceFacade.REGISTRY.append(self)
76
72
 
77
73
  @staticmethod
78
- def _retrieve_configs_from_json(path: Path) -> typing.Union[ConfigEntity]:
74
+ def _retrieve_configs_from_json(path: Path) -> ConfigEntity:
79
75
  with open(path) as json_file:
80
76
  json_data = json.load(json_file)
81
77
  token = json_data["token"]
@@ -92,7 +88,7 @@ class BaseInterfaceFacade:
92
88
  return config
93
89
 
94
90
  @staticmethod
95
- def _retrieve_configs_from_ini(path: Path) -> typing.Union[ConfigEntity]:
91
+ def _retrieve_configs_from_ini(path: Path) -> ConfigEntity:
96
92
  import configparser
97
93
 
98
94
  config_parser = configparser.ConfigParser()
@@ -104,7 +100,7 @@ class BaseInterfaceFacade:
104
100
  return ConfigEntity(**config_data)
105
101
 
106
102
  @staticmethod
107
- def _retrieve_configs_from_env() -> typing.Union[ConfigEntity, None]:
103
+ def _retrieve_configs_from_env() -> ConfigEntity | None:
108
104
  token = os.environ.get("SA_TOKEN")
109
105
  if not token:
110
106
  return None
@@ -3,7 +3,6 @@ import sys
3
3
  import tempfile
4
4
  from pathlib import Path
5
5
  from typing import Any
6
- from typing import Optional
7
6
 
8
7
  import lib.core as constances
9
8
  from lib.app.input_converters.conversion import import_annotation
@@ -199,7 +198,7 @@ class CLIFacade:
199
198
  self,
200
199
  project: str,
201
200
  attachments: str,
202
- annotation_status: Optional[Any] = "NotStarted",
201
+ annotation_status: Any | None = "NotStarted",
203
202
  ):
204
203
  """
205
204
  To attach image URLs to project use:
@@ -216,7 +215,7 @@ class CLIFacade:
216
215
  self,
217
216
  project: str,
218
217
  attachments: str,
219
- annotation_status: Optional[Any] = "NotStarted",
218
+ annotation_status: Any | None = "NotStarted",
220
219
  ):
221
220
  SAClient().attach_items(
222
221
  project=project,
@@ -227,7 +226,7 @@ class CLIFacade:
227
226
 
228
227
  @staticmethod
229
228
  def attach_document_urls(
230
- project: str, attachments: str, annotation_status: Optional[Any] = "NotStarted"
229
+ project: str, attachments: str, annotation_status: Any | None = "NotStarted"
231
230
  ):
232
231
  SAClient().attach_items(
233
232
  project=project,