superannotate 4.4.24.dev2__tar.gz → 4.4.25.dev2__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 (148) hide show
  1. {superannotate-4.4.24.dev2/src/superannotate.egg-info → superannotate-4.4.25.dev2}/PKG-INFO +1 -1
  2. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/setup.py +10 -7
  3. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/__init__.py +15 -16
  4. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/analytics/aggregators.py +10 -10
  5. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/analytics/common.py +1 -1
  6. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/common.py +2 -2
  7. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/helpers.py +5 -49
  8. superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/__init__.py +10 -0
  9. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/conversion.py +2 -2
  10. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/baseStrategy.py +1 -2
  11. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_converter.py +6 -3
  12. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/sa_conversion.py +1 -1
  13. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/base_interface.py +2 -3
  14. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/cli_interface.py +2 -2
  15. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/sdk_interface.py +531 -426
  16. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/serializers.py +12 -34
  17. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/__init__.py +0 -4
  18. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/conditions.py +1 -1
  19. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/__init__.py +5 -5
  20. superannotate-4.4.25.dev2/src/superannotate/lib/core/entities/base.py +318 -0
  21. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/items.py +10 -7
  22. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/project.py +17 -51
  23. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/enums.py +49 -54
  24. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/exceptions.py +6 -0
  25. superannotate-4.4.25.dev2/src/superannotate/lib/core/jsx_conditions.py +84 -0
  26. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/reporter.py +0 -1
  27. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/service_types.py +28 -28
  28. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/serviceproviders.py +89 -124
  29. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/types.py +0 -11
  30. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/annotations.py +95 -48
  31. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/classes.py +7 -5
  32. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/custom_fields.py +5 -7
  33. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/images.py +106 -82
  34. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/items.py +158 -515
  35. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/models.py +4 -181
  36. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/projects.py +25 -54
  37. superannotate-4.4.25.dev2/src/superannotate/lib/infrastructure/__init__.py +0 -0
  38. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/controller.py +228 -118
  39. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/serviceprovider.py +67 -99
  40. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/annotation.py +3 -5
  41. superannotate-4.4.25.dev2/src/superannotate/lib/infrastructure/services/explore.py +203 -0
  42. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/http_client.py +31 -8
  43. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/item.py +5 -104
  44. superannotate-4.4.25.dev2/src/superannotate/lib/infrastructure/services/item_service.py +46 -0
  45. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/project.py +5 -86
  46. superannotate-4.4.25.dev2/src/superannotate/lib/infrastructure/services/work_management.py +56 -0
  47. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/stream_data_handler.py +2 -1
  48. superannotate-4.4.25.dev2/src/superannotate/lib/infrastructure/utils.py +153 -0
  49. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2/src/superannotate.egg-info}/PKG-INFO +1 -1
  50. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate.egg-info/SOURCES.txt +4 -4
  51. superannotate-4.4.24.dev2/src/superannotate/lib/app/exceptions.py +0 -7
  52. superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/__init__.py +0 -10
  53. superannotate-4.4.24.dev2/src/superannotate/lib/core/entities/base.py +0 -324
  54. superannotate-4.4.24.dev2/src/superannotate/lib/core/utils.py +0 -4
  55. superannotate-4.4.24.dev2/src/superannotate/lib/infrastructure/services/custom_field.py +0 -58
  56. superannotate-4.4.24.dev2/src/superannotate/lib/infrastructure/services/models.py +0 -24
  57. superannotate-4.4.24.dev2/src/superannotate/lib/infrastructure/services/subset.py +0 -56
  58. superannotate-4.4.24.dev2/src/superannotate/lib/infrastructure/utils.py +0 -35
  59. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/LICENSE +0 -0
  60. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/MANIFEST.in +0 -0
  61. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/README.rst +0 -0
  62. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/requirements.txt +0 -0
  63. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/setup.cfg +0 -0
  64. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/__init__.py +0 -0
  65. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/__init__.py +0 -0
  66. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/analytics/__init__.py +0 -0
  67. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/bin/__init__.py +0 -0
  68. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/bin/superannotate.py +0 -0
  69. /superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/__init__.py → /superannotate-4.4.25.dev2/src/superannotate/lib/app/exceptions.py +0 -0
  70. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/coco_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters}/__init__.py +0 -0
  71. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/dataloop_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/coco_converters}/__init__.py +0 -0
  72. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_api.py +0 -0
  73. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_strategies.py +0 -0
  74. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_pixel.py +0 -0
  75. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_to_sa_vector.py +0 -0
  76. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_pixel_to_coco.py +0 -0
  77. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/coco_converters/sa_vector_to_coco.py +0 -0
  78. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/converters.py +0 -0
  79. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/googlecloud_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/dataloop_converters}/__init__.py +0 -0
  80. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_helper.py +0 -0
  81. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_strategies.py +0 -0
  82. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_to_sa_vector.py +0 -0
  83. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/labelbox_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/googlecloud_converters}/__init__.py +0 -0
  84. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_strategies.py +0 -0
  85. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_to_sa_vector.py +0 -0
  86. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/sagemaker_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/labelbox_converters}/__init__.py +0 -0
  87. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_helper.py +0 -0
  88. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_strategies.py +0 -0
  89. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_to_sa_pixel.py +0 -0
  90. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_to_sa_vector.py +0 -0
  91. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/sa_json_helper.py +0 -0
  92. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/supervisely_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/sagemaker_converters}/__init__.py +0 -0
  93. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_strategies.py +0 -0
  94. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_to_sa_pixel.py +0 -0
  95. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_to_sa_vector.py +0 -0
  96. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/vgg_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/supervisely_converters}/__init__.py +0 -0
  97. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_helper.py +0 -0
  98. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_strategies.py +0 -0
  99. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_to_sa_pixel.py +0 -0
  100. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_to_sa_vector.py +0 -0
  101. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/voc_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/vgg_converters}/__init__.py +0 -0
  102. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_helper.py +0 -0
  103. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_strategies.py +0 -0
  104. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_to_sa_vector.py +0 -0
  105. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/vott_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/voc_converters}/__init__.py +0 -0
  106. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_helper.py +0 -0
  107. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_strategies.py +0 -0
  108. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_pixel.py +0 -0
  109. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_to_sa_vector.py +0 -0
  110. {superannotate-4.4.24.dev2/src/superannotate/lib/app/input_converters/converters/yolo_converters → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/vott_converters}/__init__.py +0 -0
  111. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_strategies.py +0 -0
  112. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_to_sa_vector.py +0 -0
  113. {superannotate-4.4.24.dev2/src/superannotate/lib/app/interface → superannotate-4.4.25.dev2/src/superannotate/lib/app/input_converters/converters/yolo_converters}/__init__.py +0 -0
  114. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_strategies.py +0 -0
  115. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_to_sa_vector.py +0 -0
  116. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/export_from_sa_conversions.py +0 -0
  117. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/input_converters/import_to_sa_conversions.py +0 -0
  118. {superannotate-4.4.24.dev2/src/superannotate/lib/app/interface/sdk → superannotate-4.4.25.dev2/src/superannotate/lib/app/interface}/__init__.py +0 -0
  119. {superannotate-4.4.24.dev2/src/superannotate/lib/infrastructure → superannotate-4.4.25.dev2/src/superannotate/lib/app/interface/sdk}/__init__.py +0 -0
  120. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/sdk/folders.py +0 -0
  121. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/sdk/project.py +0 -0
  122. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/app/interface/types.py +0 -0
  123. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/base_usecases.py +0 -0
  124. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/config.py +0 -0
  125. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/classes.py +0 -0
  126. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/folder.py +0 -0
  127. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/integrations.py +0 -0
  128. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/entities/project_entities.py +0 -0
  129. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/plugin.py +0 -0
  130. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/pydantic_v1.py +0 -0
  131. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/repositories.py +0 -0
  132. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/response.py +0 -0
  133. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/__init__.py +0 -0
  134. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/base.py +0 -0
  135. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/folders.py +0 -0
  136. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/usecases/integrations.py +0 -0
  137. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/core/video_convertor.py +0 -0
  138. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/helpers.py +0 -0
  139. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/repositories.py +0 -0
  140. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/__init__.py +0 -0
  141. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/annotation_class.py +0 -0
  142. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/folder.py +0 -0
  143. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/services/integration.py +0 -0
  144. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate/lib/infrastructure/validators.py +0 -0
  145. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate.egg-info/dependency_links.txt +0 -0
  146. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate.egg-info/entry_points.txt +0 -0
  147. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/src/superannotate.egg-info/requires.txt +0 -0
  148. {superannotate-4.4.24.dev2 → superannotate-4.4.25.dev2}/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.4.24.dev2
