From 226ba486300da96b354dd18905a010f823e1b5fc Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Fri, 15 Mar 2024 14:41:36 -0700 Subject: [PATCH 1/6] Initial move --- .../python-package-shared-setup/action.yml | 28 +++ .github/workflows/publish.yml | 163 ++++++++++++ .github/workflows/python-package-develop.yml | 116 +++++++++ ...e-develop.yaml => python-package-prod.yml} | 27 +- .github/workflows/python-package-shared.yml | 112 ++++----- .github/workflows/release-container.yaml | 44 ---- .github/workflows/testing-container.yaml | 45 ---- .gitignore | 10 +- .python-version | 1 + .readthedocs.yml | 24 +- CONTRIB.md | 93 ------- CONTRIBUTING.md | 127 ++++++++++ Dockerfile | 58 +++-- README.md | 2 +- docs/README.md | 42 ---- docs/conf.py | 5 +- docs/labelbox/conf.py | 0 docs/requirements.txt | 3 - .yapfignore => libs/labelbox/.yapfignore | 1 + CHANGELOG.md => libs/labelbox/CHANGELOG.md | 0 libs/labelbox/README.md | 25 ++ mypy.ini => libs/labelbox/mypy.ini | 0 libs/labelbox/pyproject.toml | 99 ++++++++ .../labelbox/scripts}/ensure_local_setup.sh | 0 .../labelbox/scripts}/update_sdk_version.sh | 0 .../labelbox/src/labelbox}/__init__.py | 2 +- .../labelbox/src/labelbox}/client.py | 0 .../labelbox/src/labelbox}/data/__init__.py | 0 .../data/annotation_types/__init__.py | 0 .../data/annotation_types/annotation.py | 0 .../data/annotation_types/base_annotation.py | 0 .../classification/__init__.py | 0 .../classification/classification.py | 0 .../data/annotation_types/collection.py | 0 .../data/annotation_types/data/__init__.py | 0 .../data/annotation_types/data/audio.py | 0 .../data/annotation_types/data/base_data.py | 0 .../annotation_types/data/conversation.py | 0 .../data/annotation_types/data/dicom.py | 0 .../data/annotation_types/data/document.py | 0 .../data/generic_data_row_data.py | 0 .../data/annotation_types/data/html.py | 0 .../data/llm_prompt_creation.py | 0 .../data/llm_prompt_response_creation.py | 0 .../data/llm_response_creation.py | 0 .../data/annotation_types/data/raster.py | 0 .../data/annotation_types/data/text.py | 0 .../data/annotation_types/data/tiled_image.py | 0 .../data/annotation_types/data/video.py | 0 .../data/annotation_types/feature.py | 0 .../annotation_types/geometry/__init__.py | 0 .../annotation_types/geometry/geometry.py | 0 .../data/annotation_types/geometry/line.py | 0 .../data/annotation_types/geometry/mask.py | 0 .../data/annotation_types/geometry/point.py | 0 .../data/annotation_types/geometry/polygon.py | 0 .../annotation_types/geometry/rectangle.py | 0 .../labelbox}/data/annotation_types/label.py | 0 .../data/annotation_types/metrics/__init__.py | 0 .../data/annotation_types/metrics/base.py | 0 .../metrics/confusion_matrix.py | 0 .../data/annotation_types/metrics/scalar.py | 0 .../data/annotation_types/ner/__init__.py | 0 .../ner/conversation_entity.py | 0 .../annotation_types/ner/document_entity.py | 0 .../data/annotation_types/ner/text_entity.py | 0 .../data/annotation_types/relationship.py | 0 .../labelbox}/data/annotation_types/types.py | 0 .../labelbox}/data/annotation_types/video.py | 0 .../labelbox/src/labelbox}/data/generator.py | 0 .../src/labelbox}/data/metrics/__init__.py | 0 .../data/metrics/confusion_matrix/__init__.py | 0 .../metrics/confusion_matrix/calculation.py | 0 .../confusion_matrix/confusion_matrix.py | 0 .../src/labelbox}/data/metrics/group.py | 0 .../labelbox}/data/metrics/iou/__init__.py | 0 .../labelbox}/data/metrics/iou/calculation.py | 0 .../src/labelbox}/data/metrics/iou/iou.py | 0 .../labelbox/src/labelbox}/data/mixins.py | 0 .../labelbox/src/labelbox}/data/ontology.py | 0 .../labelbox}/data/serialization/__init__.py | 0 .../data/serialization/coco/__init__.py | 0 .../data/serialization/coco/annotation.py | 0 .../data/serialization/coco/categories.py | 0 .../data/serialization/coco/converter.py | 0 .../data/serialization/coco/image.py | 0 .../serialization/coco/instance_dataset.py | 0 .../serialization/coco/panoptic_dataset.py | 0 .../labelbox}/data/serialization/coco/path.py | 0 .../serialization/labelbox_v1/__init__.py | 0 .../labelbox_v1/classification.py | 0 .../serialization/labelbox_v1/converter.py | 0 .../data/serialization/labelbox_v1/feature.py | 0 .../data/serialization/labelbox_v1/label.py | 0 .../data/serialization/labelbox_v1/objects.py | 0 .../data/serialization/ndjson/__init__.py | 0 .../data/serialization/ndjson/base.py | 0 .../serialization/ndjson/classification.py | 0 .../data/serialization/ndjson/converter.py | 0 .../data/serialization/ndjson/label.py | 0 .../data/serialization/ndjson/metric.py | 0 .../data/serialization/ndjson/objects.py | 0 .../data/serialization/ndjson/relationship.py | 0 .../labelbox/src/labelbox}/exceptions.py | 0 .../labelbox/src/labelbox}/orm/__init__.py | 0 .../labelbox/src/labelbox}/orm/comparison.py | 0 .../labelbox/src/labelbox}/orm/db_object.py | 0 .../labelbox/src/labelbox}/orm/model.py | 0 .../labelbox/src/labelbox}/orm/query.py | 0 .../labelbox/src/labelbox}/pagination.py | 0 .../labelbox/src/labelbox}/parser.py | 0 .../labelbox/src/labelbox}/pydantic_compat.py | 0 .../labelbox/src/labelbox}/schema/__init__.py | 0 .../src/labelbox}/schema/annotation_import.py | 0 .../src/labelbox}/schema/asset_attachment.py | 0 .../labelbox/src/labelbox}/schema/batch.py | 0 .../src/labelbox}/schema/benchmark.py | 0 .../labelbox}/schema/bulk_import_request.py | 0 .../labelbox/src/labelbox}/schema/catalog.py | 0 .../schema/confidence_presence_checker.py | 0 .../schema/conflict_resolution_strategy.py | 0 .../labelbox}/schema/consensus_settings.py | 0 .../labelbox}/schema/create_batches_task.py | 0 .../labelbox/src/labelbox}/schema/data_row.py | 0 .../src/labelbox}/schema/data_row_metadata.py | 0 .../labelbox/src/labelbox}/schema/dataset.py | 0 .../src/labelbox}/schema/embeddings.py | 0 .../labelbox/src/labelbox}/schema/enums.py | 0 .../src/labelbox}/schema/export_filters.py | 0 .../src/labelbox}/schema/export_params.py | 0 .../src/labelbox}/schema/export_task.py | 0 .../src/labelbox}/schema/foundry/__init__.py | 0 .../src/labelbox}/schema/foundry/app.py | 0 .../schema/foundry/foundry_client.py | 0 .../src/labelbox}/schema/foundry/model.py | 0 .../src/labelbox}/schema/iam_integration.py | 0 .../labelbox/src/labelbox}/schema/id_type.py | 0 .../src/labelbox}/schema/identifiable.py | 0 .../src/labelbox}/schema/identifiables.py | 0 .../labelbox/src/labelbox}/schema/invite.py | 0 .../labelbox/src/labelbox}/schema/label.py | 0 .../src/labelbox}/schema/labeling_frontend.py | 0 .../src/labelbox}/schema/media_type.py | 0 .../labelbox/src/labelbox}/schema/model.py | 0 .../src/labelbox}/schema/model_run.py | 0 .../labelbox/src/labelbox}/schema/ontology.py | 0 .../src/labelbox}/schema/organization.py | 0 .../labelbox/src/labelbox}/schema/project.py | 0 .../labelbox}/schema/project_resource_tag.py | 0 .../src/labelbox}/schema/quality_mode.py | 0 .../src/labelbox}/schema/queue_mode.py | 0 .../src/labelbox}/schema/resource_tag.py | 0 .../labelbox/src/labelbox}/schema/review.py | 0 .../labelbox/src/labelbox}/schema/role.py | 0 .../schema/send_to_annotate_params.py | 0 .../src/labelbox}/schema/serialization.py | 0 .../labelbox/src/labelbox}/schema/slice.py | 0 .../labelbox/src/labelbox}/schema/task.py | 0 .../src/labelbox}/schema/task_queue.py | 0 .../labelbox/src/labelbox}/schema/user.py | 0 .../labelbox/src/labelbox}/schema/webhook.py | 0 .../labelbox/src/labelbox}/types.py | 0 .../labelbox/src/labelbox}/typing_imports.py | 0 .../labelbox/src/labelbox}/utils.py | 0 ...ord-token-pdfs_0801.3483-lb-textlayer.json | 0 ...-pdf_data_99-word-token-pdfs_0801.3483.pdf | Bin .../tests}/assets/conversation-1.json | 0 .../labelbox/tests}/assets/loremipsum.pdf | Bin {tests => libs/labelbox/tests}/conftest.py | 2 +- .../tests}/data/annotation_import/conftest.py | 0 .../test_bulk_import_request.py | 0 .../test_conversation_import.py | 0 .../data/annotation_import/test_data_types.py | 0 .../test_generic_data_types.py | 0 .../annotation_import/test_label_import.py | 0 .../test_mal_prediction_import.py | 0 .../test_mea_prediction_import.py | 0 .../data/annotation_import/test_model.py | 0 .../data/annotation_import/test_model_run.py | 0 .../test_ndjson_validation.py | 0 .../test_send_to_annotate_mea.py | 0 .../test_upsert_prediction_import.py | 0 .../tests}/data/annotation_types/__init__.py | 0 .../classification/__init__.py | 0 .../classification/test_classification.py | 0 .../data/annotation_types/data/__init__.py | 0 .../data/annotation_types/data/test_raster.py | 0 .../data/annotation_types/data/test_text.py | 0 .../data/annotation_types/data/test_video.py | 0 .../annotation_types/geometry/__init__.py | 0 .../annotation_types/geometry/test_line.py | 0 .../annotation_types/geometry/test_mask.py | 0 .../annotation_types/geometry/test_point.py | 0 .../annotation_types/geometry/test_polygon.py | 0 .../geometry/test_rectangle.py | 0 .../data/annotation_types/test_annotation.py | 0 .../data/annotation_types/test_collection.py | 0 .../data/annotation_types/test_label.py | 0 .../data/annotation_types/test_metrics.py | 0 .../tests}/data/annotation_types/test_ner.py | 0 .../tests}/data/annotation_types/test_text.py | 0 .../data/annotation_types/test_tiled_image.py | 0 .../data/annotation_types/test_video.py | 0 .../data/assets/coco/images/000000129054.jpg | Bin .../data/assets/coco/images/000000141328.jpg | Bin .../data/assets/coco/images/000000147498.jpg | Bin .../data/assets/coco/images/000000184324.jpg | Bin .../data/assets/coco/images/000000188465.jpg | Bin .../data/assets/coco/images/000000245764.jpg | Bin .../data/assets/coco/images/000000311303.jpg | Bin .../data/assets/coco/images/000000343706.jpg | Bin .../data/assets/coco/images/000000356387.jpg | Bin .../data/assets/coco/images/000000370711.jpg | Bin .../data/assets/coco/images/000000385029.jpg | Bin .../data/assets/coco/images/000000393226.jpg | Bin .../data/assets/coco/images/000000434230.jpg | Bin .../data/assets/coco/images/000000458755.jpg | Bin .../data/assets/coco/images/000000458768.jpg | Bin .../data/assets/coco/images/000000462904.jpg | Bin .../data/assets/coco/images/000000475150.jpg | Bin .../data/assets/coco/images/000000532481.jpg | Bin .../data/assets/coco/images/000000532493.jpg | Bin .../data/assets/coco/images/000000546823.jpg | Bin .../tests}/data/assets/coco/instances.json | 0 .../data/assets/coco/masks/000000129054.png | Bin .../data/assets/coco/masks/000000141328.png | Bin .../data/assets/coco/masks/000000147498.png | Bin .../data/assets/coco/masks/000000184324.png | Bin .../data/assets/coco/masks/000000188465.png | Bin .../data/assets/coco/masks/000000245764.png | Bin .../data/assets/coco/masks/000000311303.png | Bin .../data/assets/coco/masks/000000343706.png | Bin .../data/assets/coco/masks/000000356387.png | Bin .../data/assets/coco/masks/000000370711.png | Bin .../data/assets/coco/masks/000000385029.png | Bin .../data/assets/coco/masks/000000393226.png | Bin .../data/assets/coco/masks/000000434230.png | Bin .../data/assets/coco/masks/000000458755.png | Bin .../data/assets/coco/masks/000000458768.png | Bin .../data/assets/coco/masks/000000462904.png | Bin .../data/assets/coco/masks/000000475150.png | Bin .../data/assets/coco/masks/000000532481.png | Bin .../data/assets/coco/masks/000000532493.png | Bin .../data/assets/coco/masks/000000546823.png | Bin .../tests}/data/assets/coco/panoptic.json | 0 .../labelbox/tests}/data/assets/coco/rle.json | 0 .../labelbox_v1/highly_nested_image.json | 0 .../data/assets/labelbox_v1/image_export.json | 0 .../data/assets/labelbox_v1/pdf_export.json | 0 .../data/assets/labelbox_v1/text_export.json | 0 .../labelbox_v1/tiled_image_export.json | 0 .../labelbox_v1/unkown_media_type_export.json | 0 .../data/assets/labelbox_v1/video_export.json | 0 .../labelbox/tests}/data/assets/line.png | Bin .../labelbox/tests}/data/assets/mask.png | Bin .../assets/ndjson/classification_import.json | 0 .../classification_import_global_key.json | 0 .../classification_import_name_only.json | 0 .../ndjson/conversation_entity_import.json | 0 ...conversation_entity_import_global_key.json | 0 ...tion_entity_without_confidence_import.json | 0 .../custom_confusion_matrix_import.json | 0 .../assets/ndjson/custom_scalar_import.json | 0 .../data/assets/ndjson/image_import.json | 0 .../ndjson/image_import_global_key.json | 0 .../assets/ndjson/image_import_name_only.json | 0 .../data/assets/ndjson/metric_import.json | 0 .../ndjson/metric_import_global_key.json | 0 .../data/assets/ndjson/nested_import.json | 0 .../ndjson/nested_import_name_only.json | 0 .../tests}/data/assets/ndjson/pdf_import.json | 0 .../assets/ndjson/pdf_import_global_key.json | 0 .../assets/ndjson/pdf_import_name_only.json | 0 .../data/assets/ndjson/polyline_import.json | 0 .../ndjson/polyline_import_global_key.json | 0 .../polyline_without_confidence_import.json | 0 .../data/assets/ndjson/rectangle_import.json | 0 .../assets/ndjson/relationship_import.json | 0 .../assets/ndjson/text_entity_import.json | 0 .../ndjson/text_entity_import_global_key.json | 0 ...text_entity_without_confidence_import.json | 0 .../data/assets/ndjson/video_import.json | 0 .../ndjson/video_import_global_key.json | 0 .../assets/ndjson/video_import_name_only.json | 0 .../labelbox/tests}/data/assets/point.png | Bin .../labelbox/tests}/data/assets/polygon.png | Bin .../labelbox/tests}/data/assets/rectangle.png | Bin .../tests}/data/assets/sample_text.txt | 0 .../labelbox/tests}/data/conftest.py | 0 .../labelbox/tests}/data/export/conftest.py | 0 .../data/export/legacy/test_export_catalog.py | 0 .../export/legacy/test_export_data_rows.py | 0 .../data/export/legacy/test_export_dataset.py | 0 .../export/legacy/test_export_model_run.py | 0 .../data/export/legacy/test_export_project.py | 0 .../data/export/legacy/test_export_slice.py | 0 .../data/export/legacy/test_export_video.py | 0 .../data/export/legacy/test_legacy_export.py | 0 .../test_export_data_rows_streamable.py | 0 .../test_export_dataset_streamable.py | 0 .../test_export_model_run_streamable.py | 0 .../test_export_project_streamable.py | 0 .../test_export_video_streamable.py | 0 .../data/metrics/confusion_matrix/conftest.py | 0 .../test_confusion_matrix_data_row.py | 0 .../test_confusion_matrix_feature.py | 0 .../data/metrics/iou/data_row/conftest.py | 0 .../metrics/iou/data_row/test_data_row_iou.py | 0 .../data/metrics/iou/feature/conftest.py | 0 .../metrics/iou/feature/test_feature_iou.py | 0 .../tests}/data/serialization/__init__.py | 0 .../data/serialization/coco/test_coco.py | 0 .../labelbox_v1/test_document.py | 0 .../serialization/labelbox_v1/test_image.py | 0 .../serialization/labelbox_v1/test_text.py | 0 .../labelbox_v1/test_tiled_image.py | 0 .../labelbox_v1/test_unknown_media.py | 0 .../serialization/labelbox_v1/test_video.py | 0 .../data/serialization/ndjson/__init__.py | 0 .../serialization/ndjson/test_checklist.py | 0 .../ndjson/test_classification.py | 0 .../serialization/ndjson/test_conversation.py | 0 .../data/serialization/ndjson/test_dicom.py | 0 .../serialization/ndjson/test_document.py | 0 .../ndjson/test_export_video_objects.py | 0 .../serialization/ndjson/test_free_text.py | 0 .../serialization/ndjson/test_global_key.py | 0 .../data/serialization/ndjson/test_image.py | 0 .../data/serialization/ndjson/test_metric.py | 0 .../data/serialization/ndjson/test_nested.py | 0 .../serialization/ndjson/test_polyline.py | 0 .../data/serialization/ndjson/test_radio.py | 0 .../serialization/ndjson/test_rectangle.py | 0 .../serialization/ndjson/test_relationship.py | 0 .../data/serialization/ndjson/test_text.py | 0 .../serialization/ndjson/test_text_entity.py | 0 .../data/serialization/ndjson/test_video.py | 0 .../tests}/data/test_data_row_metadata.py | 0 .../tests}/data/test_prefetch_generator.py | 0 .../labelbox/tests}/integration/conftest.py | 0 .../integration/media/bulk_conversation.json | 0 .../labelbox/tests}/integration/media/cat.mp4 | Bin .../tests}/integration/media/sample_image.jpg | Bin .../tests}/integration/media/sample_pdf.pdf | Bin ...ith_same_global_keys.failed_data_rows.json | 0 .../test_task.test_task_errors.errors.json | 0 ...ask.test_task_errors.failed_data_rows.json | 0 .../test_task.test_task_success_json.json | 0 .../labelbox/tests}/integration/test_batch.py | 0 .../tests}/integration/test_batches.py | 0 .../tests}/integration/test_benchmark.py | 0 .../tests}/integration/test_client_errors.py | 0 .../test_data_row_delete_metadata.py | 0 .../tests}/integration/test_data_rows.py | 0 .../integration/test_data_rows_upsert.py | 0 .../tests}/integration/test_data_upload.py | 0 .../tests}/integration/test_dataset.py | 0 .../labelbox/tests}/integration/test_dates.py | 0 .../integration/test_delegated_access.py | 0 .../tests}/integration/test_ephemeral.py | 0 .../tests}/integration/test_feature_schema.py | 0 .../tests}/integration/test_filtering.py | 0 .../tests}/integration/test_foundry.py | 2 +- .../tests}/integration/test_global_keys.py | 0 .../labelbox/tests}/integration/test_label.py | 0 .../integration/test_labeler_performance.py | 0 .../integration/test_labeling_frontend.py | 0 .../test_labeling_parameter_overrides.py | 0 .../tests}/integration/test_legacy_project.py | 0 .../tests}/integration/test_ontology.py | 0 .../tests}/integration/test_pagination.py | 0 .../tests}/integration/test_project.py | 0 .../tests}/integration/test_project_setup.py | 0 .../integration/test_send_to_annotate.py | 0 .../tests}/integration/test_sorting.py | 0 .../labelbox/tests}/integration/test_task.py | 0 .../tests}/integration/test_task_queue.py | 0 .../tests}/integration/test_toggle_mal.py | 0 .../tests}/integration/test_user_and_org.py | 0 .../integration/test_user_management.py | 0 .../tests}/integration/test_webhook.py | 0 .../labelbox/tests}/unit/conftest.py | 0 .../export_task/test_unit_file_converter.py | 0 .../test_unit_file_retriever_by_line.py | 0 .../test_unit_file_retriever_by_offset.py | 0 .../export_task/test_unit_json_converter.py | 0 .../tests}/unit/test_annotation_import.py | 0 .../tests}/unit/test_label_data_type.py | 0 .../labelbox/tests}/unit/test_mal_import.py | 0 .../tests}/unit/test_ndjson_parsing.py | 0 .../labelbox/tests}/unit/test_queue_mode.py | 0 .../tests}/unit/test_unit_case_change.py | 0 ...est_unit_delete_batch_data_row_metadata.py | 0 .../tests}/unit/test_unit_entity_meta.py | 0 .../tests}/unit/test_unit_export_filters.py | 0 .../labelbox/tests}/unit/test_unit_filter.py | 0 .../tests}/unit/test_unit_identifiables.py | 0 .../tests}/unit/test_unit_label_import.py | 0 .../tests}/unit/test_unit_ontology.py | 0 ...t_validate_labeling_parameter_overrides.py | 0 .../labelbox/tests}/unit/test_unit_query.py | 0 .../tests}/unit/test_unit_rand_gen.py | 0 .../labelbox/tests}/unit/test_unit_webhook.py | 0 .../labelbox/tests}/unit/test_utils.py | 0 {tests => libs/labelbox/tests}/utils.py | 0 pyproject.toml | 41 ++++ pytest.ini | 1 + requirements-dev.lock | 232 ++++++++++++++++++ requirements.lock | 104 ++++++++ requirements.txt | 19 -- setup.py | 44 ---- tox.ini | 27 -- 412 files changed, 1072 insertions(+), 427 deletions(-) create mode 100644 .github/actions/python-package-shared-setup/action.yml create mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/python-package-develop.yml rename .github/workflows/{python-package-develop.yaml => python-package-prod.yml} (61%) delete mode 100644 .github/workflows/release-container.yaml delete mode 100644 .github/workflows/testing-container.yaml create mode 100644 .python-version delete mode 100644 CONTRIB.md create mode 100644 CONTRIBUTING.md delete mode 100644 docs/README.md delete mode 100644 docs/labelbox/conf.py delete mode 100644 docs/requirements.txt rename .yapfignore => libs/labelbox/.yapfignore (77%) rename CHANGELOG.md => libs/labelbox/CHANGELOG.md (100%) create mode 100644 libs/labelbox/README.md rename mypy.ini => libs/labelbox/mypy.ini (100%) create mode 100644 libs/labelbox/pyproject.toml rename {scripts => libs/labelbox/scripts}/ensure_local_setup.sh (100%) rename {scripts => libs/labelbox/scripts}/update_sdk_version.sh (100%) rename {labelbox => libs/labelbox/src/labelbox}/__init__.py (97%) rename {labelbox => libs/labelbox/src/labelbox}/client.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/annotation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/base_annotation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/classification/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/classification/classification.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/collection.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/audio.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/base_data.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/conversation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/dicom.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/document.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/generic_data_row_data.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/html.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/llm_prompt_creation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/llm_prompt_response_creation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/llm_response_creation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/raster.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/text.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/tiled_image.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/data/video.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/feature.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/geometry.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/line.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/mask.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/point.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/polygon.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/geometry/rectangle.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/label.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/metrics/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/metrics/base.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/metrics/confusion_matrix.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/metrics/scalar.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/ner/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/ner/conversation_entity.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/ner/document_entity.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/ner/text_entity.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/relationship.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/types.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/annotation_types/video.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/generator.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/confusion_matrix/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/confusion_matrix/calculation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/confusion_matrix/confusion_matrix.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/group.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/iou/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/iou/calculation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/metrics/iou/iou.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/mixins.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/ontology.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/annotation.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/categories.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/converter.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/image.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/instance_dataset.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/panoptic_dataset.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/coco/path.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/classification.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/converter.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/feature.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/label.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/labelbox_v1/objects.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/base.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/classification.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/converter.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/label.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/metric.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/objects.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/data/serialization/ndjson/relationship.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/exceptions.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/orm/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/orm/comparison.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/orm/db_object.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/orm/model.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/orm/query.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/pagination.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/parser.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/pydantic_compat.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/annotation_import.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/asset_attachment.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/batch.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/benchmark.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/bulk_import_request.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/catalog.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/confidence_presence_checker.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/conflict_resolution_strategy.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/consensus_settings.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/create_batches_task.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/data_row.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/data_row_metadata.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/dataset.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/embeddings.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/enums.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/export_filters.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/export_params.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/export_task.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/foundry/__init__.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/foundry/app.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/foundry/foundry_client.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/foundry/model.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/iam_integration.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/id_type.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/identifiable.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/identifiables.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/invite.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/label.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/labeling_frontend.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/media_type.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/model.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/model_run.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/ontology.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/organization.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/project.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/project_resource_tag.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/quality_mode.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/queue_mode.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/resource_tag.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/review.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/role.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/send_to_annotate_params.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/serialization.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/slice.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/task.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/task_queue.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/user.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/schema/webhook.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/types.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/typing_imports.py (100%) rename {labelbox => libs/labelbox/src/labelbox}/utils.py (100%) rename {tests => libs/labelbox/tests}/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json (100%) rename {tests => libs/labelbox/tests}/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf (100%) rename {tests => libs/labelbox/tests}/assets/conversation-1.json (100%) rename {tests => libs/labelbox/tests}/assets/loremipsum.pdf (100%) rename {tests => libs/labelbox/tests}/conftest.py (99%) rename {tests => libs/labelbox/tests}/data/annotation_import/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_bulk_import_request.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_conversation_import.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_data_types.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_generic_data_types.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_label_import.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_mal_prediction_import.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_mea_prediction_import.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_model.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_model_run.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_ndjson_validation.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_send_to_annotate_mea.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_import/test_upsert_prediction_import.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/classification/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/classification/test_classification.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/data/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/data/test_raster.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/data/test_text.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/data/test_video.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/test_line.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/test_mask.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/test_point.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/test_polygon.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/geometry/test_rectangle.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_annotation.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_collection.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_label.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_metrics.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_ner.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_text.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_tiled_image.py (100%) rename {tests => libs/labelbox/tests}/data/annotation_types/test_video.py (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000129054.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000141328.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000147498.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000184324.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000188465.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000245764.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000311303.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000343706.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000356387.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000370711.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000385029.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000393226.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000434230.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000458755.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000458768.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000462904.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000475150.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000532481.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000532493.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/images/000000546823.jpg (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/instances.json (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000129054.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000141328.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000147498.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000184324.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000188465.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000245764.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000311303.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000343706.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000356387.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000370711.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000385029.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000393226.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000434230.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000458755.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000458768.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000462904.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000475150.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000532481.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000532493.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/masks/000000546823.png (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/panoptic.json (100%) rename {tests => libs/labelbox/tests}/data/assets/coco/rle.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/highly_nested_image.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/image_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/pdf_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/text_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/tiled_image_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/unkown_media_type_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/labelbox_v1/video_export.json (100%) rename {tests => libs/labelbox/tests}/data/assets/line.png (100%) rename {tests => libs/labelbox/tests}/data/assets/mask.png (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/classification_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/classification_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/classification_import_name_only.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/conversation_entity_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/conversation_entity_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/conversation_entity_without_confidence_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/custom_confusion_matrix_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/custom_scalar_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/image_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/image_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/image_import_name_only.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/metric_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/metric_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/nested_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/nested_import_name_only.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/pdf_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/pdf_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/pdf_import_name_only.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/polyline_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/polyline_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/polyline_without_confidence_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/rectangle_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/relationship_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/text_entity_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/text_entity_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/text_entity_without_confidence_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/video_import.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/video_import_global_key.json (100%) rename {tests => libs/labelbox/tests}/data/assets/ndjson/video_import_name_only.json (100%) rename {tests => libs/labelbox/tests}/data/assets/point.png (100%) rename {tests => libs/labelbox/tests}/data/assets/polygon.png (100%) rename {tests => libs/labelbox/tests}/data/assets/rectangle.png (100%) rename {tests => libs/labelbox/tests}/data/assets/sample_text.txt (100%) rename {tests => libs/labelbox/tests}/data/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/export/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_catalog.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_data_rows.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_dataset.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_model_run.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_project.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_slice.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_export_video.py (100%) rename {tests => libs/labelbox/tests}/data/export/legacy/test_legacy_export.py (100%) rename {tests => libs/labelbox/tests}/data/export/streamable/test_export_data_rows_streamable.py (100%) rename {tests => libs/labelbox/tests}/data/export/streamable/test_export_dataset_streamable.py (100%) rename {tests => libs/labelbox/tests}/data/export/streamable/test_export_model_run_streamable.py (100%) rename {tests => libs/labelbox/tests}/data/export/streamable/test_export_project_streamable.py (100%) rename {tests => libs/labelbox/tests}/data/export/streamable/test_export_video_streamable.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/confusion_matrix/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/confusion_matrix/test_confusion_matrix_feature.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/iou/data_row/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/iou/data_row/test_data_row_iou.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/iou/feature/conftest.py (100%) rename {tests => libs/labelbox/tests}/data/metrics/iou/feature/test_feature_iou.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/coco/test_coco.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_document.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_image.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_text.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_tiled_image.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_unknown_media.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/labelbox_v1/test_video.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/__init__.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_checklist.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_classification.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_conversation.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_dicom.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_document.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_export_video_objects.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_free_text.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_global_key.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_image.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_metric.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_nested.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_polyline.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_radio.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_rectangle.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_relationship.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_text.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_text_entity.py (100%) rename {tests => libs/labelbox/tests}/data/serialization/ndjson/test_video.py (100%) rename {tests => libs/labelbox/tests}/data/test_data_row_metadata.py (100%) rename {tests => libs/labelbox/tests}/data/test_prefetch_generator.py (100%) rename {tests => libs/labelbox/tests}/integration/conftest.py (100%) rename {tests => libs/labelbox/tests}/integration/media/bulk_conversation.json (100%) rename {tests => libs/labelbox/tests}/integration/media/cat.mp4 (100%) rename {tests => libs/labelbox/tests}/integration/media/sample_image.jpg (100%) rename {tests => libs/labelbox/tests}/integration/media/sample_pdf.pdf (100%) rename {tests => libs/labelbox/tests}/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json (100%) rename {tests => libs/labelbox/tests}/integration/snapshots/test_task.test_task_errors.errors.json (100%) rename {tests => libs/labelbox/tests}/integration/snapshots/test_task.test_task_errors.failed_data_rows.json (100%) rename {tests => libs/labelbox/tests}/integration/snapshots/test_task.test_task_success_json.json (100%) rename {tests => libs/labelbox/tests}/integration/test_batch.py (100%) rename {tests => libs/labelbox/tests}/integration/test_batches.py (100%) rename {tests => libs/labelbox/tests}/integration/test_benchmark.py (100%) rename {tests => libs/labelbox/tests}/integration/test_client_errors.py (100%) rename {tests => libs/labelbox/tests}/integration/test_data_row_delete_metadata.py (100%) rename {tests => libs/labelbox/tests}/integration/test_data_rows.py (100%) rename {tests => libs/labelbox/tests}/integration/test_data_rows_upsert.py (100%) rename {tests => libs/labelbox/tests}/integration/test_data_upload.py (100%) rename {tests => libs/labelbox/tests}/integration/test_dataset.py (100%) rename {tests => libs/labelbox/tests}/integration/test_dates.py (100%) rename {tests => libs/labelbox/tests}/integration/test_delegated_access.py (100%) rename {tests => libs/labelbox/tests}/integration/test_ephemeral.py (100%) rename {tests => libs/labelbox/tests}/integration/test_feature_schema.py (100%) rename {tests => libs/labelbox/tests}/integration/test_filtering.py (100%) rename {tests => libs/labelbox/tests}/integration/test_foundry.py (98%) rename {tests => libs/labelbox/tests}/integration/test_global_keys.py (100%) rename {tests => libs/labelbox/tests}/integration/test_label.py (100%) rename {tests => libs/labelbox/tests}/integration/test_labeler_performance.py (100%) rename {tests => libs/labelbox/tests}/integration/test_labeling_frontend.py (100%) rename {tests => libs/labelbox/tests}/integration/test_labeling_parameter_overrides.py (100%) rename {tests => libs/labelbox/tests}/integration/test_legacy_project.py (100%) rename {tests => libs/labelbox/tests}/integration/test_ontology.py (100%) rename {tests => libs/labelbox/tests}/integration/test_pagination.py (100%) rename {tests => libs/labelbox/tests}/integration/test_project.py (100%) rename {tests => libs/labelbox/tests}/integration/test_project_setup.py (100%) rename {tests => libs/labelbox/tests}/integration/test_send_to_annotate.py (100%) rename {tests => libs/labelbox/tests}/integration/test_sorting.py (100%) rename {tests => libs/labelbox/tests}/integration/test_task.py (100%) rename {tests => libs/labelbox/tests}/integration/test_task_queue.py (100%) rename {tests => libs/labelbox/tests}/integration/test_toggle_mal.py (100%) rename {tests => libs/labelbox/tests}/integration/test_user_and_org.py (100%) rename {tests => libs/labelbox/tests}/integration/test_user_management.py (100%) rename {tests => libs/labelbox/tests}/integration/test_webhook.py (100%) rename {tests => libs/labelbox/tests}/unit/conftest.py (100%) rename {tests => libs/labelbox/tests}/unit/export_task/test_unit_file_converter.py (100%) rename {tests => libs/labelbox/tests}/unit/export_task/test_unit_file_retriever_by_line.py (100%) rename {tests => libs/labelbox/tests}/unit/export_task/test_unit_file_retriever_by_offset.py (100%) rename {tests => libs/labelbox/tests}/unit/export_task/test_unit_json_converter.py (100%) rename {tests => libs/labelbox/tests}/unit/test_annotation_import.py (100%) rename {tests => libs/labelbox/tests}/unit/test_label_data_type.py (100%) rename {tests => libs/labelbox/tests}/unit/test_mal_import.py (100%) rename {tests => libs/labelbox/tests}/unit/test_ndjson_parsing.py (100%) rename {tests => libs/labelbox/tests}/unit/test_queue_mode.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_case_change.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_delete_batch_data_row_metadata.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_entity_meta.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_export_filters.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_filter.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_identifiables.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_label_import.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_ontology.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_project_validate_labeling_parameter_overrides.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_query.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_rand_gen.py (100%) rename {tests => libs/labelbox/tests}/unit/test_unit_webhook.py (100%) rename {tests => libs/labelbox/tests}/unit/test_utils.py (100%) rename {tests => libs/labelbox/tests}/utils.py (100%) create mode 100644 pyproject.toml create mode 100644 requirements-dev.lock create mode 100644 requirements.lock delete mode 100644 requirements.txt delete mode 100644 setup.py delete mode 100644 tox.ini diff --git a/.github/actions/python-package-shared-setup/action.yml b/.github/actions/python-package-shared-setup/action.yml new file mode 100644 index 000000000..4b9727737 --- /dev/null +++ b/.github/actions/python-package-shared-setup/action.yml @@ -0,0 +1,28 @@ +name: Labelbox Python SDK Shared Setup + +inputs: + rye-version: + required: true + python-version: + required: true + +runs: + using: "composite" + steps: + - name: Install the latest version of rye + uses: eifinger/setup-rye@v2 + with: + version: ${{ inputs.rye-version }} + enable-cache: true + - name: Rye Setup + shell: bash + run: | + rye config --set-bool behavior.use-uv=true + - name: Python setup + shell: bash + run: rye pin ${{ inputs.python-version }} + - name: Environment setup + working-directory: libs/labelbox + shell: bash + run: | + rye sync -f --update-all \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..d1f74dfd4 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,163 @@ +name: Labelbox Python SDK Publish + +on: + workflow_dispatch: + inputs: + tag: + description: 'Release Tag' + required: true + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ inputs.tag }} + - name: Install the latest version of rye + uses: eifinger/setup-rye@v2 + with: + version: ${{ vars.RYE_VERSION }} + enable-cache: true + - name: Rye Setup + run: | + rye config --set-bool behavior.use-uv=true + - name: Create build + working-directory: libs/labelbox + run: | + rye sync + rye build + - uses: actions/upload-artifact@v4 + with: + name: build + path: ./dist + test-build: + needs: ['build'] + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - python-version: 3.8 + prod-key: PROD_LABELBOX_API_KEY_2 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.9 + prod-key: PROD_LABELBOX_API_KEY_3 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: "3.10" + prod-key: PROD_LABELBOX_API_KEY_4 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.11 + prod-key: LABELBOX_API_KEY + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.12 + prod-key: PROD_LABELBOX_API_KEY_5 + da-test-key: DA_GCP_LABELBOX_API_KEY + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ inputs.tag }} + - name: Install the latest version of rye + uses: eifinger/setup-rye@v2 + with: + version: ${{ vars.RYE_VERSION }} + enable-cache: true + - name: Rye Setup + run: | + rye config --set-bool behavior.use-uv=true + - name: Python setup + run: rye pin ${{ matrix.python-version }} + - uses: actions/download-artifact@v4 + with: + name: build + path: ./dist + - name: Prepare package and environment + run: | + rye sync + rye run toml unset --toml-path pyproject.toml tool.rye.workspace + rye sync -f --update-all + - name: Integration Testing + env: + PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + LABELBOX_TEST_API_KEY: ${{ secrets[matrix.prod-key] }} + DA_GCP_LABELBOX_API_KEY: ${{ secrets[matrix.da-test-key] }} + LABELBOX_TEST_ENVIRON: prod + run: | + rye add labelbox --path ./$(find ./dist/ -name *.tar.gz) --sync + cd libs/labelbox + rm pyproject.toml + rye run pytest tests/integration + - name: Data Testing + env: + PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + LABELBOX_TEST_API_KEY: ${{ secrets[matrix.prod-key] }} + DA_GCP_LABELBOX_API_KEY: ${{ secrets[matrix.da-test-key] }} + LABELBOX_TEST_ENVIRON: prod + run: | + rye add labelbox --path ./$(find ./dist/ -name *.tar.gz) --sync --features data + cd libs/labelbox + rye run pytest tests/data + pypi-publish: + runs-on: ubuntu-latest + needs: ['test-build'] + environment: + name: publish + url: 'https://pypi.org/project/labelbox/' + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/download-artifact@v4 + with: + name: build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: artifact/ + container-publish: + runs-on: ubuntu-latest + needs: ['test-build'] + env: + CONTAINER_IMAGE: "ghcr.io/${{ github.repository }}" + steps: + - name: downcase CONTAINER_IMAGE + run: | + echo "CONTAINER_IMAGE=${CONTAINER_IMAGE,,}" >> ${GITHUB_ENV} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + push: true + + platforms: | + linux/amd64 + linux/arm64 + + tags: | + ${{ env.CONTAINER_IMAGE }}:latest + ${{ env.CONTAINER_IMAGE }}:${{ inputs.tag }} + +# Note that the build and pypi-publish jobs are split so that the additional permissions are only granted to the pypi-publish job. \ No newline at end of file diff --git a/.github/workflows/python-package-develop.yml b/.github/workflows/python-package-develop.yml new file mode 100644 index 000000000..8eed1fa93 --- /dev/null +++ b/.github/workflows/python-package-develop.yml @@ -0,0 +1,116 @@ +name: Labelbox Python SDK Staging (Develop) + +on: + push: + branches: [develop] + #paths: + # - 'libs/**' + pull_request: + branches: [develop] + #paths: + # - 'libs/**' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - python-version: 3.8 + api-key: STAGING_LABELBOX_API_KEY_2 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.9 + api-key: STAGING_LABELBOX_API_KEY_3 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: "3.10" + api-key: STAGING_LABELBOX_API_KEY_4 + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.11 + api-key: STAGING_LABELBOX_API_KEY + da-test-key: DA_GCP_LABELBOX_API_KEY + - python-version: 3.12 + api-key: STAGING_LABELBOX_API_KEY_5 + da-test-key: DA_GCP_LABELBOX_API_KEY + uses: ./.github/workflows/python-package-shared.yml + with: + python-version: ${{ matrix.python-version }} + api-key: ${{ matrix.api-key }} + da-test-key: ${{ matrix.da-test-key }} + fixture-profile: true + test-env: 'staging' + secrets: inherit + test-pypi: + runs-on: ubuntu-latest + needs: ['build'] + environment: + name: Test-PyPI + url: 'https://test.pypi.org/p/labelbox-test' + permissions: + # IMPORTANT: this permission is mandatory for trusted publishing + id-token: write + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + - name: Install the latest version of rye + uses: eifinger/setup-rye@v2 + with: + version: '0.32.0' + enable-cache: true + - name: Rye Setup + run: | + rye config --set-bool behavior.use-uv=true + - name: Create build + id: create-build + working-directory: libs/labelbox + run: | + VERSION=$(date +"%Y.%m.%d.%H.%M") + echo "pip install --index-url https://test.pypi.org/simple/ labelbox-test@$VERSION" >> "$GITHUB_STEP_SUMMARY" + rye sync + rye version "$VERSION" + rye run toml set --toml-path pyproject.toml project.name labelbox-test + rye build + - name: Publish package distributions to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ + repository-url: https://test.pypi.org/legacy/ + test-container: + runs-on: ubuntu-latest + if: github.event == 'push' + needs: ['build'] + env: + CONTAINER_IMAGE: "ghcr.io/${{ github.repository }}" + steps: + - name: downcase CONTAINER_IMAGE + run: | + echo "CONTAINER_IMAGE=${CONTAINER_IMAGE,,}" >> ${GITHUB_ENV} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + push: true + + platforms: | + linux/amd64 + linux/arm64 + + tags: | + ${{ env.CONTAINER_IMAGE }}:develop + ${{ env.CONTAINER_IMAGE }}:${{ github.sha }} \ No newline at end of file diff --git a/.github/workflows/python-package-develop.yaml b/.github/workflows/python-package-prod.yml similarity index 61% rename from .github/workflows/python-package-develop.yaml rename to .github/workflows/python-package-prod.yml index 63199127c..f5d38bba5 100644 --- a/.github/workflows/python-package-develop.yaml +++ b/.github/workflows/python-package-prod.yml @@ -1,10 +1,11 @@ -name: Labelbox Python SDK Develop +name: Labelbox Python SDK Prod (Develop) on: - push: - branches: [develop] - pull_request: - branches: [develop] + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: @@ -13,25 +14,25 @@ jobs: matrix: include: - python-version: 3.8 - api-key: STAGING_LABELBOX_API_KEY_2 + api-key: PROD_LABELBOX_API_KEY_2 da-test-key: DA_GCP_LABELBOX_API_KEY - python-version: 3.9 - api-key: STAGING_LABELBOX_API_KEY_3 + api-key: PROD_LABELBOX_API_KEY_3 da-test-key: DA_GCP_LABELBOX_API_KEY - python-version: "3.10" - api-key: STAGING_LABELBOX_API_KEY_4 + api-key: PROD_LABELBOX_API_KEY_4 da-test-key: DA_GCP_LABELBOX_API_KEY - python-version: 3.11 - api-key: STAGING_LABELBOX_API_KEY + api-key: LABELBOX_API_KEY da-test-key: DA_GCP_LABELBOX_API_KEY - python-version: 3.12 - api-key: STAGING_LABELBOX_API_KEY_5 + api-key: PROD_LABELBOX_API_KEY_5 da-test-key: DA_GCP_LABELBOX_API_KEY uses: ./.github/workflows/python-package-shared.yml with: python-version: ${{ matrix.python-version }} api-key: ${{ matrix.api-key }} da-test-key: ${{ matrix.da-test-key }} - fixture-profile: true - test-env: 'staging' - secrets: inherit + fixture-profile: false + test-env: 'prod' + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/python-package-shared.yml b/.github/workflows/python-package-shared.yml index fcc93ac7a..ceaeaa0be 100644 --- a/.github/workflows/python-package-shared.yml +++ b/.github/workflows/python-package-shared.yml @@ -18,61 +18,63 @@ on: fixture-profile: required: true type: boolean + jobs: - build: + lint: runs-on: ubuntu-latest - env: - # make sure to tell tox to use these environs in tox.ini - LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }} - DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }} - LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }} - FIXTURE_PROFILE: ${{ inputs.fixture-profile }} steps: - - name: Cancel previous workflow - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} - ref: ${{ github.head_ref }} - - - name: Set up Python ${{ inputs.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ inputs.python-version }} - cache: "pip" - - - name: yapf - id: yapf - uses: AlexanderMelde/yapf-action@master - with: - args: --verbose --recursive --parallel --style "google" - - name: dependencies - run: | - sudo apt-get -y update - sudo apt install -y libsm6 \ - libxext6 \ - ffmpeg \ - libfontconfig1 \ - libxrender1 \ - libgl1-mesa-glx - - name: mypy - run: | - pip install strenum - pip install mypy==1.9.0 - # TODO: consider installing requests typing - mypy -p labelbox --pretty --show-error-codes --non-interactive --install-types - - name: Install test dependencies - run: | - pip install tox==4.14.1 - # TODO: replace tox.ini with what the Makefile does - # to make sure local testing is - # identical to github actions which uses tox.ini - - name: Test with tox (unit) - run: | - tox -e py -- tests/unit - - name: Test with tox (integration / data) - run: | - tox -e py -- tests/integration tests/data + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + - uses: ./.github/actions/python-package-shared-setup + with: + rye-version: ${{ vars.RYE_VERSION }} + python-version: ${{ inputs.python-version }} + - name: Linting + working-directory: libs/labelbox + run: rye run lint + integration: + runs-on: ubuntu-latest + concurrency: + group: labelbox-python-${{ inputs.test-env }}-${{ inputs.python-version }} + cancel-in-progress: false + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + - uses: ./.github/actions/python-package-shared-setup + with: + rye-version: ${{ vars.RYE_VERSION }} + python-version: ${{ inputs.python-version }} + - name: Integration Testing + env: + PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }} + DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }} + LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }} + working-directory: libs/labelbox + run: rye run integration + unit-data: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.ACTIONS_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + - uses: ./.github/actions/python-package-shared-setup + with: + rye-version: ${{ vars.RYE_VERSION }} + python-version: ${{ inputs.python-version }} + - name: Unit && Data Testing + env: + PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }} + DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }} + LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }} + working-directory: libs/labelbox + run: | + rye sync -f --features labelbox/data + rye run unit + rye run data \ No newline at end of file diff --git a/.github/workflows/release-container.yaml b/.github/workflows/release-container.yaml deleted file mode 100644 index f6860f4db..000000000 --- a/.github/workflows/release-container.yaml +++ /dev/null @@ -1,44 +0,0 @@ -# ref: https://github.com/marketplace/actions/build-and-push-docker-images - -name: Release container image - -on: - release: - types: [published] - -env: - CONTAINER_IMAGE: "ghcr.io/${{ github.repository }}" - -jobs: - context: - runs-on: ubuntu-latest - - steps: - - name: downcase CONTAINER_IMAGE - run: | - echo "CONTAINER_IMAGE=${CONTAINER_IMAGE,,}" >> ${GITHUB_ENV} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - push: true - - platforms: | - linux/amd64 - linux/arm64 - - tags: | - ${{ env.CONTAINER_IMAGE }}:latest - ${{ env.CONTAINER_IMAGE }}:${{ github.event.release.tag_name }} - \ No newline at end of file diff --git a/.github/workflows/testing-container.yaml b/.github/workflows/testing-container.yaml deleted file mode 100644 index 1dc02fb73..000000000 --- a/.github/workflows/testing-container.yaml +++ /dev/null @@ -1,45 +0,0 @@ -# ref: https://docs.github.com/en/actions/publishing-packages/publishing-docker-images - -name: Testing container image - -on: - push: - branches: - - 'develop' - -env: - CONTAINER_IMAGE: "ghcr.io/${{ github.repository }}" - -jobs: - context: - runs-on: ubuntu-latest - - steps: - - name: downcase CONTAINER_IMAGE - run: | - echo "CONTAINER_IMAGE=${CONTAINER_IMAGE,,}" >> ${GITHUB_ENV} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push - uses: docker/build-push-action@v5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - push: true - - platforms: | - linux/amd64 - linux/arm64 - - tags: | - ${{ env.CONTAINER_IMAGE }}:develop - ${{ env.CONTAINER_IMAGE }}:${{ github.sha }} - \ No newline at end of file diff --git a/.gitignore b/.gitignore index ff0a43573..30497f6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -80,9 +80,6 @@ target/ profile_default/ ipython_config.py -# pyenv -.python-version - # vscode .vscode @@ -144,3 +141,10 @@ docs/source/_static docs/source/_templates /.graphqlconfig /schema.graphql + + +# pytest +.testmondata* + +# rye +.env \ No newline at end of file diff --git a/.python-version b/.python-version new file mode 100644 index 000000000..9ad6380c1 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.8.18 diff --git a/.readthedocs.yml b/.readthedocs.yml index 9653e0c34..2ee682d5a 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,10 +5,20 @@ # Read the docs config file version (Required) version: 2 +# https://github.com/wemake-services/wemake-django-template/blob/master/.readthedocs.yml build: - os: ubuntu-22.04 + os: ubuntu-lts-latest tools: - python: "3.10" + python: "3.12" + jobs: + pre_create_environment: + - asdf plugin add rye + - asdf plugin install rye 0.29 + - asdf global rye 0.29 + - rye config --set-bool behavior.global-python=true + - rye config --set-bool behavior.use-uv=true + post_install: + - rye sync # Build documentation in the docs/ directory with Sphinx sphinx: @@ -16,12 +26,4 @@ sphinx: # Not building additional formats, as PDF build is failing # formats: -# - pdf - -# Optionally set the version of Python and requirements required to build your docs -python: - install: - - requirements: requirements.txt - - requirements: docs/requirements.txt - - method: setuptools - path: . \ No newline at end of file +# - pdf \ No newline at end of file diff --git a/CONTRIB.md b/CONTRIB.md deleted file mode 100644 index 768b0073a..000000000 --- a/CONTRIB.md +++ /dev/null @@ -1,93 +0,0 @@ -# Labelbox Python SDK Contribution Guide - -## Contribution Guidelines -Thank you for expressing your interest in contributing to the Labelbox SDK. -To ensure that your contribution aligns with our guidelines, please carefully -review the following considerations before proceeding: - -* For feature requests, we recommend consulting with Labelbox support or - creating a [Github Issue](https://github.com/Labelbox/labelbox-python/issues) on our repository. -* We can only accept general solutions that address common issues rather than solutions - designed for specific use cases. Acceptable contributions include simple bug fixes and - improvements to functions within the schema/ package. -* Please ensure that any new libraries are compliant with the Apache license that governs the Labelbox SDK. -* Ensure that you update any relevant docstrings and comments within your code -* Ensure that any new Python components, such as classes, packages, or methods, that need to feature in the Labelbox documentation have entries in the file [index.rst](https://github.com/Labelbox/labelbox-python/blob/develop/docs/source/index.rst). Also, make sure you run `make html` locally in the `docs` folder to check if the documentation is correctly updated according to the docstrings in the code added. - -## Repository Organization - -The SDK source (excluding tests and support tools) is organized into the -following packages/modules: -* `data/` package contains code that maps annotations (labels or pre-labels) to - Python objects, as well as serialization and deserialization tools for converting - between NDJson and Annotation Types. -* `orm/` package contains code that supports the general mapping of Labelbox - data to Python objects. This includes base classes, attribute (field and - relationship) classes, generic GraphQL queries etc. -* `schema/` package contains definitions of classes which represent data type - (e.g. Project, Label etc.). It relies on `orm/` classes for easy and succinct - object definitions. It also contains custom functionalities and custom GraphQL - templates where necessary. -* `client.py` contains the `Client` class that's the client-side stub for - communicating with Labelbox servers. -* `exceptions.py` contains declarations for all Labelbox errors. -* `pagination.py` contains support for paginated relationship and collection - fetching. -* `utils.py` contains utility functions. - -## Branches - -* All development happens in per-feature branches prefixed by contributor's - initials. For example `fs/feature_name`. -* Approved PRs are merged to the `develop` branch. -* The `develop` branch is merged to `master` on each release. - -## Formatting - -Before making a commit, to automatically adhere to our formatting standards, -install and activate [pre-commit](https://pre-commit.com/) -```shell -pip install pre-commit -pre-commit install -``` -After the above, running `git commit ...` will attempt to fix formatting, -and make necessary changes to files. You will then need to stage those files again. - -You may also manually format your code by running the following: -```shell -yapf tests labelbox -i --verbose --recursive --parallel --style "google" -``` - - -## Testing - -Currently, the SDK functionality is tested using unit and integration tests. -The integration tests communicate with a Labelbox server (by default the staging server) -and are in that sense not self-contained. - -Please consult "Testing" section in the README for more details on how to test. - -Additionally, to execute tests you will need to provide an API key for the server you're using -for testing (staging by default) in the `LABELBOX_TEST_API_KEY` environment -variable. For more info see [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started). - - -## Release Steps - -Please consult the Labelbox team for releasing your contributions - -## Running Jupyter Notebooks - -We have plenty of good samples in the _examples_ directory and using them for testing can help us increase our productivity. One way to use jupyter notebooks is to run the jupyter server locally (another way is to use a VSC plugin, not documented here). It works really fast. - -Make sure your notebook will use your source code: -1. `ipython profile create` -2. `ipython locate` - will show where the config file is. This is the config file used by the jupyter server, since it runs via ipython -3. Open the file (this should be ipython_config.py and it is usually located in ~/.ipython/profile_default) and add the following line of code: -``` -c.InteractiveShellApp.exec_lines = [ - 'import sys; sys.path.insert(0, "")' -] -``` -4. Go to the root of your project and run `jupyter notebook` to start the server - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..fcf917f67 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,127 @@ +# Labelbox Python SDK Contribution Guide + +## Table of Contents +- [Contribution Guidelines](#contribution-guidelines) +- [Branches](#branches) +- [Release Steps](#release-steps) +- [Jupyter Notebooks](#jupyter-notebooks) +- [Contribution Prerequisites](#contribution-prerequisites) +- [Building Locally](#building-locally) +- [Testing](#testing) + +## Contribution Guidelines +Thank you for expressing your interest in contributing to the SDK. To ensure that your contribution aligns with our guidelines, please carefully review the following before proceeding: + +* For feature requests, we recommend consulting with [Labelbox Support](https://docs.labelbox.com/docs/contacting-customer-support) support or creating a [Github Issue](https://github.com/Labelbox/labelbox-python/issues). +* We can only accept general solutions that address common issues rather than solutions designed for specific use cases. Example contributions include bug fixes and dependency upgrades. +* Please ensure that any new libraries are compliant with the Apache license that governs the SDK. +* Ensure that you update any relevant docstrings and comments within your code. +* Ensure that any new Python components, such as classes, packages, or methods, that need to feature in the Labelbox documentation have entries in the file [index.rst](https://github.com/Labelbox/labelbox-python/blob/develop/docs/source/index.rst). Also, make sure you run `make html` locally in the `docs` folder to check if the documentation is correctly updated according to the docstrings in the code added. + +## Branches +* All development happens in per-feature branches prefixed by contributor's initials. For example `fs/feature_name`. +* Approved PRs are merged to the `develop` branch. +* The `develop` branch is merged to `master` on each release. + +## Release Steps +Please consult the [Labelbox](https://docs.labelbox.com/docs/contacting-customer-support) team for releasing your contributions. + +## Contribution Prerequisites + +The SDK repository is laid out as a monorepo in `libs/`. Each module under `libs/` should describe the purpose of the module and specific development requirements. + +The tool that is being used to manage the monorepo is [Rye](https://rye-up.com/) which means you need to install it before contributing or building any of them locally. + +To understand why Rye was chosen, see [here](https://alpopkes.com/posts/python/packaging_tools/). TLDR: Environment, Package, Python, management along with Package publishing and Package building is unified under a single tool for consistency of environment for SDK development. + +If you want to not deal with setting up `Rye` on your local machine directly, feel free to use one of [Docker containers](https://github.com/Labelbox/labelbox-python/pkgs/container/labelbox-python) we have built which contains the entire SDK with `Rye` setup for you already. + +**You can use Poetry to manage the virtual environment.** There's nothing blocking you from using Poetry to manage the virtual environment as the standard `pyproject.toml` format is used, but you'll have to deal with managing Python yourself + be asked not to check in any `poetry.lock` files. Also, you'll have to run equivalent poetry commands that may not be listed in the documentation to perform the same general operations (testing, building, etc.). + +## Building Locally + +These are general steps that all modules in `libs/` adhere to give the prerequisite of the installation of `Rye`. + +1. Run `rye sync` in the module folder you want to work on (EG `rye sync --all-features` to work on `labelbox`). +2. Run `rye build` to create a distribution in `dist/` which you can install into a Python environment (EG `pip install dist/labelbox-build.tar.gz`). + +It is generally **not** recommended to do `pip install -e .` with any Labelbox module to avoid virtual environment pollution. If you really want to modify the SDK while making it compatible with your existing `pip` based projects, use the method listed above. + +## Testing + +Each module within the repository will generally have three components to testing: unit testing, integration testing, and linting/formatting. + +### Unit Testing + +```bash +rye run unit +``` + +### Integration Testing + +```bash +LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run integration +``` +For more info on how to get a `LABELBOX_TEST_API_KEY` [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started). + +**Integration tests by default will run against your account that you provide an API Key from and modify its data. If you want to run integration tests, without it impacting your existing account, create an additional account using a secondary e-mail on [Labelbox](https://labelbox.com). Free accounts are sufficent for integration testing purposes.** + +You can also use a `.env` file if you prefer instead of needing to type out the environmental overrides every single time you want to run commands. Please add a `--env-file` parameter to the test command (EG `rye --env-file=.env run integration`). + +### (Optional) Data Testing + +For testing the impact of the extra installs included with `labelbox[data]`, run the following: + +```bash +LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run data +``` + +By default `rye sync` does not install the extra packages needed in `labelbox[data]`. You'll need to run `rye sync --all-features`. Do not checkin `requirements.lock` or `requirements-dev.lock` after doing this. + +### Linting / Formatting + +Before making a commit, to automatically adhere to our formatting standards, it is recommended to install and activate [pre-commit](https://pre-commit.com/) +```shell +pip install pre-commit +pre-commit install +``` +After the above, running `git commit ...` will attempt to fix formatting, +and make necessary changes to files. You will then need to stage those files again. + +You may also manually format your code by running the following: +```bash +rye run lint +``` + +### Documentation + +To generate `ReadTheDocs,` run the following command. + +```bash +rye run docs +``` + +## Jupyter Notebooks + +We have samples in the `examples` directory and using them for testing can help increase your productivity. + +Make sure your notebook will use your source code: +1. `ipython profile create` +2. `ipython locate` - will show where the config file is. This is the config file used by the jupyter server, since it runs via ipython +3. Open the file (this should be ipython_config.py and it is usually located in ~/.ipython/profile_default) and add the following line of code: +``` +c.InteractiveShellApp.exec_lines = [ + 'import sys; sys.path.insert(0, "")' +] +``` +4. Go to the root of your project and run `jupyter notebook` to start the server + + + + + + + + + + diff --git a/Dockerfile b/Dockerfile index 51fc5949f..41e55028b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,40 @@ -#https://stackoverflow.com/questions/77364550/attributeerror-module-pkgutil-has-no-attribute-impimporter-did-you-mean -#https://github.com/pyproj4/pyproj/issues/1321 -FROM python:3.8-slim-bullseye - -RUN pip install pytest=="7.4.4" pytest-cases pytest-rerunfailures pytest-snapshot tox mypy strenum -RUN apt-get -y update -RUN apt install -y libsm6 \ - libxext6 \ - ffmpeg \ - libfontconfig1 \ - libxrender1 \ - libgl1-mesa-glx \ - libgeos-dev \ - gcc - -WORKDIR /usr/src/ -COPY requirements.txt /usr/src/ -RUN pip install -r requirements.txt -COPY . /usr/src/ +# https://github.com/ucyo/python-package-template/blob/master/Dockerfile +FROM python:3.8-slim as rye +ENV LANG="C.UTF-8" \ + LC_ALL="C.UTF-8" \ + PATH="/home/python/.local/bin:/home/python/.rye/shims:$PATH" \ + PIP_NO_CACHE_DIR="false" \ + RYE_VERSION="0.32.0" \ + RYE_INSTALL_OPTION="--yes" \ + LABELBOX_TEST_ENVIRON="prod" + +RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + inotify-tools \ + make \ + && rm -rf /var/lib/apt/lists/* + +<<<<<<< HEAD RUN python setup.py install -CMD tox -e py -- tests/integration tests/data \ No newline at end of file +CMD tox -e py -- tests/integration tests/data +======= +RUN groupadd --gid 1000 python && \ + useradd --uid 1000 --gid python --shell /bin/bash --create-home python + +USER 1000 +WORKDIR /home/python/ + +RUN curl -sSf https://rye-up.com/get | bash - + +COPY --chown=python:python . /home/python/labelbox-python/ +WORKDIR /home/python/labelbox-python + +RUN rye config --set-bool behavior.global-python=true && \ + rye config --set-bool behavior.use-uv=true && \ + rye pin 3.8 && \ + rye sync + +CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data +>>>>>>> 6d9cf45c (Initial move) diff --git a/README.md b/README.md index 2909aa43b..ad8bcb2ce 100644 --- a/README.md +++ b/README.md @@ -74,4 +74,4 @@ The SDK is well-documented to help developers get started quickly and use the SD - [Labelbox Official Documentation](https://docs.labelbox.com/docs/overview) - [Jupyter Notebook Examples](https://github.com/Labelbox/labelbox-python/tree/master/examples) -- [Python SDK reference docs](https://labelbox-python.readthedocs.io/en/latest/) +- [Python SDK Reference](https://labelbox-python.readthedocs.io/en/latest/) \ No newline at end of file diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 57cbf138b..000000000 --- a/docs/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# Labelbox Python SDK API Documentation - -The Labelbox Python API documentation is generated from source code comments -using Sphinx (https://www.sphinx-doc.org/). - -## Preparing the Sphinx environment - -To generate the documentation install Sphinx and Sphinxcontrib-Napoleon. The -easiest way to do it is using a Python virtual env and pip: - -``` -# create a virtual environment -python3 -m venv labelbox_docs_venv - -# activate the venv -source ./labelbox_docs_venv/bin/activate - -# upgrade venv pip and setuptools -pip install --upgrade pip setuptools - -# install Sphinx and necessary contrib from requriements -pip install -r labelbox_root/docs/requirements.txt - -# install Labelbox dependencies -pip install -r labelbox_root/requirements.txt -``` - -There are other ways to do prepare the environment, but we highly recommend -using a Python virtual environment. - -## Generating Labelbox SDK API documentation - -With the Sphinx environment prepared, enter the docs folder: - -``` -cd labelbox_root/docs/ -``` - -Run the make build tool, instructing it to build docs as HTML: -``` -make html -``` diff --git a/docs/conf.py b/docs/conf.py index 22902381e..f06dfca81 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,10 +9,7 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -import os -import sys - -sys.path.insert(0, os.path.abspath('../..')) +# # -- Project information ----------------------------------------------------- diff --git a/docs/labelbox/conf.py b/docs/labelbox/conf.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index adaf24147..000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -sphinx==7.1.2 -sphinx-multiproject==1.0.0rc1 -sphinx-rtd-theme==2.0.0 \ No newline at end of file diff --git a/.yapfignore b/libs/labelbox/.yapfignore similarity index 77% rename from .yapfignore rename to libs/labelbox/.yapfignore index 1635ab39e..b8ec26f0f 100644 --- a/.yapfignore +++ b/libs/labelbox/.yapfignore @@ -1,3 +1,4 @@ Makefile *.txt *.ini +*.lock \ No newline at end of file diff --git a/CHANGELOG.md b/libs/labelbox/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to libs/labelbox/CHANGELOG.md diff --git a/libs/labelbox/README.md b/libs/labelbox/README.md new file mode 100644 index 000000000..35153dbf0 --- /dev/null +++ b/libs/labelbox/README.md @@ -0,0 +1,25 @@ +# Labelbox + +Core mono-module for Labelbox's SDK. For full detailed information, +please go to Labelbox's [Github Page](https://github.com/Labelbox/labelbox-python). + +## Repository Organization + +The SDK source (excluding tests and support tools) is organized into the +following packages/modules: +* `data/` package contains code that maps annotations (labels or pre-labels) to + Python objects, as well as serialization and deserialization tools for converting + between NDJson and Annotation Types. +* `orm/` package contains code that supports the general mapping of Labelbox + data to Python objects. This includes base classes, attribute (field and + relationship) classes, generic GraphQL queries etc. +* `schema/` package contains definitions of classes which represent data type + (e.g. Project, Label etc.). It relies on `orm/` classes for easy and succinct + object definitions. It also contains custom functionalities and custom GraphQL + templates where necessary. +* `client.py` contains the `Client` class that's the client-side stub for + communicating with Labelbox servers. +* `exceptions.py` contains declarations for all Labelbox errors. +* `pagination.py` contains support for paginated relationship and collection + fetching. +* `utils.py` contains utility functions. diff --git a/mypy.ini b/libs/labelbox/mypy.ini similarity index 100% rename from mypy.ini rename to libs/labelbox/mypy.ini diff --git a/libs/labelbox/pyproject.toml b/libs/labelbox/pyproject.toml new file mode 100644 index 000000000..7d9e7d85c --- /dev/null +++ b/libs/labelbox/pyproject.toml @@ -0,0 +1,99 @@ +[project] +name = "labelbox" +version = "3.66.0" +description = "Labelbox Python API" +authors = [ + { name = "Labelbox", email = "engineering@labelbox.com" } +] +dependencies = [ + "google-api-core>=1.22.1", + "pydantic>=1.8", + "python-dateutil>=2.8.2, <2.9.0", + "requests>=2.22.0", + "strenum>=0.4.15", + "tqdm>=4.66.2", + "geojson>=3.1.0", +] +readme = "README.md" +requires-python = ">=3.8" +classifiers=[ + # How mature is this project? + "Development Status :: 5 - Production/Stable", + # Indicate who your project is intended for + "Topic :: Scientific/Engineering :: Artificial Intelligence", + "Topic :: Software Development :: Libraries", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: Education", + # Pick your license as you wish + "License :: OSI Approved :: Apache Software License", + # Specify the Python versions you support here. + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] +keywords = ["ml", "ai", "labelbox", "labeling", "llm", "machinelearning", "edu"] + +[project.urls] +Homepage = "https://labelbox.com/" +Documentation = "https://labelbox-python.readthedocs.io/en/latest/" +Repository = "https://github.com/Labelbox/labelbox-python" +Issues = "https://github.com/Labelbox/labelbox-python/issues" +Changelog = "https://github.com/Labelbox/labelbox-python/blob/develop/libs/labelbox/CHANGELOG.md" + +[project.optional-dependencies] +data = [ + "shapely>=2.0.3", + "numpy>=1.24.4", + "pillow>=10.2.0", + "opencv-python>=4.9.0.80", + "typeguard>=4.1.5", + "imagesize>=1.4.1", + "pyproj>=3.5.0", + "pygeotile>=1.0.6", + "typing-extensions>=4.10.0", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[tool.rye] +managed = true +dev-dependencies = [ + "yapf>=0.40.2", + "mypy>=1.9.0", + "types-pillow>=10.2.0.20240311", + "types-python-dateutil>=2.9.0.20240316", + "types-requests>=2.31.0.20240311", + "types-tqdm>=4.66.0.20240106", +] + +[tool.rye.scripts] +unit = "pytest tests/unit" +# https://github.com/Labelbox/labelbox-python/blob/7c84fdffbc14fd1f69d2a6abdcc0087dc557fa4e/Makefile +# see integration_client.py for full meaning / customization of this command +# LABELBOX_TEST_ENVIRON="custom" \ +# DA_GCP_LABELBOX_API_KEY=${DA_GCP_LABELBOX_API_KEY} \ +# LABELBOX_TEST_API_KEY=${LABELBOX_TEST_API_KEY_CUSTOM} \ +# LABELBOX_TEST_GRAPHQL_API_ENDPOINT=${LABELBOX_TEST_GRAPHQL_API_ENDPOINT} \ +# LABELBOX_TEST_REST_API_ENDPOINT=${LABELBOX_TEST_REST_API_ENDPOINT} \ +# used by LB +# LABELBOX_TEST_ENVIRON="ephemeral" \ +# SERVICE_API_KEY=${SERVICE_API_KEY} \ +# LABELBOX_TEST_BASE_URL="http://host.docker.internal:8080" \ +integration = { cmd = "pytest tests/integration" } +data = { cmd = "pytest tests/data" } +yapf-lint = "yapf tests src -i --verbose --recursive --parallel --style \"google\"" +mypy-lint = "mypy src --pretty --show-error-codes --non-interactive --install-types" +lint = { chain = ["yapf-lint", "mypy-lint"] } +test = { chain = ["lint", "unit", "integration" ] } + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.build.targets.wheel] +packages = ["src/labelbox"] \ No newline at end of file diff --git a/scripts/ensure_local_setup.sh b/libs/labelbox/scripts/ensure_local_setup.sh similarity index 100% rename from scripts/ensure_local_setup.sh rename to libs/labelbox/scripts/ensure_local_setup.sh diff --git a/scripts/update_sdk_version.sh b/libs/labelbox/scripts/update_sdk_version.sh similarity index 100% rename from scripts/update_sdk_version.sh rename to libs/labelbox/scripts/update_sdk_version.sh diff --git a/labelbox/__init__.py b/libs/labelbox/src/labelbox/__init__.py similarity index 97% rename from labelbox/__init__.py rename to libs/labelbox/src/labelbox/__init__.py index d7e772659..1e1810ed2 100644 --- a/labelbox/__init__.py +++ b/libs/labelbox/src/labelbox/__init__.py @@ -35,4 +35,4 @@ from labelbox.schema.queue_mode import QueueMode from labelbox.schema.task_queue import TaskQueue from labelbox.schema.identifiables import UniqueIds, GlobalKeys, DataRowIds -from labelbox.schema.identifiable import UniqueId, GlobalKey +from labelbox.schema.identifiable import UniqueId, GlobalKey \ No newline at end of file diff --git a/labelbox/client.py b/libs/labelbox/src/labelbox/client.py similarity index 100% rename from labelbox/client.py rename to libs/labelbox/src/labelbox/client.py diff --git a/labelbox/data/__init__.py b/libs/labelbox/src/labelbox/data/__init__.py similarity index 100% rename from labelbox/data/__init__.py rename to libs/labelbox/src/labelbox/data/__init__.py diff --git a/labelbox/data/annotation_types/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/__init__.py similarity index 100% rename from labelbox/data/annotation_types/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/__init__.py diff --git a/labelbox/data/annotation_types/annotation.py b/libs/labelbox/src/labelbox/data/annotation_types/annotation.py similarity index 100% rename from labelbox/data/annotation_types/annotation.py rename to libs/labelbox/src/labelbox/data/annotation_types/annotation.py diff --git a/labelbox/data/annotation_types/base_annotation.py b/libs/labelbox/src/labelbox/data/annotation_types/base_annotation.py similarity index 100% rename from labelbox/data/annotation_types/base_annotation.py rename to libs/labelbox/src/labelbox/data/annotation_types/base_annotation.py diff --git a/labelbox/data/annotation_types/classification/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/classification/__init__.py similarity index 100% rename from labelbox/data/annotation_types/classification/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/classification/__init__.py diff --git a/labelbox/data/annotation_types/classification/classification.py b/libs/labelbox/src/labelbox/data/annotation_types/classification/classification.py similarity index 100% rename from labelbox/data/annotation_types/classification/classification.py rename to libs/labelbox/src/labelbox/data/annotation_types/classification/classification.py diff --git a/labelbox/data/annotation_types/collection.py b/libs/labelbox/src/labelbox/data/annotation_types/collection.py similarity index 100% rename from labelbox/data/annotation_types/collection.py rename to libs/labelbox/src/labelbox/data/annotation_types/collection.py diff --git a/labelbox/data/annotation_types/data/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/data/__init__.py similarity index 100% rename from labelbox/data/annotation_types/data/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/__init__.py diff --git a/labelbox/data/annotation_types/data/audio.py b/libs/labelbox/src/labelbox/data/annotation_types/data/audio.py similarity index 100% rename from labelbox/data/annotation_types/data/audio.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/audio.py diff --git a/labelbox/data/annotation_types/data/base_data.py b/libs/labelbox/src/labelbox/data/annotation_types/data/base_data.py similarity index 100% rename from labelbox/data/annotation_types/data/base_data.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/base_data.py diff --git a/labelbox/data/annotation_types/data/conversation.py b/libs/labelbox/src/labelbox/data/annotation_types/data/conversation.py similarity index 100% rename from labelbox/data/annotation_types/data/conversation.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/conversation.py diff --git a/labelbox/data/annotation_types/data/dicom.py b/libs/labelbox/src/labelbox/data/annotation_types/data/dicom.py similarity index 100% rename from labelbox/data/annotation_types/data/dicom.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/dicom.py diff --git a/labelbox/data/annotation_types/data/document.py b/libs/labelbox/src/labelbox/data/annotation_types/data/document.py similarity index 100% rename from labelbox/data/annotation_types/data/document.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/document.py diff --git a/labelbox/data/annotation_types/data/generic_data_row_data.py b/libs/labelbox/src/labelbox/data/annotation_types/data/generic_data_row_data.py similarity index 100% rename from labelbox/data/annotation_types/data/generic_data_row_data.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/generic_data_row_data.py diff --git a/labelbox/data/annotation_types/data/html.py b/libs/labelbox/src/labelbox/data/annotation_types/data/html.py similarity index 100% rename from labelbox/data/annotation_types/data/html.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/html.py diff --git a/labelbox/data/annotation_types/data/llm_prompt_creation.py b/libs/labelbox/src/labelbox/data/annotation_types/data/llm_prompt_creation.py similarity index 100% rename from labelbox/data/annotation_types/data/llm_prompt_creation.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/llm_prompt_creation.py diff --git a/labelbox/data/annotation_types/data/llm_prompt_response_creation.py b/libs/labelbox/src/labelbox/data/annotation_types/data/llm_prompt_response_creation.py similarity index 100% rename from labelbox/data/annotation_types/data/llm_prompt_response_creation.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/llm_prompt_response_creation.py diff --git a/labelbox/data/annotation_types/data/llm_response_creation.py b/libs/labelbox/src/labelbox/data/annotation_types/data/llm_response_creation.py similarity index 100% rename from labelbox/data/annotation_types/data/llm_response_creation.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/llm_response_creation.py diff --git a/labelbox/data/annotation_types/data/raster.py b/libs/labelbox/src/labelbox/data/annotation_types/data/raster.py similarity index 100% rename from labelbox/data/annotation_types/data/raster.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/raster.py diff --git a/labelbox/data/annotation_types/data/text.py b/libs/labelbox/src/labelbox/data/annotation_types/data/text.py similarity index 100% rename from labelbox/data/annotation_types/data/text.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/text.py diff --git a/labelbox/data/annotation_types/data/tiled_image.py b/libs/labelbox/src/labelbox/data/annotation_types/data/tiled_image.py similarity index 100% rename from labelbox/data/annotation_types/data/tiled_image.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/tiled_image.py diff --git a/labelbox/data/annotation_types/data/video.py b/libs/labelbox/src/labelbox/data/annotation_types/data/video.py similarity index 100% rename from labelbox/data/annotation_types/data/video.py rename to libs/labelbox/src/labelbox/data/annotation_types/data/video.py diff --git a/labelbox/data/annotation_types/feature.py b/libs/labelbox/src/labelbox/data/annotation_types/feature.py similarity index 100% rename from labelbox/data/annotation_types/feature.py rename to libs/labelbox/src/labelbox/data/annotation_types/feature.py diff --git a/labelbox/data/annotation_types/geometry/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/__init__.py similarity index 100% rename from labelbox/data/annotation_types/geometry/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/__init__.py diff --git a/labelbox/data/annotation_types/geometry/geometry.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/geometry.py similarity index 100% rename from labelbox/data/annotation_types/geometry/geometry.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/geometry.py diff --git a/labelbox/data/annotation_types/geometry/line.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/line.py similarity index 100% rename from labelbox/data/annotation_types/geometry/line.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/line.py diff --git a/labelbox/data/annotation_types/geometry/mask.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/mask.py similarity index 100% rename from labelbox/data/annotation_types/geometry/mask.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/mask.py diff --git a/labelbox/data/annotation_types/geometry/point.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/point.py similarity index 100% rename from labelbox/data/annotation_types/geometry/point.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/point.py diff --git a/labelbox/data/annotation_types/geometry/polygon.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/polygon.py similarity index 100% rename from labelbox/data/annotation_types/geometry/polygon.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/polygon.py diff --git a/labelbox/data/annotation_types/geometry/rectangle.py b/libs/labelbox/src/labelbox/data/annotation_types/geometry/rectangle.py similarity index 100% rename from labelbox/data/annotation_types/geometry/rectangle.py rename to libs/labelbox/src/labelbox/data/annotation_types/geometry/rectangle.py diff --git a/labelbox/data/annotation_types/label.py b/libs/labelbox/src/labelbox/data/annotation_types/label.py similarity index 100% rename from labelbox/data/annotation_types/label.py rename to libs/labelbox/src/labelbox/data/annotation_types/label.py diff --git a/labelbox/data/annotation_types/metrics/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/metrics/__init__.py similarity index 100% rename from labelbox/data/annotation_types/metrics/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/metrics/__init__.py diff --git a/labelbox/data/annotation_types/metrics/base.py b/libs/labelbox/src/labelbox/data/annotation_types/metrics/base.py similarity index 100% rename from labelbox/data/annotation_types/metrics/base.py rename to libs/labelbox/src/labelbox/data/annotation_types/metrics/base.py diff --git a/labelbox/data/annotation_types/metrics/confusion_matrix.py b/libs/labelbox/src/labelbox/data/annotation_types/metrics/confusion_matrix.py similarity index 100% rename from labelbox/data/annotation_types/metrics/confusion_matrix.py rename to libs/labelbox/src/labelbox/data/annotation_types/metrics/confusion_matrix.py diff --git a/labelbox/data/annotation_types/metrics/scalar.py b/libs/labelbox/src/labelbox/data/annotation_types/metrics/scalar.py similarity index 100% rename from labelbox/data/annotation_types/metrics/scalar.py rename to libs/labelbox/src/labelbox/data/annotation_types/metrics/scalar.py diff --git a/labelbox/data/annotation_types/ner/__init__.py b/libs/labelbox/src/labelbox/data/annotation_types/ner/__init__.py similarity index 100% rename from labelbox/data/annotation_types/ner/__init__.py rename to libs/labelbox/src/labelbox/data/annotation_types/ner/__init__.py diff --git a/labelbox/data/annotation_types/ner/conversation_entity.py b/libs/labelbox/src/labelbox/data/annotation_types/ner/conversation_entity.py similarity index 100% rename from labelbox/data/annotation_types/ner/conversation_entity.py rename to libs/labelbox/src/labelbox/data/annotation_types/ner/conversation_entity.py diff --git a/labelbox/data/annotation_types/ner/document_entity.py b/libs/labelbox/src/labelbox/data/annotation_types/ner/document_entity.py similarity index 100% rename from labelbox/data/annotation_types/ner/document_entity.py rename to libs/labelbox/src/labelbox/data/annotation_types/ner/document_entity.py diff --git a/labelbox/data/annotation_types/ner/text_entity.py b/libs/labelbox/src/labelbox/data/annotation_types/ner/text_entity.py similarity index 100% rename from labelbox/data/annotation_types/ner/text_entity.py rename to libs/labelbox/src/labelbox/data/annotation_types/ner/text_entity.py diff --git a/labelbox/data/annotation_types/relationship.py b/libs/labelbox/src/labelbox/data/annotation_types/relationship.py similarity index 100% rename from labelbox/data/annotation_types/relationship.py rename to libs/labelbox/src/labelbox/data/annotation_types/relationship.py diff --git a/labelbox/data/annotation_types/types.py b/libs/labelbox/src/labelbox/data/annotation_types/types.py similarity index 100% rename from labelbox/data/annotation_types/types.py rename to libs/labelbox/src/labelbox/data/annotation_types/types.py diff --git a/labelbox/data/annotation_types/video.py b/libs/labelbox/src/labelbox/data/annotation_types/video.py similarity index 100% rename from labelbox/data/annotation_types/video.py rename to libs/labelbox/src/labelbox/data/annotation_types/video.py diff --git a/labelbox/data/generator.py b/libs/labelbox/src/labelbox/data/generator.py similarity index 100% rename from labelbox/data/generator.py rename to libs/labelbox/src/labelbox/data/generator.py diff --git a/labelbox/data/metrics/__init__.py b/libs/labelbox/src/labelbox/data/metrics/__init__.py similarity index 100% rename from labelbox/data/metrics/__init__.py rename to libs/labelbox/src/labelbox/data/metrics/__init__.py diff --git a/labelbox/data/metrics/confusion_matrix/__init__.py b/libs/labelbox/src/labelbox/data/metrics/confusion_matrix/__init__.py similarity index 100% rename from labelbox/data/metrics/confusion_matrix/__init__.py rename to libs/labelbox/src/labelbox/data/metrics/confusion_matrix/__init__.py diff --git a/labelbox/data/metrics/confusion_matrix/calculation.py b/libs/labelbox/src/labelbox/data/metrics/confusion_matrix/calculation.py similarity index 100% rename from labelbox/data/metrics/confusion_matrix/calculation.py rename to libs/labelbox/src/labelbox/data/metrics/confusion_matrix/calculation.py diff --git a/labelbox/data/metrics/confusion_matrix/confusion_matrix.py b/libs/labelbox/src/labelbox/data/metrics/confusion_matrix/confusion_matrix.py similarity index 100% rename from labelbox/data/metrics/confusion_matrix/confusion_matrix.py rename to libs/labelbox/src/labelbox/data/metrics/confusion_matrix/confusion_matrix.py diff --git a/labelbox/data/metrics/group.py b/libs/labelbox/src/labelbox/data/metrics/group.py similarity index 100% rename from labelbox/data/metrics/group.py rename to libs/labelbox/src/labelbox/data/metrics/group.py diff --git a/labelbox/data/metrics/iou/__init__.py b/libs/labelbox/src/labelbox/data/metrics/iou/__init__.py similarity index 100% rename from labelbox/data/metrics/iou/__init__.py rename to libs/labelbox/src/labelbox/data/metrics/iou/__init__.py diff --git a/labelbox/data/metrics/iou/calculation.py b/libs/labelbox/src/labelbox/data/metrics/iou/calculation.py similarity index 100% rename from labelbox/data/metrics/iou/calculation.py rename to libs/labelbox/src/labelbox/data/metrics/iou/calculation.py diff --git a/labelbox/data/metrics/iou/iou.py b/libs/labelbox/src/labelbox/data/metrics/iou/iou.py similarity index 100% rename from labelbox/data/metrics/iou/iou.py rename to libs/labelbox/src/labelbox/data/metrics/iou/iou.py diff --git a/labelbox/data/mixins.py b/libs/labelbox/src/labelbox/data/mixins.py similarity index 100% rename from labelbox/data/mixins.py rename to libs/labelbox/src/labelbox/data/mixins.py diff --git a/labelbox/data/ontology.py b/libs/labelbox/src/labelbox/data/ontology.py similarity index 100% rename from labelbox/data/ontology.py rename to libs/labelbox/src/labelbox/data/ontology.py diff --git a/labelbox/data/serialization/__init__.py b/libs/labelbox/src/labelbox/data/serialization/__init__.py similarity index 100% rename from labelbox/data/serialization/__init__.py rename to libs/labelbox/src/labelbox/data/serialization/__init__.py diff --git a/labelbox/data/serialization/coco/__init__.py b/libs/labelbox/src/labelbox/data/serialization/coco/__init__.py similarity index 100% rename from labelbox/data/serialization/coco/__init__.py rename to libs/labelbox/src/labelbox/data/serialization/coco/__init__.py diff --git a/labelbox/data/serialization/coco/annotation.py b/libs/labelbox/src/labelbox/data/serialization/coco/annotation.py similarity index 100% rename from labelbox/data/serialization/coco/annotation.py rename to libs/labelbox/src/labelbox/data/serialization/coco/annotation.py diff --git a/labelbox/data/serialization/coco/categories.py b/libs/labelbox/src/labelbox/data/serialization/coco/categories.py similarity index 100% rename from labelbox/data/serialization/coco/categories.py rename to libs/labelbox/src/labelbox/data/serialization/coco/categories.py diff --git a/labelbox/data/serialization/coco/converter.py b/libs/labelbox/src/labelbox/data/serialization/coco/converter.py similarity index 100% rename from labelbox/data/serialization/coco/converter.py rename to libs/labelbox/src/labelbox/data/serialization/coco/converter.py diff --git a/labelbox/data/serialization/coco/image.py b/libs/labelbox/src/labelbox/data/serialization/coco/image.py similarity index 100% rename from labelbox/data/serialization/coco/image.py rename to libs/labelbox/src/labelbox/data/serialization/coco/image.py diff --git a/labelbox/data/serialization/coco/instance_dataset.py b/libs/labelbox/src/labelbox/data/serialization/coco/instance_dataset.py similarity index 100% rename from labelbox/data/serialization/coco/instance_dataset.py rename to libs/labelbox/src/labelbox/data/serialization/coco/instance_dataset.py diff --git a/labelbox/data/serialization/coco/panoptic_dataset.py b/libs/labelbox/src/labelbox/data/serialization/coco/panoptic_dataset.py similarity index 100% rename from labelbox/data/serialization/coco/panoptic_dataset.py rename to libs/labelbox/src/labelbox/data/serialization/coco/panoptic_dataset.py diff --git a/labelbox/data/serialization/coco/path.py b/libs/labelbox/src/labelbox/data/serialization/coco/path.py similarity index 100% rename from labelbox/data/serialization/coco/path.py rename to libs/labelbox/src/labelbox/data/serialization/coco/path.py diff --git a/labelbox/data/serialization/labelbox_v1/__init__.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/__init__.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/__init__.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/__init__.py diff --git a/labelbox/data/serialization/labelbox_v1/classification.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/classification.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/classification.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/classification.py diff --git a/labelbox/data/serialization/labelbox_v1/converter.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/converter.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/converter.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/converter.py diff --git a/labelbox/data/serialization/labelbox_v1/feature.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/feature.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/feature.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/feature.py diff --git a/labelbox/data/serialization/labelbox_v1/label.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/label.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/label.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/label.py diff --git a/labelbox/data/serialization/labelbox_v1/objects.py b/libs/labelbox/src/labelbox/data/serialization/labelbox_v1/objects.py similarity index 100% rename from labelbox/data/serialization/labelbox_v1/objects.py rename to libs/labelbox/src/labelbox/data/serialization/labelbox_v1/objects.py diff --git a/labelbox/data/serialization/ndjson/__init__.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/__init__.py similarity index 100% rename from labelbox/data/serialization/ndjson/__init__.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/__init__.py diff --git a/labelbox/data/serialization/ndjson/base.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/base.py similarity index 100% rename from labelbox/data/serialization/ndjson/base.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/base.py diff --git a/labelbox/data/serialization/ndjson/classification.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/classification.py similarity index 100% rename from labelbox/data/serialization/ndjson/classification.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/classification.py diff --git a/labelbox/data/serialization/ndjson/converter.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/converter.py similarity index 100% rename from labelbox/data/serialization/ndjson/converter.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/converter.py diff --git a/labelbox/data/serialization/ndjson/label.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/label.py similarity index 100% rename from labelbox/data/serialization/ndjson/label.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/label.py diff --git a/labelbox/data/serialization/ndjson/metric.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/metric.py similarity index 100% rename from labelbox/data/serialization/ndjson/metric.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/metric.py diff --git a/labelbox/data/serialization/ndjson/objects.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/objects.py similarity index 100% rename from labelbox/data/serialization/ndjson/objects.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/objects.py diff --git a/labelbox/data/serialization/ndjson/relationship.py b/libs/labelbox/src/labelbox/data/serialization/ndjson/relationship.py similarity index 100% rename from labelbox/data/serialization/ndjson/relationship.py rename to libs/labelbox/src/labelbox/data/serialization/ndjson/relationship.py diff --git a/labelbox/exceptions.py b/libs/labelbox/src/labelbox/exceptions.py similarity index 100% rename from labelbox/exceptions.py rename to libs/labelbox/src/labelbox/exceptions.py diff --git a/labelbox/orm/__init__.py b/libs/labelbox/src/labelbox/orm/__init__.py similarity index 100% rename from labelbox/orm/__init__.py rename to libs/labelbox/src/labelbox/orm/__init__.py diff --git a/labelbox/orm/comparison.py b/libs/labelbox/src/labelbox/orm/comparison.py similarity index 100% rename from labelbox/orm/comparison.py rename to libs/labelbox/src/labelbox/orm/comparison.py diff --git a/labelbox/orm/db_object.py b/libs/labelbox/src/labelbox/orm/db_object.py similarity index 100% rename from labelbox/orm/db_object.py rename to libs/labelbox/src/labelbox/orm/db_object.py diff --git a/labelbox/orm/model.py b/libs/labelbox/src/labelbox/orm/model.py similarity index 100% rename from labelbox/orm/model.py rename to libs/labelbox/src/labelbox/orm/model.py diff --git a/labelbox/orm/query.py b/libs/labelbox/src/labelbox/orm/query.py similarity index 100% rename from labelbox/orm/query.py rename to libs/labelbox/src/labelbox/orm/query.py diff --git a/labelbox/pagination.py b/libs/labelbox/src/labelbox/pagination.py similarity index 100% rename from labelbox/pagination.py rename to libs/labelbox/src/labelbox/pagination.py diff --git a/labelbox/parser.py b/libs/labelbox/src/labelbox/parser.py similarity index 100% rename from labelbox/parser.py rename to libs/labelbox/src/labelbox/parser.py diff --git a/labelbox/pydantic_compat.py b/libs/labelbox/src/labelbox/pydantic_compat.py similarity index 100% rename from labelbox/pydantic_compat.py rename to libs/labelbox/src/labelbox/pydantic_compat.py diff --git a/labelbox/schema/__init__.py b/libs/labelbox/src/labelbox/schema/__init__.py similarity index 100% rename from labelbox/schema/__init__.py rename to libs/labelbox/src/labelbox/schema/__init__.py diff --git a/labelbox/schema/annotation_import.py b/libs/labelbox/src/labelbox/schema/annotation_import.py similarity index 100% rename from labelbox/schema/annotation_import.py rename to libs/labelbox/src/labelbox/schema/annotation_import.py diff --git a/labelbox/schema/asset_attachment.py b/libs/labelbox/src/labelbox/schema/asset_attachment.py similarity index 100% rename from labelbox/schema/asset_attachment.py rename to libs/labelbox/src/labelbox/schema/asset_attachment.py diff --git a/labelbox/schema/batch.py b/libs/labelbox/src/labelbox/schema/batch.py similarity index 100% rename from labelbox/schema/batch.py rename to libs/labelbox/src/labelbox/schema/batch.py diff --git a/labelbox/schema/benchmark.py b/libs/labelbox/src/labelbox/schema/benchmark.py similarity index 100% rename from labelbox/schema/benchmark.py rename to libs/labelbox/src/labelbox/schema/benchmark.py diff --git a/labelbox/schema/bulk_import_request.py b/libs/labelbox/src/labelbox/schema/bulk_import_request.py similarity index 100% rename from labelbox/schema/bulk_import_request.py rename to libs/labelbox/src/labelbox/schema/bulk_import_request.py diff --git a/labelbox/schema/catalog.py b/libs/labelbox/src/labelbox/schema/catalog.py similarity index 100% rename from labelbox/schema/catalog.py rename to libs/labelbox/src/labelbox/schema/catalog.py diff --git a/labelbox/schema/confidence_presence_checker.py b/libs/labelbox/src/labelbox/schema/confidence_presence_checker.py similarity index 100% rename from labelbox/schema/confidence_presence_checker.py rename to libs/labelbox/src/labelbox/schema/confidence_presence_checker.py diff --git a/labelbox/schema/conflict_resolution_strategy.py b/libs/labelbox/src/labelbox/schema/conflict_resolution_strategy.py similarity index 100% rename from labelbox/schema/conflict_resolution_strategy.py rename to libs/labelbox/src/labelbox/schema/conflict_resolution_strategy.py diff --git a/labelbox/schema/consensus_settings.py b/libs/labelbox/src/labelbox/schema/consensus_settings.py similarity index 100% rename from labelbox/schema/consensus_settings.py rename to libs/labelbox/src/labelbox/schema/consensus_settings.py diff --git a/labelbox/schema/create_batches_task.py b/libs/labelbox/src/labelbox/schema/create_batches_task.py similarity index 100% rename from labelbox/schema/create_batches_task.py rename to libs/labelbox/src/labelbox/schema/create_batches_task.py diff --git a/labelbox/schema/data_row.py b/libs/labelbox/src/labelbox/schema/data_row.py similarity index 100% rename from labelbox/schema/data_row.py rename to libs/labelbox/src/labelbox/schema/data_row.py diff --git a/labelbox/schema/data_row_metadata.py b/libs/labelbox/src/labelbox/schema/data_row_metadata.py similarity index 100% rename from labelbox/schema/data_row_metadata.py rename to libs/labelbox/src/labelbox/schema/data_row_metadata.py diff --git a/labelbox/schema/dataset.py b/libs/labelbox/src/labelbox/schema/dataset.py similarity index 100% rename from labelbox/schema/dataset.py rename to libs/labelbox/src/labelbox/schema/dataset.py diff --git a/labelbox/schema/embeddings.py b/libs/labelbox/src/labelbox/schema/embeddings.py similarity index 100% rename from labelbox/schema/embeddings.py rename to libs/labelbox/src/labelbox/schema/embeddings.py diff --git a/labelbox/schema/enums.py b/libs/labelbox/src/labelbox/schema/enums.py similarity index 100% rename from labelbox/schema/enums.py rename to libs/labelbox/src/labelbox/schema/enums.py diff --git a/labelbox/schema/export_filters.py b/libs/labelbox/src/labelbox/schema/export_filters.py similarity index 100% rename from labelbox/schema/export_filters.py rename to libs/labelbox/src/labelbox/schema/export_filters.py diff --git a/labelbox/schema/export_params.py b/libs/labelbox/src/labelbox/schema/export_params.py similarity index 100% rename from labelbox/schema/export_params.py rename to libs/labelbox/src/labelbox/schema/export_params.py diff --git a/labelbox/schema/export_task.py b/libs/labelbox/src/labelbox/schema/export_task.py similarity index 100% rename from labelbox/schema/export_task.py rename to libs/labelbox/src/labelbox/schema/export_task.py diff --git a/labelbox/schema/foundry/__init__.py b/libs/labelbox/src/labelbox/schema/foundry/__init__.py similarity index 100% rename from labelbox/schema/foundry/__init__.py rename to libs/labelbox/src/labelbox/schema/foundry/__init__.py diff --git a/labelbox/schema/foundry/app.py b/libs/labelbox/src/labelbox/schema/foundry/app.py similarity index 100% rename from labelbox/schema/foundry/app.py rename to libs/labelbox/src/labelbox/schema/foundry/app.py diff --git a/labelbox/schema/foundry/foundry_client.py b/libs/labelbox/src/labelbox/schema/foundry/foundry_client.py similarity index 100% rename from labelbox/schema/foundry/foundry_client.py rename to libs/labelbox/src/labelbox/schema/foundry/foundry_client.py diff --git a/labelbox/schema/foundry/model.py b/libs/labelbox/src/labelbox/schema/foundry/model.py similarity index 100% rename from labelbox/schema/foundry/model.py rename to libs/labelbox/src/labelbox/schema/foundry/model.py diff --git a/labelbox/schema/iam_integration.py b/libs/labelbox/src/labelbox/schema/iam_integration.py similarity index 100% rename from labelbox/schema/iam_integration.py rename to libs/labelbox/src/labelbox/schema/iam_integration.py diff --git a/labelbox/schema/id_type.py b/libs/labelbox/src/labelbox/schema/id_type.py similarity index 100% rename from labelbox/schema/id_type.py rename to libs/labelbox/src/labelbox/schema/id_type.py diff --git a/labelbox/schema/identifiable.py b/libs/labelbox/src/labelbox/schema/identifiable.py similarity index 100% rename from labelbox/schema/identifiable.py rename to libs/labelbox/src/labelbox/schema/identifiable.py diff --git a/labelbox/schema/identifiables.py b/libs/labelbox/src/labelbox/schema/identifiables.py similarity index 100% rename from labelbox/schema/identifiables.py rename to libs/labelbox/src/labelbox/schema/identifiables.py diff --git a/labelbox/schema/invite.py b/libs/labelbox/src/labelbox/schema/invite.py similarity index 100% rename from labelbox/schema/invite.py rename to libs/labelbox/src/labelbox/schema/invite.py diff --git a/labelbox/schema/label.py b/libs/labelbox/src/labelbox/schema/label.py similarity index 100% rename from labelbox/schema/label.py rename to libs/labelbox/src/labelbox/schema/label.py diff --git a/labelbox/schema/labeling_frontend.py b/libs/labelbox/src/labelbox/schema/labeling_frontend.py similarity index 100% rename from labelbox/schema/labeling_frontend.py rename to libs/labelbox/src/labelbox/schema/labeling_frontend.py diff --git a/labelbox/schema/media_type.py b/libs/labelbox/src/labelbox/schema/media_type.py similarity index 100% rename from labelbox/schema/media_type.py rename to libs/labelbox/src/labelbox/schema/media_type.py diff --git a/labelbox/schema/model.py b/libs/labelbox/src/labelbox/schema/model.py similarity index 100% rename from labelbox/schema/model.py rename to libs/labelbox/src/labelbox/schema/model.py diff --git a/labelbox/schema/model_run.py b/libs/labelbox/src/labelbox/schema/model_run.py similarity index 100% rename from labelbox/schema/model_run.py rename to libs/labelbox/src/labelbox/schema/model_run.py diff --git a/labelbox/schema/ontology.py b/libs/labelbox/src/labelbox/schema/ontology.py similarity index 100% rename from labelbox/schema/ontology.py rename to libs/labelbox/src/labelbox/schema/ontology.py diff --git a/labelbox/schema/organization.py b/libs/labelbox/src/labelbox/schema/organization.py similarity index 100% rename from labelbox/schema/organization.py rename to libs/labelbox/src/labelbox/schema/organization.py diff --git a/labelbox/schema/project.py b/libs/labelbox/src/labelbox/schema/project.py similarity index 100% rename from labelbox/schema/project.py rename to libs/labelbox/src/labelbox/schema/project.py diff --git a/labelbox/schema/project_resource_tag.py b/libs/labelbox/src/labelbox/schema/project_resource_tag.py similarity index 100% rename from labelbox/schema/project_resource_tag.py rename to libs/labelbox/src/labelbox/schema/project_resource_tag.py diff --git a/labelbox/schema/quality_mode.py b/libs/labelbox/src/labelbox/schema/quality_mode.py similarity index 100% rename from labelbox/schema/quality_mode.py rename to libs/labelbox/src/labelbox/schema/quality_mode.py diff --git a/labelbox/schema/queue_mode.py b/libs/labelbox/src/labelbox/schema/queue_mode.py similarity index 100% rename from labelbox/schema/queue_mode.py rename to libs/labelbox/src/labelbox/schema/queue_mode.py diff --git a/labelbox/schema/resource_tag.py b/libs/labelbox/src/labelbox/schema/resource_tag.py similarity index 100% rename from labelbox/schema/resource_tag.py rename to libs/labelbox/src/labelbox/schema/resource_tag.py diff --git a/labelbox/schema/review.py b/libs/labelbox/src/labelbox/schema/review.py similarity index 100% rename from labelbox/schema/review.py rename to libs/labelbox/src/labelbox/schema/review.py diff --git a/labelbox/schema/role.py b/libs/labelbox/src/labelbox/schema/role.py similarity index 100% rename from labelbox/schema/role.py rename to libs/labelbox/src/labelbox/schema/role.py diff --git a/labelbox/schema/send_to_annotate_params.py b/libs/labelbox/src/labelbox/schema/send_to_annotate_params.py similarity index 100% rename from labelbox/schema/send_to_annotate_params.py rename to libs/labelbox/src/labelbox/schema/send_to_annotate_params.py diff --git a/labelbox/schema/serialization.py b/libs/labelbox/src/labelbox/schema/serialization.py similarity index 100% rename from labelbox/schema/serialization.py rename to libs/labelbox/src/labelbox/schema/serialization.py diff --git a/labelbox/schema/slice.py b/libs/labelbox/src/labelbox/schema/slice.py similarity index 100% rename from labelbox/schema/slice.py rename to libs/labelbox/src/labelbox/schema/slice.py diff --git a/labelbox/schema/task.py b/libs/labelbox/src/labelbox/schema/task.py similarity index 100% rename from labelbox/schema/task.py rename to libs/labelbox/src/labelbox/schema/task.py diff --git a/labelbox/schema/task_queue.py b/libs/labelbox/src/labelbox/schema/task_queue.py similarity index 100% rename from labelbox/schema/task_queue.py rename to libs/labelbox/src/labelbox/schema/task_queue.py diff --git a/labelbox/schema/user.py b/libs/labelbox/src/labelbox/schema/user.py similarity index 100% rename from labelbox/schema/user.py rename to libs/labelbox/src/labelbox/schema/user.py diff --git a/labelbox/schema/webhook.py b/libs/labelbox/src/labelbox/schema/webhook.py similarity index 100% rename from labelbox/schema/webhook.py rename to libs/labelbox/src/labelbox/schema/webhook.py diff --git a/labelbox/types.py b/libs/labelbox/src/labelbox/types.py similarity index 100% rename from labelbox/types.py rename to libs/labelbox/src/labelbox/types.py diff --git a/labelbox/typing_imports.py b/libs/labelbox/src/labelbox/typing_imports.py similarity index 100% rename from labelbox/typing_imports.py rename to libs/labelbox/src/labelbox/typing_imports.py diff --git a/labelbox/utils.py b/libs/labelbox/src/labelbox/utils.py similarity index 100% rename from labelbox/utils.py rename to libs/labelbox/src/labelbox/utils.py diff --git a/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json b/libs/labelbox/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json similarity index 100% rename from tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json rename to libs/labelbox/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483-lb-textlayer.json diff --git a/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf b/libs/labelbox/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf similarity index 100% rename from tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf rename to libs/labelbox/tests/assets/arxiv-pdf_data_99-word-token-pdfs_0801.3483.pdf diff --git a/tests/assets/conversation-1.json b/libs/labelbox/tests/assets/conversation-1.json similarity index 100% rename from tests/assets/conversation-1.json rename to libs/labelbox/tests/assets/conversation-1.json diff --git a/tests/assets/loremipsum.pdf b/libs/labelbox/tests/assets/loremipsum.pdf similarity index 100% rename from tests/assets/loremipsum.pdf rename to libs/labelbox/tests/assets/loremipsum.pdf diff --git a/tests/conftest.py b/libs/labelbox/tests/conftest.py similarity index 99% rename from tests/conftest.py rename to libs/labelbox/tests/conftest.py index fb2a83cdf..63b0052cd 100644 --- a/tests/conftest.py +++ b/libs/labelbox/tests/conftest.py @@ -1042,4 +1042,4 @@ def configured_project_with_complex_ontology(client, initial_dataset, rand_gen, project.setup(editor, ontology.asdict()) yield [project, data_row] - project.delete() + project.delete() \ No newline at end of file diff --git a/tests/data/annotation_import/conftest.py b/libs/labelbox/tests/data/annotation_import/conftest.py similarity index 100% rename from tests/data/annotation_import/conftest.py rename to libs/labelbox/tests/data/annotation_import/conftest.py diff --git a/tests/data/annotation_import/test_bulk_import_request.py b/libs/labelbox/tests/data/annotation_import/test_bulk_import_request.py similarity index 100% rename from tests/data/annotation_import/test_bulk_import_request.py rename to libs/labelbox/tests/data/annotation_import/test_bulk_import_request.py diff --git a/tests/data/annotation_import/test_conversation_import.py b/libs/labelbox/tests/data/annotation_import/test_conversation_import.py similarity index 100% rename from tests/data/annotation_import/test_conversation_import.py rename to libs/labelbox/tests/data/annotation_import/test_conversation_import.py diff --git a/tests/data/annotation_import/test_data_types.py b/libs/labelbox/tests/data/annotation_import/test_data_types.py similarity index 100% rename from tests/data/annotation_import/test_data_types.py rename to libs/labelbox/tests/data/annotation_import/test_data_types.py diff --git a/tests/data/annotation_import/test_generic_data_types.py b/libs/labelbox/tests/data/annotation_import/test_generic_data_types.py similarity index 100% rename from tests/data/annotation_import/test_generic_data_types.py rename to libs/labelbox/tests/data/annotation_import/test_generic_data_types.py diff --git a/tests/data/annotation_import/test_label_import.py b/libs/labelbox/tests/data/annotation_import/test_label_import.py similarity index 100% rename from tests/data/annotation_import/test_label_import.py rename to libs/labelbox/tests/data/annotation_import/test_label_import.py diff --git a/tests/data/annotation_import/test_mal_prediction_import.py b/libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py similarity index 100% rename from tests/data/annotation_import/test_mal_prediction_import.py rename to libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py diff --git a/tests/data/annotation_import/test_mea_prediction_import.py b/libs/labelbox/tests/data/annotation_import/test_mea_prediction_import.py similarity index 100% rename from tests/data/annotation_import/test_mea_prediction_import.py rename to libs/labelbox/tests/data/annotation_import/test_mea_prediction_import.py diff --git a/tests/data/annotation_import/test_model.py b/libs/labelbox/tests/data/annotation_import/test_model.py similarity index 100% rename from tests/data/annotation_import/test_model.py rename to libs/labelbox/tests/data/annotation_import/test_model.py diff --git a/tests/data/annotation_import/test_model_run.py b/libs/labelbox/tests/data/annotation_import/test_model_run.py similarity index 100% rename from tests/data/annotation_import/test_model_run.py rename to libs/labelbox/tests/data/annotation_import/test_model_run.py diff --git a/tests/data/annotation_import/test_ndjson_validation.py b/libs/labelbox/tests/data/annotation_import/test_ndjson_validation.py similarity index 100% rename from tests/data/annotation_import/test_ndjson_validation.py rename to libs/labelbox/tests/data/annotation_import/test_ndjson_validation.py diff --git a/tests/data/annotation_import/test_send_to_annotate_mea.py b/libs/labelbox/tests/data/annotation_import/test_send_to_annotate_mea.py similarity index 100% rename from tests/data/annotation_import/test_send_to_annotate_mea.py rename to libs/labelbox/tests/data/annotation_import/test_send_to_annotate_mea.py diff --git a/tests/data/annotation_import/test_upsert_prediction_import.py b/libs/labelbox/tests/data/annotation_import/test_upsert_prediction_import.py similarity index 100% rename from tests/data/annotation_import/test_upsert_prediction_import.py rename to libs/labelbox/tests/data/annotation_import/test_upsert_prediction_import.py diff --git a/tests/data/annotation_types/__init__.py b/libs/labelbox/tests/data/annotation_types/__init__.py similarity index 100% rename from tests/data/annotation_types/__init__.py rename to libs/labelbox/tests/data/annotation_types/__init__.py diff --git a/tests/data/annotation_types/classification/__init__.py b/libs/labelbox/tests/data/annotation_types/classification/__init__.py similarity index 100% rename from tests/data/annotation_types/classification/__init__.py rename to libs/labelbox/tests/data/annotation_types/classification/__init__.py diff --git a/tests/data/annotation_types/classification/test_classification.py b/libs/labelbox/tests/data/annotation_types/classification/test_classification.py similarity index 100% rename from tests/data/annotation_types/classification/test_classification.py rename to libs/labelbox/tests/data/annotation_types/classification/test_classification.py diff --git a/tests/data/annotation_types/data/__init__.py b/libs/labelbox/tests/data/annotation_types/data/__init__.py similarity index 100% rename from tests/data/annotation_types/data/__init__.py rename to libs/labelbox/tests/data/annotation_types/data/__init__.py diff --git a/tests/data/annotation_types/data/test_raster.py b/libs/labelbox/tests/data/annotation_types/data/test_raster.py similarity index 100% rename from tests/data/annotation_types/data/test_raster.py rename to libs/labelbox/tests/data/annotation_types/data/test_raster.py diff --git a/tests/data/annotation_types/data/test_text.py b/libs/labelbox/tests/data/annotation_types/data/test_text.py similarity index 100% rename from tests/data/annotation_types/data/test_text.py rename to libs/labelbox/tests/data/annotation_types/data/test_text.py diff --git a/tests/data/annotation_types/data/test_video.py b/libs/labelbox/tests/data/annotation_types/data/test_video.py similarity index 100% rename from tests/data/annotation_types/data/test_video.py rename to libs/labelbox/tests/data/annotation_types/data/test_video.py diff --git a/tests/data/annotation_types/geometry/__init__.py b/libs/labelbox/tests/data/annotation_types/geometry/__init__.py similarity index 100% rename from tests/data/annotation_types/geometry/__init__.py rename to libs/labelbox/tests/data/annotation_types/geometry/__init__.py diff --git a/tests/data/annotation_types/geometry/test_line.py b/libs/labelbox/tests/data/annotation_types/geometry/test_line.py similarity index 100% rename from tests/data/annotation_types/geometry/test_line.py rename to libs/labelbox/tests/data/annotation_types/geometry/test_line.py diff --git a/tests/data/annotation_types/geometry/test_mask.py b/libs/labelbox/tests/data/annotation_types/geometry/test_mask.py similarity index 100% rename from tests/data/annotation_types/geometry/test_mask.py rename to libs/labelbox/tests/data/annotation_types/geometry/test_mask.py diff --git a/tests/data/annotation_types/geometry/test_point.py b/libs/labelbox/tests/data/annotation_types/geometry/test_point.py similarity index 100% rename from tests/data/annotation_types/geometry/test_point.py rename to libs/labelbox/tests/data/annotation_types/geometry/test_point.py diff --git a/tests/data/annotation_types/geometry/test_polygon.py b/libs/labelbox/tests/data/annotation_types/geometry/test_polygon.py similarity index 100% rename from tests/data/annotation_types/geometry/test_polygon.py rename to libs/labelbox/tests/data/annotation_types/geometry/test_polygon.py diff --git a/tests/data/annotation_types/geometry/test_rectangle.py b/libs/labelbox/tests/data/annotation_types/geometry/test_rectangle.py similarity index 100% rename from tests/data/annotation_types/geometry/test_rectangle.py rename to libs/labelbox/tests/data/annotation_types/geometry/test_rectangle.py diff --git a/tests/data/annotation_types/test_annotation.py b/libs/labelbox/tests/data/annotation_types/test_annotation.py similarity index 100% rename from tests/data/annotation_types/test_annotation.py rename to libs/labelbox/tests/data/annotation_types/test_annotation.py diff --git a/tests/data/annotation_types/test_collection.py b/libs/labelbox/tests/data/annotation_types/test_collection.py similarity index 100% rename from tests/data/annotation_types/test_collection.py rename to libs/labelbox/tests/data/annotation_types/test_collection.py diff --git a/tests/data/annotation_types/test_label.py b/libs/labelbox/tests/data/annotation_types/test_label.py similarity index 100% rename from tests/data/annotation_types/test_label.py rename to libs/labelbox/tests/data/annotation_types/test_label.py diff --git a/tests/data/annotation_types/test_metrics.py b/libs/labelbox/tests/data/annotation_types/test_metrics.py similarity index 100% rename from tests/data/annotation_types/test_metrics.py rename to libs/labelbox/tests/data/annotation_types/test_metrics.py diff --git a/tests/data/annotation_types/test_ner.py b/libs/labelbox/tests/data/annotation_types/test_ner.py similarity index 100% rename from tests/data/annotation_types/test_ner.py rename to libs/labelbox/tests/data/annotation_types/test_ner.py diff --git a/tests/data/annotation_types/test_text.py b/libs/labelbox/tests/data/annotation_types/test_text.py similarity index 100% rename from tests/data/annotation_types/test_text.py rename to libs/labelbox/tests/data/annotation_types/test_text.py diff --git a/tests/data/annotation_types/test_tiled_image.py b/libs/labelbox/tests/data/annotation_types/test_tiled_image.py similarity index 100% rename from tests/data/annotation_types/test_tiled_image.py rename to libs/labelbox/tests/data/annotation_types/test_tiled_image.py diff --git a/tests/data/annotation_types/test_video.py b/libs/labelbox/tests/data/annotation_types/test_video.py similarity index 100% rename from tests/data/annotation_types/test_video.py rename to libs/labelbox/tests/data/annotation_types/test_video.py diff --git a/tests/data/assets/coco/images/000000129054.jpg b/libs/labelbox/tests/data/assets/coco/images/000000129054.jpg similarity index 100% rename from tests/data/assets/coco/images/000000129054.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000129054.jpg diff --git a/tests/data/assets/coco/images/000000141328.jpg b/libs/labelbox/tests/data/assets/coco/images/000000141328.jpg similarity index 100% rename from tests/data/assets/coco/images/000000141328.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000141328.jpg diff --git a/tests/data/assets/coco/images/000000147498.jpg b/libs/labelbox/tests/data/assets/coco/images/000000147498.jpg similarity index 100% rename from tests/data/assets/coco/images/000000147498.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000147498.jpg diff --git a/tests/data/assets/coco/images/000000184324.jpg b/libs/labelbox/tests/data/assets/coco/images/000000184324.jpg similarity index 100% rename from tests/data/assets/coco/images/000000184324.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000184324.jpg diff --git a/tests/data/assets/coco/images/000000188465.jpg b/libs/labelbox/tests/data/assets/coco/images/000000188465.jpg similarity index 100% rename from tests/data/assets/coco/images/000000188465.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000188465.jpg diff --git a/tests/data/assets/coco/images/000000245764.jpg b/libs/labelbox/tests/data/assets/coco/images/000000245764.jpg similarity index 100% rename from tests/data/assets/coco/images/000000245764.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000245764.jpg diff --git a/tests/data/assets/coco/images/000000311303.jpg b/libs/labelbox/tests/data/assets/coco/images/000000311303.jpg similarity index 100% rename from tests/data/assets/coco/images/000000311303.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000311303.jpg diff --git a/tests/data/assets/coco/images/000000343706.jpg b/libs/labelbox/tests/data/assets/coco/images/000000343706.jpg similarity index 100% rename from tests/data/assets/coco/images/000000343706.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000343706.jpg diff --git a/tests/data/assets/coco/images/000000356387.jpg b/libs/labelbox/tests/data/assets/coco/images/000000356387.jpg similarity index 100% rename from tests/data/assets/coco/images/000000356387.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000356387.jpg diff --git a/tests/data/assets/coco/images/000000370711.jpg b/libs/labelbox/tests/data/assets/coco/images/000000370711.jpg similarity index 100% rename from tests/data/assets/coco/images/000000370711.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000370711.jpg diff --git a/tests/data/assets/coco/images/000000385029.jpg b/libs/labelbox/tests/data/assets/coco/images/000000385029.jpg similarity index 100% rename from tests/data/assets/coco/images/000000385029.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000385029.jpg diff --git a/tests/data/assets/coco/images/000000393226.jpg b/libs/labelbox/tests/data/assets/coco/images/000000393226.jpg similarity index 100% rename from tests/data/assets/coco/images/000000393226.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000393226.jpg diff --git a/tests/data/assets/coco/images/000000434230.jpg b/libs/labelbox/tests/data/assets/coco/images/000000434230.jpg similarity index 100% rename from tests/data/assets/coco/images/000000434230.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000434230.jpg diff --git a/tests/data/assets/coco/images/000000458755.jpg b/libs/labelbox/tests/data/assets/coco/images/000000458755.jpg similarity index 100% rename from tests/data/assets/coco/images/000000458755.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000458755.jpg diff --git a/tests/data/assets/coco/images/000000458768.jpg b/libs/labelbox/tests/data/assets/coco/images/000000458768.jpg similarity index 100% rename from tests/data/assets/coco/images/000000458768.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000458768.jpg diff --git a/tests/data/assets/coco/images/000000462904.jpg b/libs/labelbox/tests/data/assets/coco/images/000000462904.jpg similarity index 100% rename from tests/data/assets/coco/images/000000462904.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000462904.jpg diff --git a/tests/data/assets/coco/images/000000475150.jpg b/libs/labelbox/tests/data/assets/coco/images/000000475150.jpg similarity index 100% rename from tests/data/assets/coco/images/000000475150.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000475150.jpg diff --git a/tests/data/assets/coco/images/000000532481.jpg b/libs/labelbox/tests/data/assets/coco/images/000000532481.jpg similarity index 100% rename from tests/data/assets/coco/images/000000532481.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000532481.jpg diff --git a/tests/data/assets/coco/images/000000532493.jpg b/libs/labelbox/tests/data/assets/coco/images/000000532493.jpg similarity index 100% rename from tests/data/assets/coco/images/000000532493.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000532493.jpg diff --git a/tests/data/assets/coco/images/000000546823.jpg b/libs/labelbox/tests/data/assets/coco/images/000000546823.jpg similarity index 100% rename from tests/data/assets/coco/images/000000546823.jpg rename to libs/labelbox/tests/data/assets/coco/images/000000546823.jpg diff --git a/tests/data/assets/coco/instances.json b/libs/labelbox/tests/data/assets/coco/instances.json similarity index 100% rename from tests/data/assets/coco/instances.json rename to libs/labelbox/tests/data/assets/coco/instances.json diff --git a/tests/data/assets/coco/masks/000000129054.png b/libs/labelbox/tests/data/assets/coco/masks/000000129054.png similarity index 100% rename from tests/data/assets/coco/masks/000000129054.png rename to libs/labelbox/tests/data/assets/coco/masks/000000129054.png diff --git a/tests/data/assets/coco/masks/000000141328.png b/libs/labelbox/tests/data/assets/coco/masks/000000141328.png similarity index 100% rename from tests/data/assets/coco/masks/000000141328.png rename to libs/labelbox/tests/data/assets/coco/masks/000000141328.png diff --git a/tests/data/assets/coco/masks/000000147498.png b/libs/labelbox/tests/data/assets/coco/masks/000000147498.png similarity index 100% rename from tests/data/assets/coco/masks/000000147498.png rename to libs/labelbox/tests/data/assets/coco/masks/000000147498.png diff --git a/tests/data/assets/coco/masks/000000184324.png b/libs/labelbox/tests/data/assets/coco/masks/000000184324.png similarity index 100% rename from tests/data/assets/coco/masks/000000184324.png rename to libs/labelbox/tests/data/assets/coco/masks/000000184324.png diff --git a/tests/data/assets/coco/masks/000000188465.png b/libs/labelbox/tests/data/assets/coco/masks/000000188465.png similarity index 100% rename from tests/data/assets/coco/masks/000000188465.png rename to libs/labelbox/tests/data/assets/coco/masks/000000188465.png diff --git a/tests/data/assets/coco/masks/000000245764.png b/libs/labelbox/tests/data/assets/coco/masks/000000245764.png similarity index 100% rename from tests/data/assets/coco/masks/000000245764.png rename to libs/labelbox/tests/data/assets/coco/masks/000000245764.png diff --git a/tests/data/assets/coco/masks/000000311303.png b/libs/labelbox/tests/data/assets/coco/masks/000000311303.png similarity index 100% rename from tests/data/assets/coco/masks/000000311303.png rename to libs/labelbox/tests/data/assets/coco/masks/000000311303.png diff --git a/tests/data/assets/coco/masks/000000343706.png b/libs/labelbox/tests/data/assets/coco/masks/000000343706.png similarity index 100% rename from tests/data/assets/coco/masks/000000343706.png rename to libs/labelbox/tests/data/assets/coco/masks/000000343706.png diff --git a/tests/data/assets/coco/masks/000000356387.png b/libs/labelbox/tests/data/assets/coco/masks/000000356387.png similarity index 100% rename from tests/data/assets/coco/masks/000000356387.png rename to libs/labelbox/tests/data/assets/coco/masks/000000356387.png diff --git a/tests/data/assets/coco/masks/000000370711.png b/libs/labelbox/tests/data/assets/coco/masks/000000370711.png similarity index 100% rename from tests/data/assets/coco/masks/000000370711.png rename to libs/labelbox/tests/data/assets/coco/masks/000000370711.png diff --git a/tests/data/assets/coco/masks/000000385029.png b/libs/labelbox/tests/data/assets/coco/masks/000000385029.png similarity index 100% rename from tests/data/assets/coco/masks/000000385029.png rename to libs/labelbox/tests/data/assets/coco/masks/000000385029.png diff --git a/tests/data/assets/coco/masks/000000393226.png b/libs/labelbox/tests/data/assets/coco/masks/000000393226.png similarity index 100% rename from tests/data/assets/coco/masks/000000393226.png rename to libs/labelbox/tests/data/assets/coco/masks/000000393226.png diff --git a/tests/data/assets/coco/masks/000000434230.png b/libs/labelbox/tests/data/assets/coco/masks/000000434230.png similarity index 100% rename from tests/data/assets/coco/masks/000000434230.png rename to libs/labelbox/tests/data/assets/coco/masks/000000434230.png diff --git a/tests/data/assets/coco/masks/000000458755.png b/libs/labelbox/tests/data/assets/coco/masks/000000458755.png similarity index 100% rename from tests/data/assets/coco/masks/000000458755.png rename to libs/labelbox/tests/data/assets/coco/masks/000000458755.png diff --git a/tests/data/assets/coco/masks/000000458768.png b/libs/labelbox/tests/data/assets/coco/masks/000000458768.png similarity index 100% rename from tests/data/assets/coco/masks/000000458768.png rename to libs/labelbox/tests/data/assets/coco/masks/000000458768.png diff --git a/tests/data/assets/coco/masks/000000462904.png b/libs/labelbox/tests/data/assets/coco/masks/000000462904.png similarity index 100% rename from tests/data/assets/coco/masks/000000462904.png rename to libs/labelbox/tests/data/assets/coco/masks/000000462904.png diff --git a/tests/data/assets/coco/masks/000000475150.png b/libs/labelbox/tests/data/assets/coco/masks/000000475150.png similarity index 100% rename from tests/data/assets/coco/masks/000000475150.png rename to libs/labelbox/tests/data/assets/coco/masks/000000475150.png diff --git a/tests/data/assets/coco/masks/000000532481.png b/libs/labelbox/tests/data/assets/coco/masks/000000532481.png similarity index 100% rename from tests/data/assets/coco/masks/000000532481.png rename to libs/labelbox/tests/data/assets/coco/masks/000000532481.png diff --git a/tests/data/assets/coco/masks/000000532493.png b/libs/labelbox/tests/data/assets/coco/masks/000000532493.png similarity index 100% rename from tests/data/assets/coco/masks/000000532493.png rename to libs/labelbox/tests/data/assets/coco/masks/000000532493.png diff --git a/tests/data/assets/coco/masks/000000546823.png b/libs/labelbox/tests/data/assets/coco/masks/000000546823.png similarity index 100% rename from tests/data/assets/coco/masks/000000546823.png rename to libs/labelbox/tests/data/assets/coco/masks/000000546823.png diff --git a/tests/data/assets/coco/panoptic.json b/libs/labelbox/tests/data/assets/coco/panoptic.json similarity index 100% rename from tests/data/assets/coco/panoptic.json rename to libs/labelbox/tests/data/assets/coco/panoptic.json diff --git a/tests/data/assets/coco/rle.json b/libs/labelbox/tests/data/assets/coco/rle.json similarity index 100% rename from tests/data/assets/coco/rle.json rename to libs/labelbox/tests/data/assets/coco/rle.json diff --git a/tests/data/assets/labelbox_v1/highly_nested_image.json b/libs/labelbox/tests/data/assets/labelbox_v1/highly_nested_image.json similarity index 100% rename from tests/data/assets/labelbox_v1/highly_nested_image.json rename to libs/labelbox/tests/data/assets/labelbox_v1/highly_nested_image.json diff --git a/tests/data/assets/labelbox_v1/image_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/image_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/image_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/image_export.json diff --git a/tests/data/assets/labelbox_v1/pdf_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/pdf_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/pdf_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/pdf_export.json diff --git a/tests/data/assets/labelbox_v1/text_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/text_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/text_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/text_export.json diff --git a/tests/data/assets/labelbox_v1/tiled_image_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/tiled_image_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/tiled_image_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/tiled_image_export.json diff --git a/tests/data/assets/labelbox_v1/unkown_media_type_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/unkown_media_type_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/unkown_media_type_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/unkown_media_type_export.json diff --git a/tests/data/assets/labelbox_v1/video_export.json b/libs/labelbox/tests/data/assets/labelbox_v1/video_export.json similarity index 100% rename from tests/data/assets/labelbox_v1/video_export.json rename to libs/labelbox/tests/data/assets/labelbox_v1/video_export.json diff --git a/tests/data/assets/line.png b/libs/labelbox/tests/data/assets/line.png similarity index 100% rename from tests/data/assets/line.png rename to libs/labelbox/tests/data/assets/line.png diff --git a/tests/data/assets/mask.png b/libs/labelbox/tests/data/assets/mask.png similarity index 100% rename from tests/data/assets/mask.png rename to libs/labelbox/tests/data/assets/mask.png diff --git a/tests/data/assets/ndjson/classification_import.json b/libs/labelbox/tests/data/assets/ndjson/classification_import.json similarity index 100% rename from tests/data/assets/ndjson/classification_import.json rename to libs/labelbox/tests/data/assets/ndjson/classification_import.json diff --git a/tests/data/assets/ndjson/classification_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/classification_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/classification_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/classification_import_global_key.json diff --git a/tests/data/assets/ndjson/classification_import_name_only.json b/libs/labelbox/tests/data/assets/ndjson/classification_import_name_only.json similarity index 100% rename from tests/data/assets/ndjson/classification_import_name_only.json rename to libs/labelbox/tests/data/assets/ndjson/classification_import_name_only.json diff --git a/tests/data/assets/ndjson/conversation_entity_import.json b/libs/labelbox/tests/data/assets/ndjson/conversation_entity_import.json similarity index 100% rename from tests/data/assets/ndjson/conversation_entity_import.json rename to libs/labelbox/tests/data/assets/ndjson/conversation_entity_import.json diff --git a/tests/data/assets/ndjson/conversation_entity_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/conversation_entity_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/conversation_entity_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/conversation_entity_import_global_key.json diff --git a/tests/data/assets/ndjson/conversation_entity_without_confidence_import.json b/libs/labelbox/tests/data/assets/ndjson/conversation_entity_without_confidence_import.json similarity index 100% rename from tests/data/assets/ndjson/conversation_entity_without_confidence_import.json rename to libs/labelbox/tests/data/assets/ndjson/conversation_entity_without_confidence_import.json diff --git a/tests/data/assets/ndjson/custom_confusion_matrix_import.json b/libs/labelbox/tests/data/assets/ndjson/custom_confusion_matrix_import.json similarity index 100% rename from tests/data/assets/ndjson/custom_confusion_matrix_import.json rename to libs/labelbox/tests/data/assets/ndjson/custom_confusion_matrix_import.json diff --git a/tests/data/assets/ndjson/custom_scalar_import.json b/libs/labelbox/tests/data/assets/ndjson/custom_scalar_import.json similarity index 100% rename from tests/data/assets/ndjson/custom_scalar_import.json rename to libs/labelbox/tests/data/assets/ndjson/custom_scalar_import.json diff --git a/tests/data/assets/ndjson/image_import.json b/libs/labelbox/tests/data/assets/ndjson/image_import.json similarity index 100% rename from tests/data/assets/ndjson/image_import.json rename to libs/labelbox/tests/data/assets/ndjson/image_import.json diff --git a/tests/data/assets/ndjson/image_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/image_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/image_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/image_import_global_key.json diff --git a/tests/data/assets/ndjson/image_import_name_only.json b/libs/labelbox/tests/data/assets/ndjson/image_import_name_only.json similarity index 100% rename from tests/data/assets/ndjson/image_import_name_only.json rename to libs/labelbox/tests/data/assets/ndjson/image_import_name_only.json diff --git a/tests/data/assets/ndjson/metric_import.json b/libs/labelbox/tests/data/assets/ndjson/metric_import.json similarity index 100% rename from tests/data/assets/ndjson/metric_import.json rename to libs/labelbox/tests/data/assets/ndjson/metric_import.json diff --git a/tests/data/assets/ndjson/metric_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/metric_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/metric_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/metric_import_global_key.json diff --git a/tests/data/assets/ndjson/nested_import.json b/libs/labelbox/tests/data/assets/ndjson/nested_import.json similarity index 100% rename from tests/data/assets/ndjson/nested_import.json rename to libs/labelbox/tests/data/assets/ndjson/nested_import.json diff --git a/tests/data/assets/ndjson/nested_import_name_only.json b/libs/labelbox/tests/data/assets/ndjson/nested_import_name_only.json similarity index 100% rename from tests/data/assets/ndjson/nested_import_name_only.json rename to libs/labelbox/tests/data/assets/ndjson/nested_import_name_only.json diff --git a/tests/data/assets/ndjson/pdf_import.json b/libs/labelbox/tests/data/assets/ndjson/pdf_import.json similarity index 100% rename from tests/data/assets/ndjson/pdf_import.json rename to libs/labelbox/tests/data/assets/ndjson/pdf_import.json diff --git a/tests/data/assets/ndjson/pdf_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/pdf_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/pdf_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/pdf_import_global_key.json diff --git a/tests/data/assets/ndjson/pdf_import_name_only.json b/libs/labelbox/tests/data/assets/ndjson/pdf_import_name_only.json similarity index 100% rename from tests/data/assets/ndjson/pdf_import_name_only.json rename to libs/labelbox/tests/data/assets/ndjson/pdf_import_name_only.json diff --git a/tests/data/assets/ndjson/polyline_import.json b/libs/labelbox/tests/data/assets/ndjson/polyline_import.json similarity index 100% rename from tests/data/assets/ndjson/polyline_import.json rename to libs/labelbox/tests/data/assets/ndjson/polyline_import.json diff --git a/tests/data/assets/ndjson/polyline_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/polyline_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/polyline_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/polyline_import_global_key.json diff --git a/tests/data/assets/ndjson/polyline_without_confidence_import.json b/libs/labelbox/tests/data/assets/ndjson/polyline_without_confidence_import.json similarity index 100% rename from tests/data/assets/ndjson/polyline_without_confidence_import.json rename to libs/labelbox/tests/data/assets/ndjson/polyline_without_confidence_import.json diff --git a/tests/data/assets/ndjson/rectangle_import.json b/libs/labelbox/tests/data/assets/ndjson/rectangle_import.json similarity index 100% rename from tests/data/assets/ndjson/rectangle_import.json rename to libs/labelbox/tests/data/assets/ndjson/rectangle_import.json diff --git a/tests/data/assets/ndjson/relationship_import.json b/libs/labelbox/tests/data/assets/ndjson/relationship_import.json similarity index 100% rename from tests/data/assets/ndjson/relationship_import.json rename to libs/labelbox/tests/data/assets/ndjson/relationship_import.json diff --git a/tests/data/assets/ndjson/text_entity_import.json b/libs/labelbox/tests/data/assets/ndjson/text_entity_import.json similarity index 100% rename from tests/data/assets/ndjson/text_entity_import.json rename to libs/labelbox/tests/data/assets/ndjson/text_entity_import.json diff --git a/tests/data/assets/ndjson/text_entity_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/text_entity_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/text_entity_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/text_entity_import_global_key.json diff --git a/tests/data/assets/ndjson/text_entity_without_confidence_import.json b/libs/labelbox/tests/data/assets/ndjson/text_entity_without_confidence_import.json similarity index 100% rename from tests/data/assets/ndjson/text_entity_without_confidence_import.json rename to libs/labelbox/tests/data/assets/ndjson/text_entity_without_confidence_import.json diff --git a/tests/data/assets/ndjson/video_import.json b/libs/labelbox/tests/data/assets/ndjson/video_import.json similarity index 100% rename from tests/data/assets/ndjson/video_import.json rename to libs/labelbox/tests/data/assets/ndjson/video_import.json diff --git a/tests/data/assets/ndjson/video_import_global_key.json b/libs/labelbox/tests/data/assets/ndjson/video_import_global_key.json similarity index 100% rename from tests/data/assets/ndjson/video_import_global_key.json rename to libs/labelbox/tests/data/assets/ndjson/video_import_global_key.json diff --git a/tests/data/assets/ndjson/video_import_name_only.json b/libs/labelbox/tests/data/assets/ndjson/video_import_name_only.json similarity index 100% rename from tests/data/assets/ndjson/video_import_name_only.json rename to libs/labelbox/tests/data/assets/ndjson/video_import_name_only.json diff --git a/tests/data/assets/point.png b/libs/labelbox/tests/data/assets/point.png similarity index 100% rename from tests/data/assets/point.png rename to libs/labelbox/tests/data/assets/point.png diff --git a/tests/data/assets/polygon.png b/libs/labelbox/tests/data/assets/polygon.png similarity index 100% rename from tests/data/assets/polygon.png rename to libs/labelbox/tests/data/assets/polygon.png diff --git a/tests/data/assets/rectangle.png b/libs/labelbox/tests/data/assets/rectangle.png similarity index 100% rename from tests/data/assets/rectangle.png rename to libs/labelbox/tests/data/assets/rectangle.png diff --git a/tests/data/assets/sample_text.txt b/libs/labelbox/tests/data/assets/sample_text.txt similarity index 100% rename from tests/data/assets/sample_text.txt rename to libs/labelbox/tests/data/assets/sample_text.txt diff --git a/tests/data/conftest.py b/libs/labelbox/tests/data/conftest.py similarity index 100% rename from tests/data/conftest.py rename to libs/labelbox/tests/data/conftest.py diff --git a/tests/data/export/conftest.py b/libs/labelbox/tests/data/export/conftest.py similarity index 100% rename from tests/data/export/conftest.py rename to libs/labelbox/tests/data/export/conftest.py diff --git a/tests/data/export/legacy/test_export_catalog.py b/libs/labelbox/tests/data/export/legacy/test_export_catalog.py similarity index 100% rename from tests/data/export/legacy/test_export_catalog.py rename to libs/labelbox/tests/data/export/legacy/test_export_catalog.py diff --git a/tests/data/export/legacy/test_export_data_rows.py b/libs/labelbox/tests/data/export/legacy/test_export_data_rows.py similarity index 100% rename from tests/data/export/legacy/test_export_data_rows.py rename to libs/labelbox/tests/data/export/legacy/test_export_data_rows.py diff --git a/tests/data/export/legacy/test_export_dataset.py b/libs/labelbox/tests/data/export/legacy/test_export_dataset.py similarity index 100% rename from tests/data/export/legacy/test_export_dataset.py rename to libs/labelbox/tests/data/export/legacy/test_export_dataset.py diff --git a/tests/data/export/legacy/test_export_model_run.py b/libs/labelbox/tests/data/export/legacy/test_export_model_run.py similarity index 100% rename from tests/data/export/legacy/test_export_model_run.py rename to libs/labelbox/tests/data/export/legacy/test_export_model_run.py diff --git a/tests/data/export/legacy/test_export_project.py b/libs/labelbox/tests/data/export/legacy/test_export_project.py similarity index 100% rename from tests/data/export/legacy/test_export_project.py rename to libs/labelbox/tests/data/export/legacy/test_export_project.py diff --git a/tests/data/export/legacy/test_export_slice.py b/libs/labelbox/tests/data/export/legacy/test_export_slice.py similarity index 100% rename from tests/data/export/legacy/test_export_slice.py rename to libs/labelbox/tests/data/export/legacy/test_export_slice.py diff --git a/tests/data/export/legacy/test_export_video.py b/libs/labelbox/tests/data/export/legacy/test_export_video.py similarity index 100% rename from tests/data/export/legacy/test_export_video.py rename to libs/labelbox/tests/data/export/legacy/test_export_video.py diff --git a/tests/data/export/legacy/test_legacy_export.py b/libs/labelbox/tests/data/export/legacy/test_legacy_export.py similarity index 100% rename from tests/data/export/legacy/test_legacy_export.py rename to libs/labelbox/tests/data/export/legacy/test_legacy_export.py diff --git a/tests/data/export/streamable/test_export_data_rows_streamable.py b/libs/labelbox/tests/data/export/streamable/test_export_data_rows_streamable.py similarity index 100% rename from tests/data/export/streamable/test_export_data_rows_streamable.py rename to libs/labelbox/tests/data/export/streamable/test_export_data_rows_streamable.py diff --git a/tests/data/export/streamable/test_export_dataset_streamable.py b/libs/labelbox/tests/data/export/streamable/test_export_dataset_streamable.py similarity index 100% rename from tests/data/export/streamable/test_export_dataset_streamable.py rename to libs/labelbox/tests/data/export/streamable/test_export_dataset_streamable.py diff --git a/tests/data/export/streamable/test_export_model_run_streamable.py b/libs/labelbox/tests/data/export/streamable/test_export_model_run_streamable.py similarity index 100% rename from tests/data/export/streamable/test_export_model_run_streamable.py rename to libs/labelbox/tests/data/export/streamable/test_export_model_run_streamable.py diff --git a/tests/data/export/streamable/test_export_project_streamable.py b/libs/labelbox/tests/data/export/streamable/test_export_project_streamable.py similarity index 100% rename from tests/data/export/streamable/test_export_project_streamable.py rename to libs/labelbox/tests/data/export/streamable/test_export_project_streamable.py diff --git a/tests/data/export/streamable/test_export_video_streamable.py b/libs/labelbox/tests/data/export/streamable/test_export_video_streamable.py similarity index 100% rename from tests/data/export/streamable/test_export_video_streamable.py rename to libs/labelbox/tests/data/export/streamable/test_export_video_streamable.py diff --git a/tests/data/metrics/confusion_matrix/conftest.py b/libs/labelbox/tests/data/metrics/confusion_matrix/conftest.py similarity index 100% rename from tests/data/metrics/confusion_matrix/conftest.py rename to libs/labelbox/tests/data/metrics/confusion_matrix/conftest.py diff --git a/tests/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py b/libs/labelbox/tests/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py similarity index 100% rename from tests/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py rename to libs/labelbox/tests/data/metrics/confusion_matrix/test_confusion_matrix_data_row.py diff --git a/tests/data/metrics/confusion_matrix/test_confusion_matrix_feature.py b/libs/labelbox/tests/data/metrics/confusion_matrix/test_confusion_matrix_feature.py similarity index 100% rename from tests/data/metrics/confusion_matrix/test_confusion_matrix_feature.py rename to libs/labelbox/tests/data/metrics/confusion_matrix/test_confusion_matrix_feature.py diff --git a/tests/data/metrics/iou/data_row/conftest.py b/libs/labelbox/tests/data/metrics/iou/data_row/conftest.py similarity index 100% rename from tests/data/metrics/iou/data_row/conftest.py rename to libs/labelbox/tests/data/metrics/iou/data_row/conftest.py diff --git a/tests/data/metrics/iou/data_row/test_data_row_iou.py b/libs/labelbox/tests/data/metrics/iou/data_row/test_data_row_iou.py similarity index 100% rename from tests/data/metrics/iou/data_row/test_data_row_iou.py rename to libs/labelbox/tests/data/metrics/iou/data_row/test_data_row_iou.py diff --git a/tests/data/metrics/iou/feature/conftest.py b/libs/labelbox/tests/data/metrics/iou/feature/conftest.py similarity index 100% rename from tests/data/metrics/iou/feature/conftest.py rename to libs/labelbox/tests/data/metrics/iou/feature/conftest.py diff --git a/tests/data/metrics/iou/feature/test_feature_iou.py b/libs/labelbox/tests/data/metrics/iou/feature/test_feature_iou.py similarity index 100% rename from tests/data/metrics/iou/feature/test_feature_iou.py rename to libs/labelbox/tests/data/metrics/iou/feature/test_feature_iou.py diff --git a/tests/data/serialization/__init__.py b/libs/labelbox/tests/data/serialization/__init__.py similarity index 100% rename from tests/data/serialization/__init__.py rename to libs/labelbox/tests/data/serialization/__init__.py diff --git a/tests/data/serialization/coco/test_coco.py b/libs/labelbox/tests/data/serialization/coco/test_coco.py similarity index 100% rename from tests/data/serialization/coco/test_coco.py rename to libs/labelbox/tests/data/serialization/coco/test_coco.py diff --git a/tests/data/serialization/labelbox_v1/test_document.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_document.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_document.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_document.py diff --git a/tests/data/serialization/labelbox_v1/test_image.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_image.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_image.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_image.py diff --git a/tests/data/serialization/labelbox_v1/test_text.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_text.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_text.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_text.py diff --git a/tests/data/serialization/labelbox_v1/test_tiled_image.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_tiled_image.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_tiled_image.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_tiled_image.py diff --git a/tests/data/serialization/labelbox_v1/test_unknown_media.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_unknown_media.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_unknown_media.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_unknown_media.py diff --git a/tests/data/serialization/labelbox_v1/test_video.py b/libs/labelbox/tests/data/serialization/labelbox_v1/test_video.py similarity index 100% rename from tests/data/serialization/labelbox_v1/test_video.py rename to libs/labelbox/tests/data/serialization/labelbox_v1/test_video.py diff --git a/tests/data/serialization/ndjson/__init__.py b/libs/labelbox/tests/data/serialization/ndjson/__init__.py similarity index 100% rename from tests/data/serialization/ndjson/__init__.py rename to libs/labelbox/tests/data/serialization/ndjson/__init__.py diff --git a/tests/data/serialization/ndjson/test_checklist.py b/libs/labelbox/tests/data/serialization/ndjson/test_checklist.py similarity index 100% rename from tests/data/serialization/ndjson/test_checklist.py rename to libs/labelbox/tests/data/serialization/ndjson/test_checklist.py diff --git a/tests/data/serialization/ndjson/test_classification.py b/libs/labelbox/tests/data/serialization/ndjson/test_classification.py similarity index 100% rename from tests/data/serialization/ndjson/test_classification.py rename to libs/labelbox/tests/data/serialization/ndjson/test_classification.py diff --git a/tests/data/serialization/ndjson/test_conversation.py b/libs/labelbox/tests/data/serialization/ndjson/test_conversation.py similarity index 100% rename from tests/data/serialization/ndjson/test_conversation.py rename to libs/labelbox/tests/data/serialization/ndjson/test_conversation.py diff --git a/tests/data/serialization/ndjson/test_dicom.py b/libs/labelbox/tests/data/serialization/ndjson/test_dicom.py similarity index 100% rename from tests/data/serialization/ndjson/test_dicom.py rename to libs/labelbox/tests/data/serialization/ndjson/test_dicom.py diff --git a/tests/data/serialization/ndjson/test_document.py b/libs/labelbox/tests/data/serialization/ndjson/test_document.py similarity index 100% rename from tests/data/serialization/ndjson/test_document.py rename to libs/labelbox/tests/data/serialization/ndjson/test_document.py diff --git a/tests/data/serialization/ndjson/test_export_video_objects.py b/libs/labelbox/tests/data/serialization/ndjson/test_export_video_objects.py similarity index 100% rename from tests/data/serialization/ndjson/test_export_video_objects.py rename to libs/labelbox/tests/data/serialization/ndjson/test_export_video_objects.py diff --git a/tests/data/serialization/ndjson/test_free_text.py b/libs/labelbox/tests/data/serialization/ndjson/test_free_text.py similarity index 100% rename from tests/data/serialization/ndjson/test_free_text.py rename to libs/labelbox/tests/data/serialization/ndjson/test_free_text.py diff --git a/tests/data/serialization/ndjson/test_global_key.py b/libs/labelbox/tests/data/serialization/ndjson/test_global_key.py similarity index 100% rename from tests/data/serialization/ndjson/test_global_key.py rename to libs/labelbox/tests/data/serialization/ndjson/test_global_key.py diff --git a/tests/data/serialization/ndjson/test_image.py b/libs/labelbox/tests/data/serialization/ndjson/test_image.py similarity index 100% rename from tests/data/serialization/ndjson/test_image.py rename to libs/labelbox/tests/data/serialization/ndjson/test_image.py diff --git a/tests/data/serialization/ndjson/test_metric.py b/libs/labelbox/tests/data/serialization/ndjson/test_metric.py similarity index 100% rename from tests/data/serialization/ndjson/test_metric.py rename to libs/labelbox/tests/data/serialization/ndjson/test_metric.py diff --git a/tests/data/serialization/ndjson/test_nested.py b/libs/labelbox/tests/data/serialization/ndjson/test_nested.py similarity index 100% rename from tests/data/serialization/ndjson/test_nested.py rename to libs/labelbox/tests/data/serialization/ndjson/test_nested.py diff --git a/tests/data/serialization/ndjson/test_polyline.py b/libs/labelbox/tests/data/serialization/ndjson/test_polyline.py similarity index 100% rename from tests/data/serialization/ndjson/test_polyline.py rename to libs/labelbox/tests/data/serialization/ndjson/test_polyline.py diff --git a/tests/data/serialization/ndjson/test_radio.py b/libs/labelbox/tests/data/serialization/ndjson/test_radio.py similarity index 100% rename from tests/data/serialization/ndjson/test_radio.py rename to libs/labelbox/tests/data/serialization/ndjson/test_radio.py diff --git a/tests/data/serialization/ndjson/test_rectangle.py b/libs/labelbox/tests/data/serialization/ndjson/test_rectangle.py similarity index 100% rename from tests/data/serialization/ndjson/test_rectangle.py rename to libs/labelbox/tests/data/serialization/ndjson/test_rectangle.py diff --git a/tests/data/serialization/ndjson/test_relationship.py b/libs/labelbox/tests/data/serialization/ndjson/test_relationship.py similarity index 100% rename from tests/data/serialization/ndjson/test_relationship.py rename to libs/labelbox/tests/data/serialization/ndjson/test_relationship.py diff --git a/tests/data/serialization/ndjson/test_text.py b/libs/labelbox/tests/data/serialization/ndjson/test_text.py similarity index 100% rename from tests/data/serialization/ndjson/test_text.py rename to libs/labelbox/tests/data/serialization/ndjson/test_text.py diff --git a/tests/data/serialization/ndjson/test_text_entity.py b/libs/labelbox/tests/data/serialization/ndjson/test_text_entity.py similarity index 100% rename from tests/data/serialization/ndjson/test_text_entity.py rename to libs/labelbox/tests/data/serialization/ndjson/test_text_entity.py diff --git a/tests/data/serialization/ndjson/test_video.py b/libs/labelbox/tests/data/serialization/ndjson/test_video.py similarity index 100% rename from tests/data/serialization/ndjson/test_video.py rename to libs/labelbox/tests/data/serialization/ndjson/test_video.py diff --git a/tests/data/test_data_row_metadata.py b/libs/labelbox/tests/data/test_data_row_metadata.py similarity index 100% rename from tests/data/test_data_row_metadata.py rename to libs/labelbox/tests/data/test_data_row_metadata.py diff --git a/tests/data/test_prefetch_generator.py b/libs/labelbox/tests/data/test_prefetch_generator.py similarity index 100% rename from tests/data/test_prefetch_generator.py rename to libs/labelbox/tests/data/test_prefetch_generator.py diff --git a/tests/integration/conftest.py b/libs/labelbox/tests/integration/conftest.py similarity index 100% rename from tests/integration/conftest.py rename to libs/labelbox/tests/integration/conftest.py diff --git a/tests/integration/media/bulk_conversation.json b/libs/labelbox/tests/integration/media/bulk_conversation.json similarity index 100% rename from tests/integration/media/bulk_conversation.json rename to libs/labelbox/tests/integration/media/bulk_conversation.json diff --git a/tests/integration/media/cat.mp4 b/libs/labelbox/tests/integration/media/cat.mp4 similarity index 100% rename from tests/integration/media/cat.mp4 rename to libs/labelbox/tests/integration/media/cat.mp4 diff --git a/tests/integration/media/sample_image.jpg b/libs/labelbox/tests/integration/media/sample_image.jpg similarity index 100% rename from tests/integration/media/sample_image.jpg rename to libs/labelbox/tests/integration/media/sample_image.jpg diff --git a/tests/integration/media/sample_pdf.pdf b/libs/labelbox/tests/integration/media/sample_pdf.pdf similarity index 100% rename from tests/integration/media/sample_pdf.pdf rename to libs/labelbox/tests/integration/media/sample_pdf.pdf diff --git a/tests/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json b/libs/labelbox/tests/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json similarity index 100% rename from tests/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json rename to libs/labelbox/tests/integration/snapshots/test_data_rows.test_data_row_bulk_creation_with_same_global_keys.failed_data_rows.json diff --git a/tests/integration/snapshots/test_task.test_task_errors.errors.json b/libs/labelbox/tests/integration/snapshots/test_task.test_task_errors.errors.json similarity index 100% rename from tests/integration/snapshots/test_task.test_task_errors.errors.json rename to libs/labelbox/tests/integration/snapshots/test_task.test_task_errors.errors.json diff --git a/tests/integration/snapshots/test_task.test_task_errors.failed_data_rows.json b/libs/labelbox/tests/integration/snapshots/test_task.test_task_errors.failed_data_rows.json similarity index 100% rename from tests/integration/snapshots/test_task.test_task_errors.failed_data_rows.json rename to libs/labelbox/tests/integration/snapshots/test_task.test_task_errors.failed_data_rows.json diff --git a/tests/integration/snapshots/test_task.test_task_success_json.json b/libs/labelbox/tests/integration/snapshots/test_task.test_task_success_json.json similarity index 100% rename from tests/integration/snapshots/test_task.test_task_success_json.json rename to libs/labelbox/tests/integration/snapshots/test_task.test_task_success_json.json diff --git a/tests/integration/test_batch.py b/libs/labelbox/tests/integration/test_batch.py similarity index 100% rename from tests/integration/test_batch.py rename to libs/labelbox/tests/integration/test_batch.py diff --git a/tests/integration/test_batches.py b/libs/labelbox/tests/integration/test_batches.py similarity index 100% rename from tests/integration/test_batches.py rename to libs/labelbox/tests/integration/test_batches.py diff --git a/tests/integration/test_benchmark.py b/libs/labelbox/tests/integration/test_benchmark.py similarity index 100% rename from tests/integration/test_benchmark.py rename to libs/labelbox/tests/integration/test_benchmark.py diff --git a/tests/integration/test_client_errors.py b/libs/labelbox/tests/integration/test_client_errors.py similarity index 100% rename from tests/integration/test_client_errors.py rename to libs/labelbox/tests/integration/test_client_errors.py diff --git a/tests/integration/test_data_row_delete_metadata.py b/libs/labelbox/tests/integration/test_data_row_delete_metadata.py similarity index 100% rename from tests/integration/test_data_row_delete_metadata.py rename to libs/labelbox/tests/integration/test_data_row_delete_metadata.py diff --git a/tests/integration/test_data_rows.py b/libs/labelbox/tests/integration/test_data_rows.py similarity index 100% rename from tests/integration/test_data_rows.py rename to libs/labelbox/tests/integration/test_data_rows.py diff --git a/tests/integration/test_data_rows_upsert.py b/libs/labelbox/tests/integration/test_data_rows_upsert.py similarity index 100% rename from tests/integration/test_data_rows_upsert.py rename to libs/labelbox/tests/integration/test_data_rows_upsert.py diff --git a/tests/integration/test_data_upload.py b/libs/labelbox/tests/integration/test_data_upload.py similarity index 100% rename from tests/integration/test_data_upload.py rename to libs/labelbox/tests/integration/test_data_upload.py diff --git a/tests/integration/test_dataset.py b/libs/labelbox/tests/integration/test_dataset.py similarity index 100% rename from tests/integration/test_dataset.py rename to libs/labelbox/tests/integration/test_dataset.py diff --git a/tests/integration/test_dates.py b/libs/labelbox/tests/integration/test_dates.py similarity index 100% rename from tests/integration/test_dates.py rename to libs/labelbox/tests/integration/test_dates.py diff --git a/tests/integration/test_delegated_access.py b/libs/labelbox/tests/integration/test_delegated_access.py similarity index 100% rename from tests/integration/test_delegated_access.py rename to libs/labelbox/tests/integration/test_delegated_access.py diff --git a/tests/integration/test_ephemeral.py b/libs/labelbox/tests/integration/test_ephemeral.py similarity index 100% rename from tests/integration/test_ephemeral.py rename to libs/labelbox/tests/integration/test_ephemeral.py diff --git a/tests/integration/test_feature_schema.py b/libs/labelbox/tests/integration/test_feature_schema.py similarity index 100% rename from tests/integration/test_feature_schema.py rename to libs/labelbox/tests/integration/test_feature_schema.py diff --git a/tests/integration/test_filtering.py b/libs/labelbox/tests/integration/test_filtering.py similarity index 100% rename from tests/integration/test_filtering.py rename to libs/labelbox/tests/integration/test_filtering.py diff --git a/tests/integration/test_foundry.py b/libs/labelbox/tests/integration/test_foundry.py similarity index 98% rename from tests/integration/test_foundry.py rename to libs/labelbox/tests/integration/test_foundry.py index 9367af609..560026079 100644 --- a/tests/integration/test_foundry.py +++ b/libs/labelbox/tests/integration/test_foundry.py @@ -145,4 +145,4 @@ def test_run_foundry_with_invalid_global_key(foundry_client, app, random_str): model_run_name=f"test-app-with-invalid-global-key-{random_str}", data_rows=data_rows, app_id=app.id) - assert invalid_global_key in exception.value \ No newline at end of file + assert invalid_global_key in exception.value diff --git a/tests/integration/test_global_keys.py b/libs/labelbox/tests/integration/test_global_keys.py similarity index 100% rename from tests/integration/test_global_keys.py rename to libs/labelbox/tests/integration/test_global_keys.py diff --git a/tests/integration/test_label.py b/libs/labelbox/tests/integration/test_label.py similarity index 100% rename from tests/integration/test_label.py rename to libs/labelbox/tests/integration/test_label.py diff --git a/tests/integration/test_labeler_performance.py b/libs/labelbox/tests/integration/test_labeler_performance.py similarity index 100% rename from tests/integration/test_labeler_performance.py rename to libs/labelbox/tests/integration/test_labeler_performance.py diff --git a/tests/integration/test_labeling_frontend.py b/libs/labelbox/tests/integration/test_labeling_frontend.py similarity index 100% rename from tests/integration/test_labeling_frontend.py rename to libs/labelbox/tests/integration/test_labeling_frontend.py diff --git a/tests/integration/test_labeling_parameter_overrides.py b/libs/labelbox/tests/integration/test_labeling_parameter_overrides.py similarity index 100% rename from tests/integration/test_labeling_parameter_overrides.py rename to libs/labelbox/tests/integration/test_labeling_parameter_overrides.py diff --git a/tests/integration/test_legacy_project.py b/libs/labelbox/tests/integration/test_legacy_project.py similarity index 100% rename from tests/integration/test_legacy_project.py rename to libs/labelbox/tests/integration/test_legacy_project.py diff --git a/tests/integration/test_ontology.py b/libs/labelbox/tests/integration/test_ontology.py similarity index 100% rename from tests/integration/test_ontology.py rename to libs/labelbox/tests/integration/test_ontology.py diff --git a/tests/integration/test_pagination.py b/libs/labelbox/tests/integration/test_pagination.py similarity index 100% rename from tests/integration/test_pagination.py rename to libs/labelbox/tests/integration/test_pagination.py diff --git a/tests/integration/test_project.py b/libs/labelbox/tests/integration/test_project.py similarity index 100% rename from tests/integration/test_project.py rename to libs/labelbox/tests/integration/test_project.py diff --git a/tests/integration/test_project_setup.py b/libs/labelbox/tests/integration/test_project_setup.py similarity index 100% rename from tests/integration/test_project_setup.py rename to libs/labelbox/tests/integration/test_project_setup.py diff --git a/tests/integration/test_send_to_annotate.py b/libs/labelbox/tests/integration/test_send_to_annotate.py similarity index 100% rename from tests/integration/test_send_to_annotate.py rename to libs/labelbox/tests/integration/test_send_to_annotate.py diff --git a/tests/integration/test_sorting.py b/libs/labelbox/tests/integration/test_sorting.py similarity index 100% rename from tests/integration/test_sorting.py rename to libs/labelbox/tests/integration/test_sorting.py diff --git a/tests/integration/test_task.py b/libs/labelbox/tests/integration/test_task.py similarity index 100% rename from tests/integration/test_task.py rename to libs/labelbox/tests/integration/test_task.py diff --git a/tests/integration/test_task_queue.py b/libs/labelbox/tests/integration/test_task_queue.py similarity index 100% rename from tests/integration/test_task_queue.py rename to libs/labelbox/tests/integration/test_task_queue.py diff --git a/tests/integration/test_toggle_mal.py b/libs/labelbox/tests/integration/test_toggle_mal.py similarity index 100% rename from tests/integration/test_toggle_mal.py rename to libs/labelbox/tests/integration/test_toggle_mal.py diff --git a/tests/integration/test_user_and_org.py b/libs/labelbox/tests/integration/test_user_and_org.py similarity index 100% rename from tests/integration/test_user_and_org.py rename to libs/labelbox/tests/integration/test_user_and_org.py diff --git a/tests/integration/test_user_management.py b/libs/labelbox/tests/integration/test_user_management.py similarity index 100% rename from tests/integration/test_user_management.py rename to libs/labelbox/tests/integration/test_user_management.py diff --git a/tests/integration/test_webhook.py b/libs/labelbox/tests/integration/test_webhook.py similarity index 100% rename from tests/integration/test_webhook.py rename to libs/labelbox/tests/integration/test_webhook.py diff --git a/tests/unit/conftest.py b/libs/labelbox/tests/unit/conftest.py similarity index 100% rename from tests/unit/conftest.py rename to libs/labelbox/tests/unit/conftest.py diff --git a/tests/unit/export_task/test_unit_file_converter.py b/libs/labelbox/tests/unit/export_task/test_unit_file_converter.py similarity index 100% rename from tests/unit/export_task/test_unit_file_converter.py rename to libs/labelbox/tests/unit/export_task/test_unit_file_converter.py diff --git a/tests/unit/export_task/test_unit_file_retriever_by_line.py b/libs/labelbox/tests/unit/export_task/test_unit_file_retriever_by_line.py similarity index 100% rename from tests/unit/export_task/test_unit_file_retriever_by_line.py rename to libs/labelbox/tests/unit/export_task/test_unit_file_retriever_by_line.py diff --git a/tests/unit/export_task/test_unit_file_retriever_by_offset.py b/libs/labelbox/tests/unit/export_task/test_unit_file_retriever_by_offset.py similarity index 100% rename from tests/unit/export_task/test_unit_file_retriever_by_offset.py rename to libs/labelbox/tests/unit/export_task/test_unit_file_retriever_by_offset.py diff --git a/tests/unit/export_task/test_unit_json_converter.py b/libs/labelbox/tests/unit/export_task/test_unit_json_converter.py similarity index 100% rename from tests/unit/export_task/test_unit_json_converter.py rename to libs/labelbox/tests/unit/export_task/test_unit_json_converter.py diff --git a/tests/unit/test_annotation_import.py b/libs/labelbox/tests/unit/test_annotation_import.py similarity index 100% rename from tests/unit/test_annotation_import.py rename to libs/labelbox/tests/unit/test_annotation_import.py diff --git a/tests/unit/test_label_data_type.py b/libs/labelbox/tests/unit/test_label_data_type.py similarity index 100% rename from tests/unit/test_label_data_type.py rename to libs/labelbox/tests/unit/test_label_data_type.py diff --git a/tests/unit/test_mal_import.py b/libs/labelbox/tests/unit/test_mal_import.py similarity index 100% rename from tests/unit/test_mal_import.py rename to libs/labelbox/tests/unit/test_mal_import.py diff --git a/tests/unit/test_ndjson_parsing.py b/libs/labelbox/tests/unit/test_ndjson_parsing.py similarity index 100% rename from tests/unit/test_ndjson_parsing.py rename to libs/labelbox/tests/unit/test_ndjson_parsing.py diff --git a/tests/unit/test_queue_mode.py b/libs/labelbox/tests/unit/test_queue_mode.py similarity index 100% rename from tests/unit/test_queue_mode.py rename to libs/labelbox/tests/unit/test_queue_mode.py diff --git a/tests/unit/test_unit_case_change.py b/libs/labelbox/tests/unit/test_unit_case_change.py similarity index 100% rename from tests/unit/test_unit_case_change.py rename to libs/labelbox/tests/unit/test_unit_case_change.py diff --git a/tests/unit/test_unit_delete_batch_data_row_metadata.py b/libs/labelbox/tests/unit/test_unit_delete_batch_data_row_metadata.py similarity index 100% rename from tests/unit/test_unit_delete_batch_data_row_metadata.py rename to libs/labelbox/tests/unit/test_unit_delete_batch_data_row_metadata.py diff --git a/tests/unit/test_unit_entity_meta.py b/libs/labelbox/tests/unit/test_unit_entity_meta.py similarity index 100% rename from tests/unit/test_unit_entity_meta.py rename to libs/labelbox/tests/unit/test_unit_entity_meta.py diff --git a/tests/unit/test_unit_export_filters.py b/libs/labelbox/tests/unit/test_unit_export_filters.py similarity index 100% rename from tests/unit/test_unit_export_filters.py rename to libs/labelbox/tests/unit/test_unit_export_filters.py diff --git a/tests/unit/test_unit_filter.py b/libs/labelbox/tests/unit/test_unit_filter.py similarity index 100% rename from tests/unit/test_unit_filter.py rename to libs/labelbox/tests/unit/test_unit_filter.py diff --git a/tests/unit/test_unit_identifiables.py b/libs/labelbox/tests/unit/test_unit_identifiables.py similarity index 100% rename from tests/unit/test_unit_identifiables.py rename to libs/labelbox/tests/unit/test_unit_identifiables.py diff --git a/tests/unit/test_unit_label_import.py b/libs/labelbox/tests/unit/test_unit_label_import.py similarity index 100% rename from tests/unit/test_unit_label_import.py rename to libs/labelbox/tests/unit/test_unit_label_import.py diff --git a/tests/unit/test_unit_ontology.py b/libs/labelbox/tests/unit/test_unit_ontology.py similarity index 100% rename from tests/unit/test_unit_ontology.py rename to libs/labelbox/tests/unit/test_unit_ontology.py diff --git a/tests/unit/test_unit_project_validate_labeling_parameter_overrides.py b/libs/labelbox/tests/unit/test_unit_project_validate_labeling_parameter_overrides.py similarity index 100% rename from tests/unit/test_unit_project_validate_labeling_parameter_overrides.py rename to libs/labelbox/tests/unit/test_unit_project_validate_labeling_parameter_overrides.py diff --git a/tests/unit/test_unit_query.py b/libs/labelbox/tests/unit/test_unit_query.py similarity index 100% rename from tests/unit/test_unit_query.py rename to libs/labelbox/tests/unit/test_unit_query.py diff --git a/tests/unit/test_unit_rand_gen.py b/libs/labelbox/tests/unit/test_unit_rand_gen.py similarity index 100% rename from tests/unit/test_unit_rand_gen.py rename to libs/labelbox/tests/unit/test_unit_rand_gen.py diff --git a/tests/unit/test_unit_webhook.py b/libs/labelbox/tests/unit/test_unit_webhook.py similarity index 100% rename from tests/unit/test_unit_webhook.py rename to libs/labelbox/tests/unit/test_unit_webhook.py diff --git a/tests/unit/test_utils.py b/libs/labelbox/tests/unit/test_utils.py similarity index 100% rename from tests/unit/test_utils.py rename to libs/labelbox/tests/unit/test_utils.py diff --git a/tests/utils.py b/libs/labelbox/tests/utils.py similarity index 100% rename from tests/utils.py rename to libs/labelbox/tests/utils.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..7a2de03ee --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,41 @@ +[project] +name = "labelbox-python" +version = "0.1.0" +description = "Labelbox Python API" +authors = [ + { name = "Labelbox", email = "engineering@labelbox.com" } +] +dependencies = [ + "sphinx-multiproject>=1.0.0rc1", + "sphinx>=7.1.2", + "sphinx-rtd-theme>=2.0.0", +] +readme = "README.md" +requires-python = ">= 3.8" + +[tool.rye] +managed = true +virtual = true +dev-dependencies = [ + "pytest>=8.1.1", + "pytest-cases>=3.8.4", + "pytest-rerunfailures>=14.0", + "pytest-snapshot>=0.9.0", + "nbconvert>=7.16.2", + "nbformat>=5.10.3", + "pytest-cov>=4.1.0", + "pytest-xdist>=3.5.0", + "toml-cli>=0.6.0", +] + +[tool.rye.workspace] +members = ["libs/*"] + +[tool.pytest.ini_options] +addopts = "-rP -vvv --reruns 5 --reruns-delay 10 --durations=20 -n auto --cov=labelbox --import-mode=importlib" +markers = """ + slow: marks tests as slow (deselect with '-m "not slow"') +""" + +[tool.rye.scripts] +docs = "sphinx-build ./docs ./dist" \ No newline at end of file diff --git a/pytest.ini b/pytest.ini index 08eaf068f..f52192758 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,3 +3,4 @@ pythonpath = . addopts = -rP -vvv --reruns 2 --reruns-delay 10 --durations=20 -n 10 markers = slow: marks tests as slow (deselect with '-m "not slow"') + diff --git a/requirements-dev.lock b/requirements-dev.lock new file mode 100644 index 000000000..67971060f --- /dev/null +++ b/requirements-dev.lock @@ -0,0 +1,232 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false + +-e file:libs/labelbox +alabaster==0.7.13 + # via sphinx +annotated-types==0.6.0 + # via pydantic +attrs==23.2.0 + # via jsonschema + # via referencing +babel==2.14.0 + # via sphinx +beautifulsoup4==4.12.3 + # via nbconvert +bleach==6.1.0 + # via nbconvert +cachetools==5.3.3 + # via google-auth +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via typer +coverage==7.4.4 + # via pytest-cov +decopatch==1.4.10 + # via pytest-cases +defusedxml==0.7.1 + # via nbconvert +docutils==0.20.1 + # via sphinx + # via sphinx-rtd-theme +exceptiongroup==1.2.0 + # via pytest +execnet==2.0.2 + # via pytest-xdist +fastjsonschema==2.19.1 + # via nbformat +geojson==3.1.0 + # via labelbox +google-api-core==2.17.1 + # via labelbox +google-auth==2.28.2 + # via google-api-core +googleapis-common-protos==1.63.0 + # via google-api-core +idna==3.6 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==7.0.2 + # via jupyter-client + # via nbconvert + # via sphinx + # via yapf +importlib-resources==6.3.1 + # via jsonschema + # via jsonschema-specifications +iniconfig==2.0.0 + # via pytest +jinja2==3.1.3 + # via nbconvert + # via sphinx +jsonschema==4.21.1 + # via nbformat +jsonschema-specifications==2023.12.1 + # via jsonschema +jupyter-client==8.6.1 + # via nbclient +jupyter-core==5.7.2 + # via jupyter-client + # via nbclient + # via nbconvert + # via nbformat +jupyterlab-pygments==0.3.0 + # via nbconvert +makefun==1.15.2 + # via decopatch + # via pytest-cases +markupsafe==2.1.5 + # via jinja2 + # via nbconvert +mistune==3.0.2 + # via nbconvert +mypy==1.9.0 +mypy-extensions==1.0.0 + # via mypy +nbclient==0.10.0 + # via nbconvert +nbconvert==7.16.2 +nbformat==5.10.3 + # via nbclient + # via nbconvert +packaging==24.0 + # via nbconvert + # via pytest + # via pytest-cases + # via pytest-rerunfailures + # via sphinx +pandocfilters==1.5.1 + # via nbconvert +pkgutil-resolve-name==1.3.10 + # via jsonschema +platformdirs==4.2.0 + # via jupyter-core + # via yapf +pluggy==1.4.0 + # via pytest +protobuf==4.25.3 + # via google-api-core + # via googleapis-common-protos +pyasn1==0.5.1 + # via pyasn1-modules + # via rsa +pyasn1-modules==0.3.0 + # via google-auth +pydantic==2.6.4 + # via labelbox +pydantic-core==2.16.3 + # via pydantic +pygments==2.17.2 + # via nbconvert + # via sphinx +pytest==8.1.1 + # via pytest-cov + # via pytest-rerunfailures + # via pytest-snapshot + # via pytest-xdist +pytest-cases==3.8.4 +pytest-cov==4.1.0 +pytest-rerunfailures==14.0 +pytest-snapshot==0.9.0 +pytest-xdist==3.5.0 +python-dateutil==2.8.2 + # via jupyter-client + # via labelbox +pytz==2024.1 + # via babel +pyzmq==25.1.2 + # via jupyter-client +referencing==0.34.0 + # via jsonschema + # via jsonschema-specifications +regex==2023.12.25 + # via toml-cli +requests==2.31.0 + # via google-api-core + # via labelbox + # via sphinx +rpds-py==0.18.0 + # via jsonschema + # via referencing +rsa==4.9 + # via google-auth +six==1.16.0 + # via bleach + # via python-dateutil +snowballstemmer==2.2.0 + # via sphinx +soupsieve==2.5 + # via beautifulsoup4 +sphinx==7.1.2 + # via sphinx-rtd-theme + # via sphinxcontrib-jquery +sphinx-multiproject==1.0.0rc1 +sphinx-rtd-theme==2.0.0 +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +strenum==0.4.15 + # via labelbox +tinycss2==1.2.1 + # via nbconvert +toml-cli==0.6.0 +tomli==2.0.1 + # via coverage + # via mypy + # via pytest + # via yapf +tomlkit==0.12.4 + # via toml-cli +tornado==6.4 + # via jupyter-client +tqdm==4.66.2 + # via labelbox +traitlets==5.14.2 + # via jupyter-client + # via jupyter-core + # via nbclient + # via nbconvert + # via nbformat +typer==0.9.0 + # via toml-cli +types-pillow==10.2.0.20240311 +types-python-dateutil==2.9.0.20240316 +types-requests==2.31.0.20240311 +types-tqdm==4.66.0.20240106 +typing-extensions==4.10.0 + # via annotated-types + # via mypy + # via pydantic + # via pydantic-core + # via typer +urllib3==2.2.1 + # via requests + # via types-requests +webencodings==0.5.1 + # via bleach + # via tinycss2 +yapf==0.40.2 +zipp==3.18.1 + # via importlib-metadata + # via importlib-resources diff --git a/requirements.lock b/requirements.lock new file mode 100644 index 000000000..3745857dc --- /dev/null +++ b/requirements.lock @@ -0,0 +1,104 @@ +# generated by rye +# use `rye lock` or `rye sync` to update this lockfile +# +# last locked with the following flags: +# pre: false +# features: [] +# all-features: false +# with-sources: false + +-e file:libs/labelbox +alabaster==0.7.13 + # via sphinx +annotated-types==0.6.0 + # via pydantic +babel==2.14.0 + # via sphinx +cachetools==5.3.3 + # via google-auth +certifi==2024.2.2 + # via requests +charset-normalizer==3.3.2 + # via requests +docutils==0.20.1 + # via sphinx + # via sphinx-rtd-theme +geojson==3.1.0 + # via labelbox +google-api-core==2.17.1 + # via labelbox +google-auth==2.28.2 + # via google-api-core +googleapis-common-protos==1.63.0 + # via google-api-core +idna==3.6 + # via requests +imagesize==1.4.1 + # via sphinx +importlib-metadata==7.1.0 + # via sphinx +jinja2==3.1.3 + # via sphinx +markupsafe==2.1.5 + # via jinja2 +packaging==24.0 + # via sphinx +protobuf==4.25.3 + # via google-api-core + # via googleapis-common-protos +pyasn1==0.5.1 + # via pyasn1-modules + # via rsa +pyasn1-modules==0.3.0 + # via google-auth +pydantic==2.6.4 + # via labelbox +pydantic-core==2.16.3 + # via pydantic +pygments==2.17.2 + # via sphinx +python-dateutil==2.8.2 + # via labelbox +pytz==2024.1 + # via babel +requests==2.31.0 + # via google-api-core + # via labelbox + # via sphinx +rsa==4.9 + # via google-auth +six==1.16.0 + # via python-dateutil +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.1.2 + # via sphinx-rtd-theme + # via sphinxcontrib-jquery +sphinx-multiproject==1.0.0rc1 +sphinx-rtd-theme==2.0.0 +sphinxcontrib-applehelp==1.0.4 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==2.0.1 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.5 + # via sphinx +strenum==0.4.15 + # via labelbox +tqdm==4.66.2 + # via labelbox +typing-extensions==4.10.0 + # via annotated-types + # via pydantic + # via pydantic-core +urllib3==2.2.1 + # via requests +zipp==3.18.1 + # via importlib-metadata diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ba225c8a7..000000000 --- a/requirements.txt +++ /dev/null @@ -1,19 +0,0 @@ -geojson -google-api-core>=1.22.1 -imagesize -nbconvert~=7.2.6 -nbformat~=5.7.0 -opencv-python-headless -PILLOW -pydantic>=1.8 -pygeotile -pyproj -pytest-xdist -python-dateutil>=2.8.2,<2.9.0 -requests==2.31.0 -shapely -tqdm -typeguard==2.13.3 -typing-extensions==4.10.0 -numpy -StrEnum \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index d07a97bbb..000000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -import setuptools - -with open('labelbox/__init__.py') as fid: - for line in fid: - if line.startswith('__version__'): - SDK_VERSION = line.strip().split()[-1][1:-1] - break - -with open("README.md", "r") as fh: - long_description = fh.read() - -setuptools.setup( - name="labelbox", - version=SDK_VERSION, - author="Labelbox", - author_email="engineering@labelbox.com", - description="Labelbox Python API", - long_description=long_description, - long_description_content_type="text/markdown", - url="https://labelbox.com", - packages=setuptools.find_packages(), - install_requires=[ - "requests>=2.22.0", "google-api-core>=1.22.1", "pydantic>=1.8", "tqdm", - "python-dateutil>=2.8.2,<2.9.0", "strenum>=0.4.15" - ], - extras_require={ - 'data': [ - "shapely", "geojson", "numpy", "PILLOW", "opencv-python", - "typeguard", "imagesize", "pyproj", "pygeotile", - "typing-extensions", "packaging" - ], - }, - classifiers=[ - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: 3.12', - ], - python_requires='>=3.8', - keywords=["labelbox"], -) diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 7466d3515..000000000 --- a/tox.ini +++ /dev/null @@ -1,27 +0,0 @@ -# content of: tox.ini , put in same dir as setup.py -[tox] -envlist = py38, py39, py310, py311, py312 - -[testenv] -# install pytest in the virtualenv where commands will be executed -deps = - -rrequirements.txt - pytest - pytest-cases - pytest-rerunfailures - pytest-snapshot - nbconvert - nbformat -passenv = - LABELBOX_TEST_ENVIRON - LABELBOX_TEST_API_KEY_PROD - LABELBOX_TEST_API_KEY_STAGING - LABELBOX_TEST_API_KEY_LOCAL - LABELBOX_TEST_API_KEY_ONPREM - LABELBOX_TEST_API_KEY_CUSTOM - LABELBOX_TEST_GRAPHQL_API_ENDPOINT - LABELBOX_TEST_REST_API_ENDPOINT - LABELBOX_TEST_API_KEY - DA_GCP_LABELBOX_API_KEY - -commands = pytest {posargs} From 68d47aeac41a3a5eafe647924fdece4bdc38d81b Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Wed, 3 Apr 2024 13:49:45 -0700 Subject: [PATCH 2/6] always create build artifacts --- .github/workflows/python-package-develop.yml | 20 +++++++++++++++++--- Dockerfile | 5 ----- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-package-develop.yml b/.github/workflows/python-package-develop.yml index 8eed1fa93..2d0b515df 100644 --- a/.github/workflows/python-package-develop.yml +++ b/.github/workflows/python-package-develop.yml @@ -81,8 +81,7 @@ jobs: packages-dir: dist/ repository-url: https://test.pypi.org/legacy/ test-container: - runs-on: ubuntu-latest - if: github.event == 'push' + runs-on: ubuntu-latest needs: ['build'] env: CONTAINER_IMAGE: "ghcr.io/${{ github.repository }}" @@ -101,7 +100,8 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Build and push + - name: Build and push (Develop) + if: github.event == 'push' uses: docker/build-push-action@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -113,4 +113,18 @@ jobs: tags: | ${{ env.CONTAINER_IMAGE }}:develop + ${{ env.CONTAINER_IMAGE }}:${{ github.sha }} + + - name: Build and push (Pull Request) + if: github.event == 'pull_request' + uses: docker/build-push-action@v5 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + push: true + + platforms: | + linux/amd64 + linux/arm64 + + tags: | ${{ env.CONTAINER_IMAGE }}:${{ github.sha }} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 41e55028b..162d5654d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,10 +16,6 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins make \ && rm -rf /var/lib/apt/lists/* -<<<<<<< HEAD -RUN python setup.py install -CMD tox -e py -- tests/integration tests/data -======= RUN groupadd --gid 1000 python && \ useradd --uid 1000 --gid python --shell /bin/bash --create-home python @@ -37,4 +33,3 @@ RUN rye config --set-bool behavior.global-python=true && \ rye sync CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data ->>>>>>> 6d9cf45c (Initial move) From 81ee7797afc837e75ab08ba1a0688a12f2a7d578 Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Fri, 5 Apr 2024 16:46:12 -0700 Subject: [PATCH 3/6] remove pytest ini --- Dockerfile | 2 +- pytest.ini | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 pytest.ini diff --git a/Dockerfile b/Dockerfile index 162d5654d..790f3d14f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,4 +32,4 @@ RUN rye config --set-bool behavior.global-python=true && \ rye pin 3.8 && \ rye sync -CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data +CMD cd libs/labelbox && rye run integration && rye sync -f --features labelbox/data && rye run unit && rye run data \ No newline at end of file diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index f52192758..000000000 --- a/pytest.ini +++ /dev/null @@ -1,6 +0,0 @@ -[pytest] -pythonpath = . -addopts = -rP -vvv --reruns 2 --reruns-delay 10 --durations=20 -n 10 -markers = - slow: marks tests as slow (deselect with '-m "not slow"') - From 725533ff9d97b60afee6c3adcafed4eb4551333d Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Fri, 5 Apr 2024 18:27:19 -0700 Subject: [PATCH 4/6] fix --- .../tests/data/annotation_import/test_label_import.py | 10 ++++++---- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libs/labelbox/tests/data/annotation_import/test_label_import.py b/libs/labelbox/tests/data/annotation_import/test_label_import.py index ddc63d3e0..b0d50ac5d 100644 --- a/libs/labelbox/tests/data/annotation_import/test_label_import.py +++ b/libs/labelbox/tests/data/annotation_import/test_label_import.py @@ -69,8 +69,9 @@ def test_create_from_objects(client, configured_project, object_predictions, label_import.input_file_url, object_predictions) -def test_create_with_path_arg(client, tmp_path, project, object_predictions, +def test_create_with_path_arg(client, tmp_path, configured_project, object_predictions, annotation_import_test_helpers): + project = configured_project name = str(uuid.uuid4()) file_name = f"{name}.ndjson" file_path = tmp_path / file_name @@ -88,18 +89,19 @@ def test_create_with_path_arg(client, tmp_path, project, object_predictions, label_import.input_file_url, object_predictions) -def test_create_from_local_file(client, tmp_path, project, object_predictions, +def test_create_from_local_file(client, tmp_path, configured_project, object_predictions, annotation_import_test_helpers): + project = configured_project name = str(uuid.uuid4()) file_name = f"{name}.ndjson" file_path = tmp_path / file_name with file_path.open("w") as f: parser.dump(object_predictions, f) - label_import = LabelImport.create_from_url(client=client, + label_import = LabelImport.create_from_file(client=client, project_id=project.uid, name=name, - url=str(file_path)) + path=str(file_path)) assert label_import.parent_id == project.uid annotation_import_test_helpers.check_running_state(label_import, name) diff --git a/pyproject.toml b/pyproject.toml index 7a2de03ee..84e61793e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dev-dependencies = [ members = ["libs/*"] [tool.pytest.ini_options] -addopts = "-rP -vvv --reruns 5 --reruns-delay 10 --durations=20 -n auto --cov=labelbox --import-mode=importlib" +addopts = "-rP -vvv --reruns 0 --reruns-delay 10 --durations=20 -n auto --cov=labelbox --import-mode=importlib" markers = """ slow: marks tests as slow (deselect with '-m "not slow"') """ From ebd7c29fee0e7cb54e4cbc5b023fdbe641abd3e6 Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Fri, 5 Apr 2024 18:31:58 -0700 Subject: [PATCH 5/6] fix --- .github/workflows/publish.yaml | 80 ------------------- .github/workflows/publish.yml | 10 +++ .github/workflows/python-package-develop.yml | 8 +- .github/workflows/python-package-shared.yml | 4 +- .../test_mal_prediction_import.py | 3 +- pyproject.toml | 2 +- 6 files changed, 17 insertions(+), 90 deletions(-) delete mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 233c1d644..000000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,80 +0,0 @@ -name: Publish Python Package - -on: - workflow_dispatch: - inputs: - tag: - description: 'Release Tag' - required: true - -jobs: - test-prod: - strategy: - fail-fast: false - matrix: - include: - - python-version: 3.8 - api-key: PROD_LABELBOX_API_KEY_2 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.9 - api-key: PROD_LABELBOX_API_KEY_3 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: "3.10" - api-key: PROD_LABELBOX_API_KEY_4 - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.11 - api-key: LABELBOX_API_KEY - da-test-key: DA_GCP_LABELBOX_API_KEY - - python-version: 3.12 - api-key: PROD_LABELBOX_API_KEY_5 - da-test-key: DA_GCP_LABELBOX_API_KEY - uses: ./.github/workflows/python-package-shared.yml - with: - python-version: ${{ matrix.python-version }} - api-key: ${{ matrix.api-key }} - da-test-key: ${{ matrix.da-test-key }} - fixture-profile: false - test-env: 'prod' - secrets: inherit - build: - # needs: ['test-prod'] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - tag: ${{ inputs.tag }} - - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel - - - name: Build - run: | - python setup.py sdist bdist_wheel - - - uses: actions/upload-artifact@v4 - with: - path: ./dist - - pypi-publish: - needs: ['build'] - environment: - name: publish - url: 'https://pypi.org/project/labelbox/' - runs-on: ubuntu-latest - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write - steps: - - uses: actions/download-artifact@v4 - - - name: Publish package distributions to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: artifact/ - -# Note that the build and pypi-publish jobs are split so that the additional permissions are only granted to the pypi-publish job. diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index d1f74dfd4..9b2345f79 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,6 +6,15 @@ on: tag: description: 'Release Tag' required: true + skip-tests: + description: 'Skip PROD Test (Do not do this unless there is an emergency)' + default: 'false' + required: true + type: choice + options: + - false + - true + concurrency: group: ${{ github.workflow }} @@ -43,6 +52,7 @@ jobs: name: build path: ./dist test-build: + if: ${{ inputs.skip-tests }} != "true" needs: ['build'] runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/python-package-develop.yml b/.github/workflows/python-package-develop.yml index 2d0b515df..dafbc3fba 100644 --- a/.github/workflows/python-package-develop.yml +++ b/.github/workflows/python-package-develop.yml @@ -3,12 +3,8 @@ name: Labelbox Python SDK Staging (Develop) on: push: branches: [develop] - #paths: - # - 'libs/**' pull_request: branches: [develop] - #paths: - # - 'libs/**' concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -101,7 +97,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push (Develop) - if: github.event == 'push' + if: github.event_name == 'push' uses: docker/build-push-action@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} @@ -116,7 +112,7 @@ jobs: ${{ env.CONTAINER_IMAGE }}:${{ github.sha }} - name: Build and push (Pull Request) - if: github.event == 'pull_request' + if: github.event_name == 'pull_request' uses: docker/build-push-action@v5 with: github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-package-shared.yml b/.github/workflows/python-package-shared.yml index ceaeaa0be..16115bfdb 100644 --- a/.github/workflows/python-package-shared.yml +++ b/.github/workflows/python-package-shared.yml @@ -50,7 +50,7 @@ jobs: python-version: ${{ inputs.python-version }} - name: Integration Testing env: - PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + PYTEST_XDIST_AUTO_NUM_WORKERS: 20 LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }} DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }} LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }} @@ -69,7 +69,7 @@ jobs: python-version: ${{ inputs.python-version }} - name: Unit && Data Testing env: - PYTEST_XDIST_AUTO_NUM_WORKERS: 32 + PYTEST_XDIST_AUTO_NUM_WORKERS: 20 LABELBOX_TEST_API_KEY: ${{ secrets[inputs.api-key] }} DA_GCP_LABELBOX_API_KEY: ${{ secrets[inputs.da-test-key] }} LABELBOX_TEST_ENVIRON: ${{ inputs.test-env }} diff --git a/libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py b/libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py index c261f7065..922e24364 100644 --- a/libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py +++ b/libs/labelbox/tests/data/annotation_import/test_mal_prediction_import.py @@ -39,8 +39,9 @@ def test_create_with_labels_arg(client, configured_project, object_predictions, label_import.input_file_url, object_predictions) -def test_create_with_path_arg(client, tmp_path, project, object_predictions, +def test_create_with_path_arg(client, tmp_path, configured_project, object_predictions, annotation_import_test_helpers): + project = configured_project name = str(uuid.uuid4()) file_name = f"{name}.ndjson" file_path = tmp_path / file_name diff --git a/pyproject.toml b/pyproject.toml index 84e61793e..ecd80c176 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,7 +32,7 @@ dev-dependencies = [ members = ["libs/*"] [tool.pytest.ini_options] -addopts = "-rP -vvv --reruns 0 --reruns-delay 10 --durations=20 -n auto --cov=labelbox --import-mode=importlib" +addopts = "-rP -vvv --reruns 2 --reruns-delay 10 --durations=20 -n auto --cov=labelbox --import-mode=importlib" markers = """ slow: marks tests as slow (deselect with '-m "not slow"') """ From 9b710b41a48b469e709712e54d2b13f926748ed2 Mon Sep 17 00:00:00 2001 From: Adrian Chang Date: Fri, 5 Apr 2024 23:12:15 -0700 Subject: [PATCH 6/6] reduce workers --- CONTRIBUTING.md | 109 ++++++++++++--------------------------- README.md | 10 +++- docs/logo-full-black.svg | 6 +++ libs/labelbox/README.md | 67 +++++++++++++++++++++++- 4 files changed, 113 insertions(+), 79 deletions(-) create mode 100644 docs/logo-full-black.svg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fcf917f67..779375d46 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,101 +1,70 @@ -# Labelbox Python SDK Contribution Guide +# Contribution Guide + +The repository is laid out as a monorepo where each moudle in the monorepo lives as a folder in `libs/`. Each module should have a `README.md` describing the specific purpose of the module and its development requirements. + +This is a general guide applicable to all modules in the repository. ## Table of Contents -- [Contribution Guidelines](#contribution-guidelines) -- [Branches](#branches) + +- [General Guidelines](#general-guidelines) +- [Branches](#branches-and-tags) - [Release Steps](#release-steps) - [Jupyter Notebooks](#jupyter-notebooks) -- [Contribution Prerequisites](#contribution-prerequisites) -- [Building Locally](#building-locally) +- [General Prerequisites](#general-prerequisites) +- [Setup and Building](#setup-and-building) - [Testing](#testing) -## Contribution Guidelines -Thank you for expressing your interest in contributing to the SDK. To ensure that your contribution aligns with our guidelines, please carefully review the following before proceeding: +## General Guidelines + +Thank you for expressing your interest in contributing! To ensure that your contribution aligns with our guidelines, please carefully review the following before proceeding: * For feature requests, we recommend consulting with [Labelbox Support](https://docs.labelbox.com/docs/contacting-customer-support) support or creating a [Github Issue](https://github.com/Labelbox/labelbox-python/issues). -* We can only accept general solutions that address common issues rather than solutions designed for specific use cases. Example contributions include bug fixes and dependency upgrades. -* Please ensure that any new libraries are compliant with the Apache license that governs the SDK. -* Ensure that you update any relevant docstrings and comments within your code. -* Ensure that any new Python components, such as classes, packages, or methods, that need to feature in the Labelbox documentation have entries in the file [index.rst](https://github.com/Labelbox/labelbox-python/blob/develop/docs/source/index.rst). Also, make sure you run `make html` locally in the `docs` folder to check if the documentation is correctly updated according to the docstrings in the code added. +* We can only accept general solutions that address common issues rather than solutions designed for specific use cases. Example contributions encompass a wide range of activities, such as bug fixes and updates to dependencies. +* Ensure that any new libraries added are compliant with the Apache license that governs the repository. +* Ensure that you update any relevant docstrings and comments within the code you may add or change. +* Ensure that any new Python components, such as classes, packages, or methods, that need to feature in the Labelbox documentation have entries in the file [index.rst](https://github.com/Labelbox/labelbox-python/blob/develop/docs/source/index.rst). + +## Branches and Tags -## Branches * All development happens in per-feature branches prefixed by contributor's initials. For example `fs/feature_name`. * Approved PRs are merged to the `develop` branch. -* The `develop` branch is merged to `master` on each release. ## Release Steps -Please consult the [Labelbox](https://docs.labelbox.com/docs/contacting-customer-support) team for releasing your contributions. -## Contribution Prerequisites +Your contributions will be released as soon as it is approved and merged into the `develop` branch. Please consult the [Labelbox](https://docs.labelbox.com/docs/contacting-customer-support) team for if you need a more specific timeframe of when your contributions may be released. -The SDK repository is laid out as a monorepo in `libs/`. Each module under `libs/` should describe the purpose of the module and specific development requirements. +## General Prerequisites -The tool that is being used to manage the monorepo is [Rye](https://rye-up.com/) which means you need to install it before contributing or building any of them locally. +[Rye](https://rye-up.com/) must be installed before contributing to the repository as it is the tool used to managed the repository. -To understand why Rye was chosen, see [here](https://alpopkes.com/posts/python/packaging_tools/). TLDR: Environment, Package, Python, management along with Package publishing and Package building is unified under a single tool for consistency of environment for SDK development. +To understand why Rye was chosen, see [here](https://alpopkes.com/posts/python/packaging_tools/). TLDR: Environment, Package, Python, management along with Package publishing and Package building is unified under a single tool for consistency of development. -If you want to not deal with setting up `Rye` on your local machine directly, feel free to use one of [Docker containers](https://github.com/Labelbox/labelbox-python/pkgs/container/labelbox-python) we have built which contains the entire SDK with `Rye` setup for you already. +If you want to not deal with setting up `Rye`, feel free to use one of [Docker containers](https://github.com/Labelbox/labelbox-python/pkgs/container/labelbox-python) Labelbox has built which contains the entire with `Rye` setup. **You can use Poetry to manage the virtual environment.** There's nothing blocking you from using Poetry to manage the virtual environment as the standard `pyproject.toml` format is used, but you'll have to deal with managing Python yourself + be asked not to check in any `poetry.lock` files. Also, you'll have to run equivalent poetry commands that may not be listed in the documentation to perform the same general operations (testing, building, etc.). -## Building Locally +## Setup and Building -These are general steps that all modules in `libs/` adhere to give the prerequisite of the installation of `Rye`. +These are general steps that all modules in `libs/` adhere to given the prerequisite of the installation of `Rye` that are needed to setup a module for development and build it. -1. Run `rye sync` in the module folder you want to work on (EG `rye sync --all-features` to work on `labelbox`). -2. Run `rye build` to create a distribution in `dist/` which you can install into a Python environment (EG `pip install dist/labelbox-build.tar.gz`). +* `rye sync` in the module folder you want to work on (EG `rye sync --all-features` to work on `labelbox`). +* `rye build` to create a distribution in `dist/` which you can install into a Python environment (EG `pip install dist/labelbox-build.tar.gz`). -It is generally **not** recommended to do `pip install -e .` with any Labelbox module to avoid virtual environment pollution. If you really want to modify the SDK while making it compatible with your existing `pip` based projects, use the method listed above. +It is generally **not** recommended to do `pip install -e .` with any Labelbox module to avoid virtual environment pollution. If you want to modify any module while making it compatible with your existing `pip` based projects, build a distribution and install it in your `pip` environment. ## Testing -Each module within the repository will generally have three components to testing: unit testing, integration testing, and linting/formatting. - -### Unit Testing +Each module within the repository will generally expected to implement three commands for testing: unit testing, integration testing, and linting/formatting. See the details in each module's `README.md` for more information. ```bash rye run unit -``` - -### Integration Testing - -```bash -LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run integration -``` -For more info on how to get a `LABELBOX_TEST_API_KEY` [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started). - -**Integration tests by default will run against your account that you provide an API Key from and modify its data. If you want to run integration tests, without it impacting your existing account, create an additional account using a secondary e-mail on [Labelbox](https://labelbox.com). Free accounts are sufficent for integration testing purposes.** - -You can also use a `.env` file if you prefer instead of needing to type out the environmental overrides every single time you want to run commands. Please add a `--env-file` parameter to the test command (EG `rye --env-file=.env run integration`). - -### (Optional) Data Testing - -For testing the impact of the extra installs included with `labelbox[data]`, run the following: - -```bash -LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run data -``` - -By default `rye sync` does not install the extra packages needed in `labelbox[data]`. You'll need to run `rye sync --all-features`. Do not checkin `requirements.lock` or `requirements-dev.lock` after doing this. - -### Linting / Formatting - -Before making a commit, to automatically adhere to our formatting standards, it is recommended to install and activate [pre-commit](https://pre-commit.com/) -```shell -pip install pre-commit -pre-commit install -``` -After the above, running `git commit ...` will attempt to fix formatting, -and make necessary changes to files. You will then need to stage those files again. - -You may also manually format your code by running the following: -```bash +rye run integration rye run lint ``` -### Documentation +## Documentation -To generate `ReadTheDocs,` run the following command. +To generate documentation for all modules (`ReadTheDocs`), run the following command. ```bash rye run docs @@ -114,14 +83,4 @@ c.InteractiveShellApp.exec_lines = [ 'import sys; sys.path.insert(0, "")' ] ``` -4. Go to the root of your project and run `jupyter notebook` to start the server - - - - - - - - - - +4. Go to the root of your project and run `jupyter notebook` to start the server \ No newline at end of file diff --git a/README.md b/README.md index ad8bcb2ce..be795d9d0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -# Labelbox Python SDK +

+ +

+ [![Release Notes](https://img.shields.io/github/release/labelbox/labelbox-python)](https://github.com/Labelbox/labelbox-python/releases) [![CI](https://github.com/Labelbox/labelbox-python/actions/workflows/python-package-develop.yaml/badge.svg)](https://github.com/Labelbox/labelbox-python/actions/workflows/python-package-develop.yaml) [![Downloads](https://pepy.tech/badge/labelbox)](https://pepy.tech/project/labelbox) @@ -10,7 +13,10 @@ [![LinkedIn Follow](https://img.shields.io/badge/Follow-LinkedIn-blue.svg?style=flat&logo=linkedin)](https://www.linkedin.com/company/labelbox/) [![Supported Python Versions](https://img.shields.io/pypi/pyversions/labelbox)](https://img.shields.io/pypi/pyversions/labelbox) -Labelbox is focused on building a data-centric AI platform for enterprises to develop, optimize, and use AI to solve problems and power new products and services. + +# Labelbox + +Labelbox is a data-centric AI platform for enterprises to develop, optimize, and use AI to solve problems and power new products and services. Enterprises use Labelbox to curate data, generate high-quality human feedback data for computer vision and LLMs, evaluate model performance, and automate tasks by combining AI and human-centric workflows. The academic & research community uses Labelbox for cutting-edge AI research. diff --git a/docs/logo-full-black.svg b/docs/logo-full-black.svg new file mode 100644 index 000000000..60302dad2 --- /dev/null +++ b/docs/logo-full-black.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/libs/labelbox/README.md b/libs/labelbox/README.md index 35153dbf0..25dbb2cca 100644 --- a/libs/labelbox/README.md +++ b/libs/labelbox/README.md @@ -1,7 +1,18 @@ # Labelbox -Core mono-module for Labelbox's SDK. For full detailed information, -please go to Labelbox's [Github Page](https://github.com/Labelbox/labelbox-python). +Core mono-module for Labelbox's Python SDK. + +## Table of Contents + +- [Setup](#setup) +- [Repository Organization](#repository-organization) +- [Testing](#testing) + +## Setup + +```bash +rye sync --all-features # to install labelbox[data] dependencies +``` ## Repository Organization @@ -23,3 +34,55 @@ following packages/modules: * `pagination.py` contains support for paginated relationship and collection fetching. * `utils.py` contains utility functions. + +## Testing + +### Unit Testing + +```bash +rye run unit +``` + +### Integration Testing + +```bash +LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run integration +``` +For more info on how to get a `LABELBOX_TEST_API_KEY` [Labelbox API key docs](https://labelbox.helpdocs.io/docs/api/getting-started). + +**Integration tests by default will run against your account that you provide an API Key from and modify its data. If you want to run integration tests, without it impacting your existing account, create an additional account using a secondary e-mail on [Labelbox](https://labelbox.com). Free accounts are sufficent for integration testing purposes.** + +You can also use a `.env` file if you prefer instead of needing to type out the environmental overrides every single time you want to run commands. Please add a `--env-file` parameter to the test command (EG `rye --env-file=.env run integration`). + +### (Optional) Data Testing + +For testing the impact of the extra installs included with `labelbox[data]`, run the following: + +```bash +LABELBOX_TEST_API_KEY="YOUR_API_TEST_KEY" LABELBOX_TEST_ENVIRON="prod" rye run data +``` + +By default `rye sync` does not install the extra packages needed in `labelbox[data]`. You'll need to run `rye sync --all-features`. Do not checkin `requirements.lock` or `requirements-dev.lock` after doing this. + +### Linting / Formatting + +Before making a commit, to automatically adhere to our formatting standards, it is recommended to install and activate [pre-commit](https://pre-commit.com/) +```shell +pip install pre-commit +pre-commit install +``` +After the above, running `git commit ...` will attempt to fix formatting, +and make necessary changes to files. You will then need to stage those files again. + +You may also manually format your code by running the following: +```bash +rye run lint +``` + +### Documentation + +To generate documentation for all modules (`ReadTheDocs`), run the following command. + +```bash +rye run docs +``` \ No newline at end of file