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.
- {superannotate-4.5.3.dev1/src/superannotate.egg-info → superannotate-4.5.4.dev1}/PKG-INFO +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/requirements.txt +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/__init__.py +1 -1
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/aggregators.py +5 -8
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/helpers.py +5 -6
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/base_interface.py +6 -10
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/cli_interface.py +3 -4
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk_interface.py +383 -260
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/types.py +1 -1
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/serializers.py +19 -22
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/conditions.py +3 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/config.py +3 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/base.py +16 -20
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/classes.py +14 -14
- superannotate-4.5.4.dev1/src/superannotate/lib/core/entities/filters.py +66 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/folder.py +14 -15
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/integrations.py +1 -1
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/items.py +7 -8
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/multimodal_form.py +28 -30
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/project.py +55 -56
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/work_managament.py +43 -44
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/enums.py +6 -5
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/jsx_conditions.py +22 -22
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/plugin.py +9 -11
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/reporter.py +3 -4
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/repositories.py +4 -5
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/response.py +1 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/service_types.py +40 -42
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/serviceproviders.py +56 -58
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/types.py +5 -6
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/annotations.py +60 -61
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/base.py +4 -3
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/classes.py +3 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/custom_fields.py +4 -5
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/folders.py +4 -3
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/images.py +16 -16
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/integrations.py +5 -6
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/items.py +19 -21
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/models.py +5 -5
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/projects.py +5 -4
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/video_convertor.py +10 -10
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/controller.py +89 -92
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/query_builder.py +47 -26
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/serviceprovider.py +9 -8
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/annotation.py +10 -10
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/annotation_class.py +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/explore.py +22 -32
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/folder.py +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/http_client.py +8 -8
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/integration.py +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/item.py +12 -12
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/item_service.py +1 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/project.py +4 -4
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/telemetry_scoring.py +3 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/work_management.py +12 -14
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/stream_data_handler.py +5 -4
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/utils.py +9 -12
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/validators.py +4 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1/src/superannotate.egg-info}/PKG-INFO +2 -2
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/requires.txt +1 -1
- superannotate-4.5.3.dev1/src/superannotate/lib/core/entities/filters.py +0 -62
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/LICENSE +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/MANIFEST.in +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/README.rst +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/setup.cfg +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/setup.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/analytics/common.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/bin/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/bin/superannotate.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/common.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/exceptions.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/conversion.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/baseStrategy.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_api.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_converter.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/coco_converters/coco_strategies.py +0 -0
- {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
- {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
- {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
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/converters.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_helper.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/dataloop_converters/dataloop_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/googlecloud_converters/googlecloud_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/labelbox_converters/labelbox_helper.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sa_json_helper.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/sagemaker_converters/sagemaker_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_helper.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/supervisely_converters/supervisely_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_helper.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vgg_converters/vgg_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_helper.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/voc_converters/voc_strategies.py +0 -0
- {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
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vott_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/vott_converters/vott_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/yolo_converters/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/converters/yolo_converters/yolo_strategies.py +0 -0
- {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
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/export_from_sa_conversions.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/import_to_sa_conversions.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/input_converters/sa_conversion.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/folders.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/app/interface/sdk/project.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/base_usecases.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/entities/project_entities.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/exceptions.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/usecases/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/core/utils.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/annotation_adapter.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/custom_entities.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/helpers.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/repositories.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate/lib/infrastructure/services/__init__.py +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/SOURCES.txt +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/dependency_links.txt +0 -0
- {superannotate-4.5.3.dev1 → superannotate-4.5.4.dev1}/src/superannotate.egg-info/entry_points.txt +0 -0
- {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
|
+
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.
|
|
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
|
|
@@ -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:
|
|
147
|
-
folder_names:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
27
|
-
) ->
|
|
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:
|
|
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
|
|
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) ->
|
|
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) ->
|
|
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() ->
|
|
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:
|
|
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:
|
|
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:
|
|
229
|
+
project: str, attachments: str, annotation_status: Any | None = "NotStarted"
|
|
231
230
|
):
|
|
232
231
|
SAClient().attach_items(
|
|
233
232
|
project=project,
|