3
+ Version: 4.4.25.dev2
4
4
  Summary: Python SDK to SuperAnnotate platform
5
5
  Home-page: https://github.com/superannotateai/superannotate-python-sdk
6
6
  Author: SuperAnnotate AI
@@ -6,13 +6,14 @@ from setuptools import setup
6
6
 
7
7
 
8
8
  def get_version():
9
- init = open(
9
+ with open(
10
10
  os.path.join(os.path.dirname(__file__), "src", "superannotate", "__init__.py")
11
- ).read()
12
- version_re = re.compile(
13
- r"""__version__ = ["']((\d+)\.(\d+)\.(\d+)((dev(\d+))?(b(\d+))?))['"]"""
14
- )
15
- return version_re.search(init).group(1)
11
+ ) as f:
12
+ init = f.read()
13
+ version_re = re.compile(
14
+ r"""__version__ = ["']((\d+)\.(\d+)\.(\d+)((dev(\d+))?(b(\d+))?))['"]"""
15
+ )
16
+ return version_re.search(init).group(1)
16
17
 
17
18
 
18
19
  sdk_version = get_version()
@@ -22,6 +23,8 @@ requirements = []
22
23
  with open("requirements.txt") as f:
23
24
  requirements.extend(f.read().splitlines())
24
25
 
26
+ with open("README.rst") as f:
27
+ long_description = f.read()
25
28
 
26
29
  setup(
27
30
  name="superannotate",
@@ -38,7 +41,7 @@ setup(
38
41
  author="SuperAnnotate AI",
39
42
  author_email="support@superannotate.com",
40
43
  url="https://github.com/superannotateai/superannotate-python-sdk",
41
- long_description=open("README.rst").read(),
44
+ long_description=long_description,
42
45
  long_description_content_type="text/x-rst",
43
46
  install_requires=requirements,
44
47
  setup_requires=["wheel"],
@@ -3,23 +3,23 @@ import os
3
3
  import sys
4
4
 
5
5
 
6
- __version__ = "4.4.24dev2"
6
+ __version__ = "4.4.25dev2"
7
7
 
8
+ os.environ.update({"sa_version": __version__})
8
9
  sys.path.append(os.path.split(os.path.realpath(__file__))[0])
9
10
 
10
- import logging.config # noqa
11
- import requests # noqa
12
- from packaging.version import parse # noqa
13
- from superannotate.lib.app.input_converters import convert_project_type # noqa
14
- from superannotate.lib.app.exceptions import AppException # noqa
15
- from superannotate.lib.app.input_converters import convert_project_type # noqa
16
- from superannotate.lib.app.input_converters import export_annotation # noqa
17
- from superannotate.lib.app.input_converters import import_annotation # noqa
18
- from superannotate.lib.app.interface.sdk_interface import SAClient # noqa
19
- from superannotate.lib.core import PACKAGE_VERSION_INFO_MESSAGE # noqa
20
- from superannotate.lib.core import PACKAGE_VERSION_MAJOR_UPGRADE # noqa
21
- from superannotate.lib.core import PACKAGE_VERSION_UPGRADE # noqa
22
- import superannotate.lib.core.enums as enums # noqa
11
+ import requests
12
+ from lib.core import enums
13
+ from packaging.version import parse
14
+ from lib.core import PACKAGE_VERSION_UPGRADE
15
+ from lib.core import PACKAGE_VERSION_INFO_MESSAGE
16
+ from lib.core import PACKAGE_VERSION_MAJOR_UPGRADE
17
+ from lib.core.exceptions import AppException
18
+ from lib.app.input_converters import convert_project_type
19
+ from lib.app.input_converters import export_annotation
20
+ from lib.app.input_converters import import_annotation
21
+ from lib.app.interface.sdk_interface import SAClient
22
+
23
23
 
24
24
  SESSIONS = {}
25
25
 
@@ -30,7 +30,6 @@ __all__ = [
30
30
  # Utils
31
31
  "enums",
32
32
  "AppException",
33
- # converters
34
33
  "import_annotation",
35
34
  "export_annotation",
36
35
  "convert_project_type",
@@ -62,5 +61,5 @@ def log_version_info():
62
61
  logging.warning(PACKAGE_VERSION_UPGRADE.format(local_version, pip_version))
63
62
 
64
63
 
65
- if not os.environ.get("SA_VERSION_CHECK", "True").lower() == "false":
64
+ if os.environ.get("SA_VERSION_CHECK", "True").lower() != "false":
66
65
  log_version_info()
@@ -9,9 +9,9 @@ from typing import Union
9
9
 
10
10
  import lib.core as constances
11
11
  import pandas as pd
12
- from lib.app.exceptions import AppException
13
12
  from lib.core import PIXEL_ANNOTATION_POSTFIX
14
13
  from lib.core import VECTOR_ANNOTATION_POSTFIX
14
+ from lib.core.exceptions import AppException
15
15
 
16
16
  logger = logging.getLogger("sa")
17
17
 
@@ -210,16 +210,16 @@ class DataAggregator:
210
210
  constances.ProjectType.PIXEL,
211
211
  ):
212
212
  return self.aggregate_image_annotations_as_df(annotation_paths)
213
- elif self.project_type is constances.ProjectType.VIDEO:
213
+ if self.project_type is constances.ProjectType.VIDEO:
214
214
  return self.aggregate_video_annotations_as_df(annotation_paths)
215
- elif self.project_type is constances.ProjectType.DOCUMENT:
215
+ if self.project_type is constances.ProjectType.DOCUMENT:
216
216
  return self.aggregate_document_annotations_as_df(annotation_paths)
217
- else:
218
- raise AppException(
219
- f"The function is not supported for {self.project_type.name} projects."
220
- )
217
+ raise AppException(
218
+ f"The function is not supported for {self.project_type.name} projects."
219
+ )
221
220
 
222
- def __add_attributes_to_raws(self, raws, attributes, element_raw):
221
+ @staticmethod
222
+ def __add_attributes_to_raws(raws, attributes, element_raw):
223
223
  for attribute_id, attribute in enumerate(attributes):
224
224
  attribute_raw = copy.copy(element_raw)
225
225
  attribute_raw.attributeId = attribute_id
@@ -366,8 +366,8 @@ class DataAggregator:
366
366
  return df.where(pd.notnull(df), None)
367
367
 
368
368
  def aggregate_image_annotations_as_df(self, annotations_paths: List[str]):
369
-
370
- classes_json = json.load(open(self.classes_path))
369
+ with open(self.classes_path) as f:
370
+ classes_json = json.load(f)
371
371
  class_name_to_color = {}
372
372
  class_group_name_to_values = {}
373
373
  rows = []
@@ -4,7 +4,7 @@ from pathlib import Path
4
4
 
5
5
  import pandas as pd
6
6
  import plotly.express as px
7
- from lib.app.exceptions import AppException
7
+ from lib.core.exceptions import AppException
8
8
 
9
9
 
10
10
  logger = logging.getLogger("sa")
@@ -54,8 +54,8 @@ def id2rgb(id_map):
54
54
 
55
55
 
56
56
  def write_to_json(output_path, json_data):
57
- with open(output_path, "w") as fw:
58
- json.dump(json_data, fw, indent=2)
57
+ with open(output_path, "w") as f:
58
+ json.dump(json_data, f, indent=2)
59
59
 
60
60
 
61
61
  MAX_IMAGE_SIZE = 100 * 1024 * 1024 # 100 MB limit
@@ -8,10 +8,10 @@ from typing import Union
8
8
  import boto3
9
9
  import numpy as np
10
10
  import pandas as pd
11
- from superannotate.lib.app.exceptions import AppException
12
- from superannotate.lib.core import ATTACHED_VIDEO_ANNOTATION_POSTFIX
13
- from superannotate.lib.core import PIXEL_ANNOTATION_POSTFIX
14
- from superannotate.lib.core import VECTOR_ANNOTATION_POSTFIX
11
+ from lib.core import ATTACHED_VIDEO_ANNOTATION_POSTFIX
12
+ from lib.core import PIXEL_ANNOTATION_POSTFIX
13
+ from lib.core import VECTOR_ANNOTATION_POSTFIX
14
+ from lib.core.exceptions import AppException
15
15
 
16
16
 
17
17
  def get_annotation_paths(folder_path, s3_bucket=None, recursive=False):
@@ -77,50 +77,6 @@ def get_s3_annotation_paths(folder_path, s3_bucket, annotation_paths, recursive)
77
77
  return list(set(annotation_paths))
78
78
 
79
79
 
80
- def convert_column_to_lowercase(df, column_name):
81
- actual_column_name = next(
82
- (col for col in df.columns if col.lower() == column_name.lower()), None
83
- )
84
- if actual_column_name:
85
- df = df.rename(columns={actual_column_name: column_name})
86
- else:
87
- raise Exception(f"Column '{column_name}' not found.")
88
- return df
89
-
90
-
91
- def truncate_long_names(name, length=120):
92
- if len(name) > length:
93
- return name[:length]
94
- else:
95
- return name
96
-
97
-
98
- def get_gen_ai_csv_data(csv_path):
99
- def serializer_name(val):
100
- if not str(val).strip():
101
- val = str(uuid.uuid4())
102
- val = truncate_long_names(val)
103
- return val
104
-
105
- def df_preprocessing(df):
106
- """
107
- Convert the name column to lowercase
108
- Fill all empty cells with empty strings
109
- Truncating the name column or generating UUID for empties
110
- :param df:
111
- :return: df
112
- """
113
- df = convert_column_to_lowercase(df, "_item_name")
114
- df = df.fillna("")
115
- df["_item_name"] = df["_item_name"].apply(serializer_name)
116
- return df
117
-
118
- df = pd.read_csv(csv_path, engine="python", quotechar='"', dtype=str)
119
- df = df.drop(columns=["_folder"], errors="ignore")
120
- df = df_preprocessing(df)
121
- return df.to_dict(orient="records")
122
-
123
-
124
80
  def get_name_url_duplicated_from_csv(csv_path):
125
81
  image_data = pd.read_csv(csv_path, dtype=str)
126
82
  image_data.replace({pd.NA: None}, inplace=True)
@@ -167,5 +123,5 @@ def wrap_error(errors_list: List[Tuple[str, str]]) -> str:
167
123
  _tabulation = tabulation - len(key)
168
124
  if not key:
169
125
  key, value, _tabulation = value, "", 0
170
- msgs.append("{}{}{}".format(key, " " * _tabulation, value))
126
+ msgs.append(f'{key}{ " " * _tabulation}{value}')
171
127
  return "\n".join(msgs)
@@ -0,0 +1,10 @@
1
+ from lib.app.input_converters.conversion import convert_project_type
2
+ from lib.app.input_converters.conversion import export_annotation
3
+ from lib.app.input_converters.conversion import import_annotation
4
+
5
+
6
+ __all__ = [
7
+ "convert_project_type",
8
+ "export_annotation",
9
+ "import_annotation",
10
+ ]
@@ -8,10 +8,10 @@ from argparse import Namespace
8
8
  from pathlib import Path
9
9
  from typing import Union
10
10
 
11
- from lib.app.exceptions import AppException
12
11
  from lib.app.interface.base_interface import Tracker
13
12
  from lib.core import LIMITED_FUNCTIONS
14
13
  from lib.core.enums import ProjectType
14
+ from lib.core.exceptions import AppException
15
15
  from typing_extensions import Literal
16
16
 
17
17
  from .export_from_sa_conversions import export_from_sa
@@ -198,7 +198,7 @@ def export_annotation(
198
198
  ProjectType.VIDEO.name,
199
199
  ProjectType.DOCUMENT.name,
200
200
  ]:
201
- raise AppException(LIMITED_FUNCTIONS[ProjectType.get_value(project_type)])
201
+ raise AppException(LIMITED_FUNCTIONS[ProjectType(project_type).value])
202
202
 
203
203
  params_info = [
204
204
  (input_dir, "input_dir", (str, Path)),
@@ -140,8 +140,7 @@ class baseStrategy:
140
140
  def __init__(self, args):
141
141
  if args.dataset_format not in ("COCO", "VOC"):
142
142
  logger.warning(
143
- "Beta feature. %s to SuperAnnotate annotation format converter is in BETA state."
144
- % args.dataset_format
143
+ f"Beta feature. {args.dataset_format} to SuperAnnotate annotation format converter is in BETA state."
145
144
  )
146
145
  self.project_type = args.project_type
147
146
  self.dataset_name = args.dataset_name
@@ -81,7 +81,8 @@ class CocoBaseStrategy(baseStrategy):
81
81
  }
82
82
  return out_json
83
83
 
84
- def convert_from_old_sa_to_new(self, old_json_data, project_type):
84
+ @staticmethod
85
+ def convert_from_old_sa_to_new(old_json_data, project_type):
85
86
 
86
87
  new_json_data = {"metadata": {}, "instances": [], "tags": [], "comments": []}
87
88
 
@@ -272,8 +273,10 @@ class CocoBaseStrategy(baseStrategy):
272
273
 
273
274
  return image_info
274
275
 
275
- def _create_sa_classes(self, json_path):
276
- json_data = json.load(open(json_path))
276
+ @staticmethod
277
+ def _create_sa_classes(json_path):
278
+ with open(json_path, encoding="utf-8") as f:
279
+ json_data = json.load(f)
277
280
  classes_list = json_data["categories"]
278
281
 
279
282
  classes = []
@@ -6,8 +6,8 @@ from pathlib import Path
6
6
 
7
7
  import cv2
8
8
  import numpy as np
9
- from lib.app.exceptions import AppException
10
9
  from lib.core import DEPRICATED_DOCUMENT_VIDEO_MESSAGE
10
+ from lib.core.exceptions import AppException
11
11
 
12
12
  from ..common import blue_color_generator
13
13
  from ..common import hex_to_rgb
@@ -23,7 +23,6 @@ from lib.infrastructure.controller import Controller
23
23
  from lib.infrastructure.utils import extract_project_folder
24
24
  from lib.infrastructure.validators import wrap_error
25
25
  from mixpanel import Mixpanel
26
- from superannotate import __version__
27
26
 
28
27
 
29
28
  class BaseInterfaceFacade:
@@ -134,7 +133,7 @@ class Tracker:
134
133
  "SDK": True,
135
134
  "Team": team_name,
136
135
  "User Email": user_email,
137
- "Version": __version__,
136
+ "Version": os.environ["sa_version"],
138
137
  "Python version": platform.python_version(),
139
138
  "Python interpreter type": platform.python_implementation(),
140
139
  }
@@ -170,7 +169,7 @@ class Tracker:
170
169
  for key, value in kwargs.items():
171
170
  if key == "self":
172
171
  continue
173
- elif key == "token":
172
+ if key == "token":
174
173
  properties["sa_token"] = str(bool(value))
175
174
  elif key == "config_path":
176
175
  properties[key] = str(bool(value))
@@ -88,7 +88,7 @@ class CLIFacade:
88
88
  project: str,
89
89
  folder: str,
90
90
  extensions: str = constances.DEFAULT_IMAGE_EXTENSIONS,
91
- set_annotation_status: str = constances.AnnotationStatus.NOT_STARTED.name,
91
+ set_annotation_status: str = None,
92
92
  exclude_file_patterns=constances.DEFAULT_FILE_EXCLUDE_PATTERNS,
93
93
  recursive_subfolders=False,
94
94
  image_quality_in_editor=None,
@@ -243,7 +243,7 @@ class CLIFacade:
243
243
  target_fps=None,
244
244
  recursive=False,
245
245
  extensions=constances.DEFAULT_VIDEO_EXTENSIONS,
246
- set_annotation_status=constances.AnnotationStatus.NOT_STARTED.name,
246
+ set_annotation_status=None,
247
247
  start_time=0.0,
248
248
  end_time=None,
249
249
  ):