From b8a2a6996c0b45386b80dba7d70cdf2da05d660e Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Tue, 3 Feb 2026 23:24:47 +0900 Subject: [PATCH] refactor: reorganize project structure and update module imports (#2112) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: reorganize project structure and update module imports * configure setuptools to use 'src' layout and adjust package discovery * refactor: move tests to `tests` directory and update imports accordingly * update lint and mypy configurations to align with `src` and `tests` structure * update test imports to use corrected `tests.helpers` module path * fix(pre_commit): 🎨 auto format pre-commit hooks --- .github/workflows/ci-tests.yml | 2 +- pyproject.toml | 24 ++++++++++-------- {supervision => src/supervision}/__init__.py | 0 .../supervision}/annotators/__init__.py | 0 .../supervision}/annotators/base.py | 0 .../supervision}/annotators/core.py | 0 .../supervision}/annotators/utils.py | 0 .../supervision}/assets/__init__.py | 0 .../supervision}/assets/downloader.py | 0 .../supervision}/assets/list.py | 0 .../supervision}/classification/__init__.py | 0 .../supervision}/classification/core.py | 0 {supervision => src/supervision}/config.py | 0 .../supervision}/dataset/__init__.py | 0 .../supervision}/dataset/core.py | 0 .../supervision}/dataset/formats/__init__.py | 0 .../supervision}/dataset/formats/coco.py | 0 .../dataset/formats/pascal_voc.py | 0 .../supervision}/dataset/formats/yolo.py | 0 .../supervision}/dataset/utils.py | 0 .../supervision}/detection/__init__.py | 0 .../supervision}/detection/core.py | 0 .../supervision}/detection/line_zone.py | 0 .../supervision}/detection/tools/__init__.py | 0 .../supervision}/detection/tools/csv_sink.py | 0 .../detection/tools/inference_slicer.py | 0 .../supervision}/detection/tools/json_sink.py | 0 .../detection/tools/polygon_zone.py | 0 .../supervision}/detection/tools/smoother.py | 0 .../detection/tools/transformers.py | 0 .../supervision}/detection/utils/__init__.py | 0 .../supervision}/detection/utils/boxes.py | 0 .../detection/utils/converters.py | 0 .../supervision}/detection/utils/internal.py | 0 .../detection/utils/iou_and_nms.py | 0 .../supervision}/detection/utils/masks.py | 0 .../supervision}/detection/utils/polygons.py | 0 .../supervision}/detection/utils/vlms.py | 0 .../supervision}/detection/vlm.py | 0 .../supervision}/draw/__init__.py | 0 {supervision => src/supervision}/draw/base.py | 0 .../supervision}/draw/color.py | 0 .../supervision}/draw/utils.py | 0 .../supervision}/geometry/__init__.py | 0 .../supervision}/geometry/core.py | 0 .../supervision}/geometry/utils.py | 0 .../supervision}/key_points/__init__.py | 0 .../supervision}/key_points/annotators.py | 0 .../supervision}/key_points/core.py | 0 .../supervision}/key_points/skeletons.py | 0 .../supervision}/metrics/__init__.py | 0 .../supervision}/metrics/core.py | 0 .../supervision}/metrics/detection.py | 0 .../supervision}/metrics/f1_score.py | 0 .../metrics/mean_average_precision.py | 0 .../metrics/mean_average_recall.py | 0 .../supervision}/metrics/precision.py | 0 .../supervision}/metrics/recall.py | 0 .../supervision}/metrics/utils/__init__.py | 0 .../supervision}/metrics/utils/object_size.py | 0 .../supervision}/metrics/utils/utils.py | 0 {supervision => src/supervision}/py.typed | 0 .../supervision}/tracker/__init__.py | 0 .../tracker/byte_tracker/__init__.py | 0 .../supervision}/tracker/byte_tracker/core.py | 0 .../tracker/byte_tracker/kalman_filter.py | 0 .../tracker/byte_tracker/matching.py | 0 .../byte_tracker/single_object_track.py | 0 .../tracker/byte_tracker/utils.py | 0 .../supervision}/utils/__init__.py | 0 .../supervision}/utils/conversion.py | 0 .../supervision}/utils/file.py | 0 .../supervision}/utils/image.py | 0 .../supervision}/utils/internal.py | 0 .../supervision}/utils/iterables.py | 0 .../supervision}/utils/notebook.py | 0 .../supervision}/utils/video.py | 0 .../supervision}/validators/__init__.py | 0 {test => tests}/__init__.py | 0 {test => tests}/annotators/__init__.py | 0 {test => tests}/annotators/test_core.py | 2 +- {test => tests}/annotators/test_utils.py | 2 +- {test => tests}/assets/__init__.py | 0 {test => tests}/assets/test_downloader.py | 0 {test => tests}/assets/test_list.py | 0 {test => tests}/classification/__init__.py | 0 {test => tests}/classification/test_core.py | 0 {test => tests}/conftest.py | 2 +- {test => tests}/dataset/__init__.py | 0 {test => tests}/dataset/formats/__init__.py | 0 {test => tests}/dataset/formats/test_coco.py | 0 .../dataset/formats/test_pascal_voc.py | 2 +- {test => tests}/dataset/formats/test_yolo.py | 0 {test => tests}/dataset/test_core.py | 2 +- {test => tests}/dataset/test_utils.py | 2 +- {test => tests}/detection/__init__.py | 0 {test => tests}/detection/test_core.py | 2 +- {test => tests}/detection/test_csv.py | 2 +- .../detection/test_from_adapters.py | 2 +- {test => tests}/detection/test_json.py | 2 +- .../detection/test_line_counter.py | 2 +- .../detection/test_polygon_zone_annotator.py | 0 {test => tests}/detection/test_polygonzone.py | 2 +- {test => tests}/detection/test_vlm.py | 0 .../detection/tools/test_inference_slicer.py | 0 {test => tests}/detection/utils/__init__.py | 0 {test => tests}/detection/utils/test_boxes.py | 0 .../detection/utils/test_converters.py | 0 .../detection/utils/test_internal.py | 0 .../detection/utils/test_iou_and_nms.py | 2 +- {test => tests}/detection/utils/test_masks.py | 0 .../detection/utils/test_polygons.py | 0 {test => tests}/detection/utils/test_vlms.py | 0 {test => tests}/draw/__init__.py | 0 {test => tests}/draw/test_color.py | 0 {test => tests}/geometry/__init__.py | 0 {test => tests}/geometry/test_core.py | 0 {test => tests}/geometry/test_utils.py | 0 {test => tests}/helpers.py | 4 --- {test => tests}/key_points/__init__.py | 0 {test => tests}/key_points/test_annotators.py | 2 +- {test => tests}/key_points/test_core.py | 2 +- {test => tests}/key_points/test_skeletons.py | 0 {test => tests}/metrics/__init__.py | 0 {test => tests}/metrics/conftest.py | 0 {test => tests}/metrics/test_detection.py | 2 +- {test => tests}/metrics/test_f1_score.py | 2 +- .../metrics/test_mean_average_precision.py | 0 .../test_mean_average_precision_area.py | 0 {test => tests}/metrics/test_precision.py | 0 {test => tests}/metrics/test_recall.py | 2 +- {test => tests}/tracker/__init__.py | 0 {test => tests}/tracker/test_byte_tracker.py | 0 {test => tests}/utils/__init__.py | 0 {test => tests}/utils/assets/1.jpg | Bin {test => tests}/utils/assets/2.jpg | Bin {test => tests}/utils/assets/3.jpg | Bin {test => tests}/utils/assets/4.jpg | Bin {test => tests}/utils/assets/5.jpg | Bin .../utils/assets/all_images_tile.png | Bin .../all_images_tile_and_custom_colors.png | Bin ...ages_tile_and_custom_colors_and_titles.png | Bin .../all_images_tile_and_custom_grid.png | Bin ...es_tile_and_titles_with_custom_configs.png | Bin .../utils/assets/four_images_tile.png | Bin .../utils/assets/single_image_tile.png | Bin .../single_image_tile_enforced_grid.png | Bin .../utils/assets/three_images_tile.png | Bin .../utils/assets/two_images_tile.png | Bin {test => tests}/utils/conftest.py | 0 {test => tests}/utils/test_conversion.py | 0 {test => tests}/utils/test_file.py | 0 {test => tests}/utils/test_image.py | 0 {test => tests}/utils/test_internal.py | 0 {test => tests}/utils/test_iterables.py | 0 {test => tests}/utils/test_video.py | 0 156 files changed, 32 insertions(+), 34 deletions(-) rename {supervision => src/supervision}/__init__.py (100%) rename {supervision => src/supervision}/annotators/__init__.py (100%) rename {supervision => src/supervision}/annotators/base.py (100%) rename {supervision => src/supervision}/annotators/core.py (100%) rename {supervision => src/supervision}/annotators/utils.py (100%) rename {supervision => src/supervision}/assets/__init__.py (100%) rename {supervision => src/supervision}/assets/downloader.py (100%) rename {supervision => src/supervision}/assets/list.py (100%) rename {supervision => src/supervision}/classification/__init__.py (100%) rename {supervision => src/supervision}/classification/core.py (100%) rename {supervision => src/supervision}/config.py (100%) rename {supervision => src/supervision}/dataset/__init__.py (100%) rename {supervision => src/supervision}/dataset/core.py (100%) rename {supervision => src/supervision}/dataset/formats/__init__.py (100%) rename {supervision => src/supervision}/dataset/formats/coco.py (100%) rename {supervision => src/supervision}/dataset/formats/pascal_voc.py (100%) rename {supervision => src/supervision}/dataset/formats/yolo.py (100%) rename {supervision => src/supervision}/dataset/utils.py (100%) rename {supervision => src/supervision}/detection/__init__.py (100%) rename {supervision => src/supervision}/detection/core.py (100%) rename {supervision => src/supervision}/detection/line_zone.py (100%) rename {supervision => src/supervision}/detection/tools/__init__.py (100%) rename {supervision => src/supervision}/detection/tools/csv_sink.py (100%) rename {supervision => src/supervision}/detection/tools/inference_slicer.py (100%) rename {supervision => src/supervision}/detection/tools/json_sink.py (100%) rename {supervision => src/supervision}/detection/tools/polygon_zone.py (100%) rename {supervision => src/supervision}/detection/tools/smoother.py (100%) rename {supervision => src/supervision}/detection/tools/transformers.py (100%) rename {supervision => src/supervision}/detection/utils/__init__.py (100%) rename {supervision => src/supervision}/detection/utils/boxes.py (100%) rename {supervision => src/supervision}/detection/utils/converters.py (100%) rename {supervision => src/supervision}/detection/utils/internal.py (100%) rename {supervision => src/supervision}/detection/utils/iou_and_nms.py (100%) rename {supervision => src/supervision}/detection/utils/masks.py (100%) rename {supervision => src/supervision}/detection/utils/polygons.py (100%) rename {supervision => src/supervision}/detection/utils/vlms.py (100%) rename {supervision => src/supervision}/detection/vlm.py (100%) rename {supervision => src/supervision}/draw/__init__.py (100%) rename {supervision => src/supervision}/draw/base.py (100%) rename {supervision => src/supervision}/draw/color.py (100%) rename {supervision => src/supervision}/draw/utils.py (100%) rename {supervision => src/supervision}/geometry/__init__.py (100%) rename {supervision => src/supervision}/geometry/core.py (100%) rename {supervision => src/supervision}/geometry/utils.py (100%) rename {supervision => src/supervision}/key_points/__init__.py (100%) rename {supervision => src/supervision}/key_points/annotators.py (100%) rename {supervision => src/supervision}/key_points/core.py (100%) rename {supervision => src/supervision}/key_points/skeletons.py (100%) rename {supervision => src/supervision}/metrics/__init__.py (100%) rename {supervision => src/supervision}/metrics/core.py (100%) rename {supervision => src/supervision}/metrics/detection.py (100%) rename {supervision => src/supervision}/metrics/f1_score.py (100%) rename {supervision => src/supervision}/metrics/mean_average_precision.py (100%) rename {supervision => src/supervision}/metrics/mean_average_recall.py (100%) rename {supervision => src/supervision}/metrics/precision.py (100%) rename {supervision => src/supervision}/metrics/recall.py (100%) rename {supervision => src/supervision}/metrics/utils/__init__.py (100%) rename {supervision => src/supervision}/metrics/utils/object_size.py (100%) rename {supervision => src/supervision}/metrics/utils/utils.py (100%) rename {supervision => src/supervision}/py.typed (100%) rename {supervision => src/supervision}/tracker/__init__.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/__init__.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/core.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/kalman_filter.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/matching.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/single_object_track.py (100%) rename {supervision => src/supervision}/tracker/byte_tracker/utils.py (100%) rename {supervision => src/supervision}/utils/__init__.py (100%) rename {supervision => src/supervision}/utils/conversion.py (100%) rename {supervision => src/supervision}/utils/file.py (100%) rename {supervision => src/supervision}/utils/image.py (100%) rename {supervision => src/supervision}/utils/internal.py (100%) rename {supervision => src/supervision}/utils/iterables.py (100%) rename {supervision => src/supervision}/utils/notebook.py (100%) rename {supervision => src/supervision}/utils/video.py (100%) rename {supervision => src/supervision}/validators/__init__.py (100%) rename {test => tests}/__init__.py (100%) rename {test => tests}/annotators/__init__.py (100%) rename {test => tests}/annotators/test_core.py (99%) rename {test => tests}/annotators/test_utils.py (99%) rename {test => tests}/assets/__init__.py (100%) rename {test => tests}/assets/test_downloader.py (100%) rename {test => tests}/assets/test_list.py (100%) rename {test => tests}/classification/__init__.py (100%) rename {test => tests}/classification/test_core.py (100%) rename {test => tests}/conftest.py (96%) rename {test => tests}/dataset/__init__.py (100%) rename {test => tests}/dataset/formats/__init__.py (100%) rename {test => tests}/dataset/formats/test_coco.py (100%) rename {test => tests}/dataset/formats/test_pascal_voc.py (99%) rename {test => tests}/dataset/formats/test_yolo.py (100%) rename {test => tests}/dataset/test_core.py (99%) rename {test => tests}/dataset/test_utils.py (99%) rename {test => tests}/detection/__init__.py (100%) rename {test => tests}/detection/test_core.py (99%) rename {test => tests}/detection/test_csv.py (99%) rename {test => tests}/detection/test_from_adapters.py (99%) rename {test => tests}/detection/test_json.py (99%) rename {test => tests}/detection/test_line_counter.py (99%) rename {test => tests}/detection/test_polygon_zone_annotator.py (100%) rename {test => tests}/detection/test_polygonzone.py (98%) rename {test => tests}/detection/test_vlm.py (100%) rename {test => tests}/detection/tools/test_inference_slicer.py (100%) rename {test => tests}/detection/utils/__init__.py (100%) rename {test => tests}/detection/utils/test_boxes.py (100%) rename {test => tests}/detection/utils/test_converters.py (100%) rename {test => tests}/detection/utils/test_internal.py (100%) rename {test => tests}/detection/utils/test_iou_and_nms.py (99%) rename {test => tests}/detection/utils/test_masks.py (100%) rename {test => tests}/detection/utils/test_polygons.py (100%) rename {test => tests}/detection/utils/test_vlms.py (100%) rename {test => tests}/draw/__init__.py (100%) rename {test => tests}/draw/test_color.py (100%) rename {test => tests}/geometry/__init__.py (100%) rename {test => tests}/geometry/test_core.py (100%) rename {test => tests}/geometry/test_utils.py (100%) rename {test => tests}/helpers.py (97%) rename {test => tests}/key_points/__init__.py (100%) rename {test => tests}/key_points/test_annotators.py (98%) rename {test => tests}/key_points/test_core.py (99%) rename {test => tests}/key_points/test_skeletons.py (100%) rename {test => tests}/metrics/__init__.py (100%) rename {test => tests}/metrics/conftest.py (100%) rename {test => tests}/metrics/test_detection.py (99%) rename {test => tests}/metrics/test_f1_score.py (99%) rename {test => tests}/metrics/test_mean_average_precision.py (100%) rename {test => tests}/metrics/test_mean_average_precision_area.py (100%) rename {test => tests}/metrics/test_precision.py (100%) rename {test => tests}/metrics/test_recall.py (99%) rename {test => tests}/tracker/__init__.py (100%) rename {test => tests}/tracker/test_byte_tracker.py (100%) rename {test => tests}/utils/__init__.py (100%) rename {test => tests}/utils/assets/1.jpg (100%) rename {test => tests}/utils/assets/2.jpg (100%) rename {test => tests}/utils/assets/3.jpg (100%) rename {test => tests}/utils/assets/4.jpg (100%) rename {test => tests}/utils/assets/5.jpg (100%) rename {test => tests}/utils/assets/all_images_tile.png (100%) rename {test => tests}/utils/assets/all_images_tile_and_custom_colors.png (100%) rename {test => tests}/utils/assets/all_images_tile_and_custom_colors_and_titles.png (100%) rename {test => tests}/utils/assets/all_images_tile_and_custom_grid.png (100%) rename {test => tests}/utils/assets/all_images_tile_and_titles_with_custom_configs.png (100%) rename {test => tests}/utils/assets/four_images_tile.png (100%) rename {test => tests}/utils/assets/single_image_tile.png (100%) rename {test => tests}/utils/assets/single_image_tile_enforced_grid.png (100%) rename {test => tests}/utils/assets/three_images_tile.png (100%) rename {test => tests}/utils/assets/two_images_tile.png (100%) rename {test => tests}/utils/conftest.py (100%) rename {test => tests}/utils/test_conversion.py (100%) rename {test => tests}/utils/test_file.py (100%) rename {test => tests}/utils/test_image.py (100%) rename {test => tests}/utils/test_internal.py (100%) rename {test => tests}/utils/test_iterables.py (100%) rename {test => tests}/utils/test_video.py (100%) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 2bf9b6dd..977b3f8b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -48,7 +48,7 @@ jobs: run: uv run python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)" - name: 🧪 Run the Test - run: uv run pytest --cov=supervision --cov-report=xml --ignore=examples + run: uv run pytest src/ tests/ --cov=supervision --cov-report=xml - name: Generate Coverage Report run: | diff --git a/pyproject.toml b/pyproject.toml index 1be923f5..7b987a21 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -100,8 +100,10 @@ include-package-data = false supervision = [ "py.typed" ] [tool.setuptools.packages.find] +where = [ "src" ] include = [ "supervision*" ] -exclude = [ "docs*", "test*", "examples*" ] + +#exclude = [ "docs*", "tests*", "examples*" ] [tool.ruff] target-version = "py39" @@ -160,10 +162,10 @@ lint.select = [ ] lint.ignore = [ ] lint.per-file-ignores."__init__.py" = [ "E402", "F401" ] -lint.per-file-ignores."supervision/**" = [ +lint.per-file-ignores."src/**" = [ "S101", # TODO: Replace asserts with proper error handling ] -lint.per-file-ignores."test/**" = [ +lint.per-file-ignores."tests/**" = [ "PT011", # TODO: `pytest.raises(Exception)` is too broad, set the `match` parameter or use a more specific exception "S101", # Use of `assert` detected ] @@ -198,17 +200,17 @@ python_version = "3.9" ignore_missing_imports = false explicit_package_bases = true strict = true -exclude = [ - ".github", - "docs", - "test", - "examples", - "setup.py", -] +mypy_path = "src" +#exclude = [ +# "docs", +# "test", +# "examples", +# "setup.py", +#] [[tool.mypy.overrides]] module = [ - "test.*", + "tests.*", "examples.*", # TODO: fix type errors in the following modules "supervision.classification.core", diff --git a/supervision/__init__.py b/src/supervision/__init__.py similarity index 100% rename from supervision/__init__.py rename to src/supervision/__init__.py diff --git a/supervision/annotators/__init__.py b/src/supervision/annotators/__init__.py similarity index 100% rename from supervision/annotators/__init__.py rename to src/supervision/annotators/__init__.py diff --git a/supervision/annotators/base.py b/src/supervision/annotators/base.py similarity index 100% rename from supervision/annotators/base.py rename to src/supervision/annotators/base.py diff --git a/supervision/annotators/core.py b/src/supervision/annotators/core.py similarity index 100% rename from supervision/annotators/core.py rename to src/supervision/annotators/core.py diff --git a/supervision/annotators/utils.py b/src/supervision/annotators/utils.py similarity index 100% rename from supervision/annotators/utils.py rename to src/supervision/annotators/utils.py diff --git a/supervision/assets/__init__.py b/src/supervision/assets/__init__.py similarity index 100% rename from supervision/assets/__init__.py rename to src/supervision/assets/__init__.py diff --git a/supervision/assets/downloader.py b/src/supervision/assets/downloader.py similarity index 100% rename from supervision/assets/downloader.py rename to src/supervision/assets/downloader.py diff --git a/supervision/assets/list.py b/src/supervision/assets/list.py similarity index 100% rename from supervision/assets/list.py rename to src/supervision/assets/list.py diff --git a/supervision/classification/__init__.py b/src/supervision/classification/__init__.py similarity index 100% rename from supervision/classification/__init__.py rename to src/supervision/classification/__init__.py diff --git a/supervision/classification/core.py b/src/supervision/classification/core.py similarity index 100% rename from supervision/classification/core.py rename to src/supervision/classification/core.py diff --git a/supervision/config.py b/src/supervision/config.py similarity index 100% rename from supervision/config.py rename to src/supervision/config.py diff --git a/supervision/dataset/__init__.py b/src/supervision/dataset/__init__.py similarity index 100% rename from supervision/dataset/__init__.py rename to src/supervision/dataset/__init__.py diff --git a/supervision/dataset/core.py b/src/supervision/dataset/core.py similarity index 100% rename from supervision/dataset/core.py rename to src/supervision/dataset/core.py diff --git a/supervision/dataset/formats/__init__.py b/src/supervision/dataset/formats/__init__.py similarity index 100% rename from supervision/dataset/formats/__init__.py rename to src/supervision/dataset/formats/__init__.py diff --git a/supervision/dataset/formats/coco.py b/src/supervision/dataset/formats/coco.py similarity index 100% rename from supervision/dataset/formats/coco.py rename to src/supervision/dataset/formats/coco.py diff --git a/supervision/dataset/formats/pascal_voc.py b/src/supervision/dataset/formats/pascal_voc.py similarity index 100% rename from supervision/dataset/formats/pascal_voc.py rename to src/supervision/dataset/formats/pascal_voc.py diff --git a/supervision/dataset/formats/yolo.py b/src/supervision/dataset/formats/yolo.py similarity index 100% rename from supervision/dataset/formats/yolo.py rename to src/supervision/dataset/formats/yolo.py diff --git a/supervision/dataset/utils.py b/src/supervision/dataset/utils.py similarity index 100% rename from supervision/dataset/utils.py rename to src/supervision/dataset/utils.py diff --git a/supervision/detection/__init__.py b/src/supervision/detection/__init__.py similarity index 100% rename from supervision/detection/__init__.py rename to src/supervision/detection/__init__.py diff --git a/supervision/detection/core.py b/src/supervision/detection/core.py similarity index 100% rename from supervision/detection/core.py rename to src/supervision/detection/core.py diff --git a/supervision/detection/line_zone.py b/src/supervision/detection/line_zone.py similarity index 100% rename from supervision/detection/line_zone.py rename to src/supervision/detection/line_zone.py diff --git a/supervision/detection/tools/__init__.py b/src/supervision/detection/tools/__init__.py similarity index 100% rename from supervision/detection/tools/__init__.py rename to src/supervision/detection/tools/__init__.py diff --git a/supervision/detection/tools/csv_sink.py b/src/supervision/detection/tools/csv_sink.py similarity index 100% rename from supervision/detection/tools/csv_sink.py rename to src/supervision/detection/tools/csv_sink.py diff --git a/supervision/detection/tools/inference_slicer.py b/src/supervision/detection/tools/inference_slicer.py similarity index 100% rename from supervision/detection/tools/inference_slicer.py rename to src/supervision/detection/tools/inference_slicer.py diff --git a/supervision/detection/tools/json_sink.py b/src/supervision/detection/tools/json_sink.py similarity index 100% rename from supervision/detection/tools/json_sink.py rename to src/supervision/detection/tools/json_sink.py diff --git a/supervision/detection/tools/polygon_zone.py b/src/supervision/detection/tools/polygon_zone.py similarity index 100% rename from supervision/detection/tools/polygon_zone.py rename to src/supervision/detection/tools/polygon_zone.py diff --git a/supervision/detection/tools/smoother.py b/src/supervision/detection/tools/smoother.py similarity index 100% rename from supervision/detection/tools/smoother.py rename to src/supervision/detection/tools/smoother.py diff --git a/supervision/detection/tools/transformers.py b/src/supervision/detection/tools/transformers.py similarity index 100% rename from supervision/detection/tools/transformers.py rename to src/supervision/detection/tools/transformers.py diff --git a/supervision/detection/utils/__init__.py b/src/supervision/detection/utils/__init__.py similarity index 100% rename from supervision/detection/utils/__init__.py rename to src/supervision/detection/utils/__init__.py diff --git a/supervision/detection/utils/boxes.py b/src/supervision/detection/utils/boxes.py similarity index 100% rename from supervision/detection/utils/boxes.py rename to src/supervision/detection/utils/boxes.py diff --git a/supervision/detection/utils/converters.py b/src/supervision/detection/utils/converters.py similarity index 100% rename from supervision/detection/utils/converters.py rename to src/supervision/detection/utils/converters.py diff --git a/supervision/detection/utils/internal.py b/src/supervision/detection/utils/internal.py similarity index 100% rename from supervision/detection/utils/internal.py rename to src/supervision/detection/utils/internal.py diff --git a/supervision/detection/utils/iou_and_nms.py b/src/supervision/detection/utils/iou_and_nms.py similarity index 100% rename from supervision/detection/utils/iou_and_nms.py rename to src/supervision/detection/utils/iou_and_nms.py diff --git a/supervision/detection/utils/masks.py b/src/supervision/detection/utils/masks.py similarity index 100% rename from supervision/detection/utils/masks.py rename to src/supervision/detection/utils/masks.py diff --git a/supervision/detection/utils/polygons.py b/src/supervision/detection/utils/polygons.py similarity index 100% rename from supervision/detection/utils/polygons.py rename to src/supervision/detection/utils/polygons.py diff --git a/supervision/detection/utils/vlms.py b/src/supervision/detection/utils/vlms.py similarity index 100% rename from supervision/detection/utils/vlms.py rename to src/supervision/detection/utils/vlms.py diff --git a/supervision/detection/vlm.py b/src/supervision/detection/vlm.py similarity index 100% rename from supervision/detection/vlm.py rename to src/supervision/detection/vlm.py diff --git a/supervision/draw/__init__.py b/src/supervision/draw/__init__.py similarity index 100% rename from supervision/draw/__init__.py rename to src/supervision/draw/__init__.py diff --git a/supervision/draw/base.py b/src/supervision/draw/base.py similarity index 100% rename from supervision/draw/base.py rename to src/supervision/draw/base.py diff --git a/supervision/draw/color.py b/src/supervision/draw/color.py similarity index 100% rename from supervision/draw/color.py rename to src/supervision/draw/color.py diff --git a/supervision/draw/utils.py b/src/supervision/draw/utils.py similarity index 100% rename from supervision/draw/utils.py rename to src/supervision/draw/utils.py diff --git a/supervision/geometry/__init__.py b/src/supervision/geometry/__init__.py similarity index 100% rename from supervision/geometry/__init__.py rename to src/supervision/geometry/__init__.py diff --git a/supervision/geometry/core.py b/src/supervision/geometry/core.py similarity index 100% rename from supervision/geometry/core.py rename to src/supervision/geometry/core.py diff --git a/supervision/geometry/utils.py b/src/supervision/geometry/utils.py similarity index 100% rename from supervision/geometry/utils.py rename to src/supervision/geometry/utils.py diff --git a/supervision/key_points/__init__.py b/src/supervision/key_points/__init__.py similarity index 100% rename from supervision/key_points/__init__.py rename to src/supervision/key_points/__init__.py diff --git a/supervision/key_points/annotators.py b/src/supervision/key_points/annotators.py similarity index 100% rename from supervision/key_points/annotators.py rename to src/supervision/key_points/annotators.py diff --git a/supervision/key_points/core.py b/src/supervision/key_points/core.py similarity index 100% rename from supervision/key_points/core.py rename to src/supervision/key_points/core.py diff --git a/supervision/key_points/skeletons.py b/src/supervision/key_points/skeletons.py similarity index 100% rename from supervision/key_points/skeletons.py rename to src/supervision/key_points/skeletons.py diff --git a/supervision/metrics/__init__.py b/src/supervision/metrics/__init__.py similarity index 100% rename from supervision/metrics/__init__.py rename to src/supervision/metrics/__init__.py diff --git a/supervision/metrics/core.py b/src/supervision/metrics/core.py similarity index 100% rename from supervision/metrics/core.py rename to src/supervision/metrics/core.py diff --git a/supervision/metrics/detection.py b/src/supervision/metrics/detection.py similarity index 100% rename from supervision/metrics/detection.py rename to src/supervision/metrics/detection.py diff --git a/supervision/metrics/f1_score.py b/src/supervision/metrics/f1_score.py similarity index 100% rename from supervision/metrics/f1_score.py rename to src/supervision/metrics/f1_score.py diff --git a/supervision/metrics/mean_average_precision.py b/src/supervision/metrics/mean_average_precision.py similarity index 100% rename from supervision/metrics/mean_average_precision.py rename to src/supervision/metrics/mean_average_precision.py diff --git a/supervision/metrics/mean_average_recall.py b/src/supervision/metrics/mean_average_recall.py similarity index 100% rename from supervision/metrics/mean_average_recall.py rename to src/supervision/metrics/mean_average_recall.py diff --git a/supervision/metrics/precision.py b/src/supervision/metrics/precision.py similarity index 100% rename from supervision/metrics/precision.py rename to src/supervision/metrics/precision.py diff --git a/supervision/metrics/recall.py b/src/supervision/metrics/recall.py similarity index 100% rename from supervision/metrics/recall.py rename to src/supervision/metrics/recall.py diff --git a/supervision/metrics/utils/__init__.py b/src/supervision/metrics/utils/__init__.py similarity index 100% rename from supervision/metrics/utils/__init__.py rename to src/supervision/metrics/utils/__init__.py diff --git a/supervision/metrics/utils/object_size.py b/src/supervision/metrics/utils/object_size.py similarity index 100% rename from supervision/metrics/utils/object_size.py rename to src/supervision/metrics/utils/object_size.py diff --git a/supervision/metrics/utils/utils.py b/src/supervision/metrics/utils/utils.py similarity index 100% rename from supervision/metrics/utils/utils.py rename to src/supervision/metrics/utils/utils.py diff --git a/supervision/py.typed b/src/supervision/py.typed similarity index 100% rename from supervision/py.typed rename to src/supervision/py.typed diff --git a/supervision/tracker/__init__.py b/src/supervision/tracker/__init__.py similarity index 100% rename from supervision/tracker/__init__.py rename to src/supervision/tracker/__init__.py diff --git a/supervision/tracker/byte_tracker/__init__.py b/src/supervision/tracker/byte_tracker/__init__.py similarity index 100% rename from supervision/tracker/byte_tracker/__init__.py rename to src/supervision/tracker/byte_tracker/__init__.py diff --git a/supervision/tracker/byte_tracker/core.py b/src/supervision/tracker/byte_tracker/core.py similarity index 100% rename from supervision/tracker/byte_tracker/core.py rename to src/supervision/tracker/byte_tracker/core.py diff --git a/supervision/tracker/byte_tracker/kalman_filter.py b/src/supervision/tracker/byte_tracker/kalman_filter.py similarity index 100% rename from supervision/tracker/byte_tracker/kalman_filter.py rename to src/supervision/tracker/byte_tracker/kalman_filter.py diff --git a/supervision/tracker/byte_tracker/matching.py b/src/supervision/tracker/byte_tracker/matching.py similarity index 100% rename from supervision/tracker/byte_tracker/matching.py rename to src/supervision/tracker/byte_tracker/matching.py diff --git a/supervision/tracker/byte_tracker/single_object_track.py b/src/supervision/tracker/byte_tracker/single_object_track.py similarity index 100% rename from supervision/tracker/byte_tracker/single_object_track.py rename to src/supervision/tracker/byte_tracker/single_object_track.py diff --git a/supervision/tracker/byte_tracker/utils.py b/src/supervision/tracker/byte_tracker/utils.py similarity index 100% rename from supervision/tracker/byte_tracker/utils.py rename to src/supervision/tracker/byte_tracker/utils.py diff --git a/supervision/utils/__init__.py b/src/supervision/utils/__init__.py similarity index 100% rename from supervision/utils/__init__.py rename to src/supervision/utils/__init__.py diff --git a/supervision/utils/conversion.py b/src/supervision/utils/conversion.py similarity index 100% rename from supervision/utils/conversion.py rename to src/supervision/utils/conversion.py diff --git a/supervision/utils/file.py b/src/supervision/utils/file.py similarity index 100% rename from supervision/utils/file.py rename to src/supervision/utils/file.py diff --git a/supervision/utils/image.py b/src/supervision/utils/image.py similarity index 100% rename from supervision/utils/image.py rename to src/supervision/utils/image.py diff --git a/supervision/utils/internal.py b/src/supervision/utils/internal.py similarity index 100% rename from supervision/utils/internal.py rename to src/supervision/utils/internal.py diff --git a/supervision/utils/iterables.py b/src/supervision/utils/iterables.py similarity index 100% rename from supervision/utils/iterables.py rename to src/supervision/utils/iterables.py diff --git a/supervision/utils/notebook.py b/src/supervision/utils/notebook.py similarity index 100% rename from supervision/utils/notebook.py rename to src/supervision/utils/notebook.py diff --git a/supervision/utils/video.py b/src/supervision/utils/video.py similarity index 100% rename from supervision/utils/video.py rename to src/supervision/utils/video.py diff --git a/supervision/validators/__init__.py b/src/supervision/validators/__init__.py similarity index 100% rename from supervision/validators/__init__.py rename to src/supervision/validators/__init__.py diff --git a/test/__init__.py b/tests/__init__.py similarity index 100% rename from test/__init__.py rename to tests/__init__.py diff --git a/test/annotators/__init__.py b/tests/annotators/__init__.py similarity index 100% rename from test/annotators/__init__.py rename to tests/annotators/__init__.py diff --git a/test/annotators/test_core.py b/tests/annotators/test_core.py similarity index 99% rename from test/annotators/test_core.py rename to tests/annotators/test_core.py index 0b07830d..233b15c5 100644 --- a/test/annotators/test_core.py +++ b/tests/annotators/test_core.py @@ -31,7 +31,7 @@ from supervision.annotators.utils import ColorLookup from supervision.detection.core import Detections from supervision.draw.color import Color from supervision.geometry.core import Position -from test.helpers import _create_detections, assert_image_mostly_same +from tests.helpers import _create_detections, assert_image_mostly_same @pytest.fixture diff --git a/test/annotators/test_utils.py b/tests/annotators/test_utils.py similarity index 99% rename from test/annotators/test_utils.py rename to tests/annotators/test_utils.py index 37264369..c223c80a 100644 --- a/test/annotators/test_utils.py +++ b/tests/annotators/test_utils.py @@ -7,7 +7,7 @@ import pytest from supervision.annotators.utils import ColorLookup, resolve_color_idx, wrap_text from supervision.detection.core import Detections -from test.helpers import _create_detections +from tests.helpers import _create_detections @pytest.mark.parametrize( diff --git a/test/assets/__init__.py b/tests/assets/__init__.py similarity index 100% rename from test/assets/__init__.py rename to tests/assets/__init__.py diff --git a/test/assets/test_downloader.py b/tests/assets/test_downloader.py similarity index 100% rename from test/assets/test_downloader.py rename to tests/assets/test_downloader.py diff --git a/test/assets/test_list.py b/tests/assets/test_list.py similarity index 100% rename from test/assets/test_list.py rename to tests/assets/test_list.py diff --git a/test/classification/__init__.py b/tests/classification/__init__.py similarity index 100% rename from test/classification/__init__.py rename to tests/classification/__init__.py diff --git a/test/classification/test_core.py b/tests/classification/test_core.py similarity index 100% rename from test/classification/test_core.py rename to tests/classification/test_core.py diff --git a/test/conftest.py b/tests/conftest.py similarity index 96% rename from test/conftest.py rename to tests/conftest.py index cd03031e..60273c78 100644 --- a/test/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,7 @@ import numpy as np import pytest import supervision as sv -from test.helpers import _create_key_points +from tests.helpers import _create_key_points @pytest.fixture diff --git a/test/dataset/__init__.py b/tests/dataset/__init__.py similarity index 100% rename from test/dataset/__init__.py rename to tests/dataset/__init__.py diff --git a/test/dataset/formats/__init__.py b/tests/dataset/formats/__init__.py similarity index 100% rename from test/dataset/formats/__init__.py rename to tests/dataset/formats/__init__.py diff --git a/test/dataset/formats/test_coco.py b/tests/dataset/formats/test_coco.py similarity index 100% rename from test/dataset/formats/test_coco.py rename to tests/dataset/formats/test_coco.py diff --git a/test/dataset/formats/test_pascal_voc.py b/tests/dataset/formats/test_pascal_voc.py similarity index 99% rename from test/dataset/formats/test_pascal_voc.py rename to tests/dataset/formats/test_pascal_voc.py index fe31e666..1a918848 100644 --- a/test/dataset/formats/test_pascal_voc.py +++ b/tests/dataset/formats/test_pascal_voc.py @@ -11,7 +11,7 @@ from supervision.dataset.formats.pascal_voc import ( object_to_pascal_voc, parse_polygon_points, ) -from test.helpers import _create_detections +from tests.helpers import _create_detections def are_xml_elements_equal(elem1, elem2): diff --git a/test/dataset/formats/test_yolo.py b/tests/dataset/formats/test_yolo.py similarity index 100% rename from test/dataset/formats/test_yolo.py rename to tests/dataset/formats/test_yolo.py diff --git a/test/dataset/test_core.py b/tests/dataset/test_core.py similarity index 99% rename from test/dataset/test_core.py rename to tests/dataset/test_core.py index 2ebdbe8f..3be0e9ea 100644 --- a/test/dataset/test_core.py +++ b/tests/dataset/test_core.py @@ -5,7 +5,7 @@ from contextlib import ExitStack as DoesNotRaise import pytest from supervision import DetectionDataset -from test.helpers import _create_detections +from tests.helpers import _create_detections @pytest.mark.parametrize( diff --git a/test/dataset/test_utils.py b/tests/dataset/test_utils.py similarity index 99% rename from test/dataset/test_utils.py rename to tests/dataset/test_utils.py index 71fce1e3..5e6563d4 100644 --- a/test/dataset/test_utils.py +++ b/tests/dataset/test_utils.py @@ -16,7 +16,7 @@ from supervision.dataset.utils import ( rle_to_mask, train_test_split, ) -from test.helpers import _create_detections +from tests.helpers import _create_detections T = TypeVar("T") diff --git a/test/detection/__init__.py b/tests/detection/__init__.py similarity index 100% rename from test/detection/__init__.py rename to tests/detection/__init__.py diff --git a/test/detection/test_core.py b/tests/detection/test_core.py similarity index 99% rename from test/detection/test_core.py rename to tests/detection/test_core.py index 8cdb3393..935a734c 100644 --- a/test/detection/test_core.py +++ b/tests/detection/test_core.py @@ -7,7 +7,7 @@ import pytest from supervision.detection.core import Detections, merge_inner_detection_object_pair from supervision.geometry.core import Position -from test.helpers import _create_detections +from tests.helpers import _create_detections PREDICTIONS = np.array( [ diff --git a/test/detection/test_csv.py b/tests/detection/test_csv.py similarity index 99% rename from test/detection/test_csv.py rename to tests/detection/test_csv.py index 99440b7f..12d52058 100644 --- a/test/detection/test_csv.py +++ b/tests/detection/test_csv.py @@ -5,7 +5,7 @@ from typing import Any import pytest import supervision as sv -from test.helpers import _create_detections +from tests.helpers import _create_detections @pytest.mark.parametrize( diff --git a/test/detection/test_from_adapters.py b/tests/detection/test_from_adapters.py similarity index 99% rename from test/detection/test_from_adapters.py rename to tests/detection/test_from_adapters.py index f31988ea..7cc0d0d3 100644 --- a/test/detection/test_from_adapters.py +++ b/tests/detection/test_from_adapters.py @@ -6,7 +6,7 @@ import pytest import supervision.detection.core as detection_core from supervision.config import CLASS_NAME_DATA_FIELD from supervision.detection.core import Detections -from test.helpers import ( +from tests.helpers import ( _FakeUltralyticsBoxes, _FakeUltralyticsResults, _FakeYoloNasPrediction, diff --git a/test/detection/test_json.py b/tests/detection/test_json.py similarity index 99% rename from test/detection/test_json.py rename to tests/detection/test_json.py index a64ce927..0d1218aa 100644 --- a/test/detection/test_json.py +++ b/tests/detection/test_json.py @@ -5,7 +5,7 @@ from typing import Any import pytest import supervision as sv -from test.helpers import _create_detections +from tests.helpers import _create_detections @pytest.mark.parametrize( diff --git a/test/detection/test_line_counter.py b/tests/detection/test_line_counter.py similarity index 99% rename from test/detection/test_line_counter.py rename to tests/detection/test_line_counter.py index caa2889f..257f8c98 100644 --- a/test/detection/test_line_counter.py +++ b/tests/detection/test_line_counter.py @@ -6,7 +6,7 @@ import pytest from supervision import LineZone from supervision.geometry.core import Point, Position, Vector -from test.helpers import _create_detections +from tests.helpers import _create_detections @pytest.mark.parametrize( diff --git a/test/detection/test_polygon_zone_annotator.py b/tests/detection/test_polygon_zone_annotator.py similarity index 100% rename from test/detection/test_polygon_zone_annotator.py rename to tests/detection/test_polygon_zone_annotator.py diff --git a/test/detection/test_polygonzone.py b/tests/detection/test_polygonzone.py similarity index 98% rename from test/detection/test_polygonzone.py rename to tests/detection/test_polygonzone.py index d64c1fc4..82599f30 100644 --- a/test/detection/test_polygonzone.py +++ b/tests/detection/test_polygonzone.py @@ -4,7 +4,7 @@ import numpy as np import pytest import supervision as sv -from test.helpers import _create_detections +from tests.helpers import _create_detections DETECTION_BOXES = np.array( [ diff --git a/test/detection/test_vlm.py b/tests/detection/test_vlm.py similarity index 100% rename from test/detection/test_vlm.py rename to tests/detection/test_vlm.py diff --git a/test/detection/tools/test_inference_slicer.py b/tests/detection/tools/test_inference_slicer.py similarity index 100% rename from test/detection/tools/test_inference_slicer.py rename to tests/detection/tools/test_inference_slicer.py diff --git a/test/detection/utils/__init__.py b/tests/detection/utils/__init__.py similarity index 100% rename from test/detection/utils/__init__.py rename to tests/detection/utils/__init__.py diff --git a/test/detection/utils/test_boxes.py b/tests/detection/utils/test_boxes.py similarity index 100% rename from test/detection/utils/test_boxes.py rename to tests/detection/utils/test_boxes.py diff --git a/test/detection/utils/test_converters.py b/tests/detection/utils/test_converters.py similarity index 100% rename from test/detection/utils/test_converters.py rename to tests/detection/utils/test_converters.py diff --git a/test/detection/utils/test_internal.py b/tests/detection/utils/test_internal.py similarity index 100% rename from test/detection/utils/test_internal.py rename to tests/detection/utils/test_internal.py diff --git a/test/detection/utils/test_iou_and_nms.py b/tests/detection/utils/test_iou_and_nms.py similarity index 99% rename from test/detection/utils/test_iou_and_nms.py rename to tests/detection/utils/test_iou_and_nms.py index d0bb0ad2..aa5a3253 100644 --- a/test/detection/utils/test_iou_and_nms.py +++ b/tests/detection/utils/test_iou_and_nms.py @@ -14,7 +14,7 @@ from supervision.detection.utils.iou_and_nms import ( mask_non_max_merge, mask_non_max_suppression, ) -from test.helpers import _generate_random_boxes +from tests.helpers import _generate_random_boxes @pytest.mark.parametrize( diff --git a/test/detection/utils/test_masks.py b/tests/detection/utils/test_masks.py similarity index 100% rename from test/detection/utils/test_masks.py rename to tests/detection/utils/test_masks.py diff --git a/test/detection/utils/test_polygons.py b/tests/detection/utils/test_polygons.py similarity index 100% rename from test/detection/utils/test_polygons.py rename to tests/detection/utils/test_polygons.py diff --git a/test/detection/utils/test_vlms.py b/tests/detection/utils/test_vlms.py similarity index 100% rename from test/detection/utils/test_vlms.py rename to tests/detection/utils/test_vlms.py diff --git a/test/draw/__init__.py b/tests/draw/__init__.py similarity index 100% rename from test/draw/__init__.py rename to tests/draw/__init__.py diff --git a/test/draw/test_color.py b/tests/draw/test_color.py similarity index 100% rename from test/draw/test_color.py rename to tests/draw/test_color.py diff --git a/test/geometry/__init__.py b/tests/geometry/__init__.py similarity index 100% rename from test/geometry/__init__.py rename to tests/geometry/__init__.py diff --git a/test/geometry/test_core.py b/tests/geometry/test_core.py similarity index 100% rename from test/geometry/test_core.py rename to tests/geometry/test_core.py diff --git a/test/geometry/test_utils.py b/tests/geometry/test_utils.py similarity index 100% rename from test/geometry/test_utils.py rename to tests/geometry/test_utils.py diff --git a/test/helpers.py b/tests/helpers.py similarity index 97% rename from test/helpers.py rename to tests/helpers.py index 0c8fc349..7a7bbdcb 100644 --- a/test/helpers.py +++ b/tests/helpers.py @@ -45,7 +45,6 @@ def _create_detections( Examples: >>> import numpy as np - >>> from test.helpers import _create_detections >>> detections = _create_detections( ... xyxy=[[0, 0, 10, 10], [20, 20, 30, 30]], ... confidence=[0.5, 0.8], @@ -102,7 +101,6 @@ def _create_key_points( Examples: >>> import numpy as np - >>> from test.helpers import _create_key_points >>> key_points = _create_key_points( ... xy=[[[0, 0], [10, 10]], [[20, 20], [30, 30]]], ... confidence=[[0.5, 0.8], [0.9, 0.1]], @@ -159,7 +157,6 @@ def _generate_random_boxes( `(x_min, y_min, x_max, y_max)`. Examples: - >>> from test.helpers import _generate_random_boxes >>> boxes = _generate_random_boxes( ... count=2, image_size=(1000, 1000), ... min_box_size=10, max_box_size=20, seed=42) @@ -199,7 +196,6 @@ def assert_almost_equal(actual, expected, tolerance=1e-5): and `expected`. Examples: - >>> from test.helpers import assert_almost_equal >>> assert_almost_equal(0.500001, 0.5) >>> assert_almost_equal(0.6, 0.5, tolerance=0.2) >>> assert_almost_equal(0.6, 0.5) diff --git a/test/key_points/__init__.py b/tests/key_points/__init__.py similarity index 100% rename from test/key_points/__init__.py rename to tests/key_points/__init__.py diff --git a/test/key_points/test_annotators.py b/tests/key_points/test_annotators.py similarity index 98% rename from test/key_points/test_annotators.py rename to tests/key_points/test_annotators.py index db2f8413..fcef9882 100644 --- a/test/key_points/test_annotators.py +++ b/tests/key_points/test_annotators.py @@ -1,7 +1,7 @@ import numpy as np import supervision as sv -from test.helpers import assert_image_mostly_same +from tests.helpers import assert_image_mostly_same class TestVertexAnnotator: diff --git a/test/key_points/test_core.py b/tests/key_points/test_core.py similarity index 99% rename from test/key_points/test_core.py rename to tests/key_points/test_core.py index 49cba4d6..5b3e4361 100644 --- a/test/key_points/test_core.py +++ b/tests/key_points/test_core.py @@ -4,7 +4,7 @@ import numpy as np import pytest from supervision.key_points.core import KeyPoints -from test.helpers import _create_key_points +from tests.helpers import _create_key_points KEY_POINTS = _create_key_points( xy=[ diff --git a/test/key_points/test_skeletons.py b/tests/key_points/test_skeletons.py similarity index 100% rename from test/key_points/test_skeletons.py rename to tests/key_points/test_skeletons.py diff --git a/test/metrics/__init__.py b/tests/metrics/__init__.py similarity index 100% rename from test/metrics/__init__.py rename to tests/metrics/__init__.py diff --git a/test/metrics/conftest.py b/tests/metrics/conftest.py similarity index 100% rename from test/metrics/conftest.py rename to tests/metrics/conftest.py diff --git a/test/metrics/test_detection.py b/tests/metrics/test_detection.py similarity index 99% rename from test/metrics/test_detection.py rename to tests/metrics/test_detection.py index 094831d2..9f395b8d 100644 --- a/test/metrics/test_detection.py +++ b/tests/metrics/test_detection.py @@ -12,7 +12,7 @@ from supervision.metrics.detection import ( MeanAveragePrecision, detections_to_tensor, ) -from test.helpers import _create_detections, assert_almost_equal +from tests.helpers import _create_detections, assert_almost_equal class TestDetectionMetrics: diff --git a/test/metrics/test_f1_score.py b/tests/metrics/test_f1_score.py similarity index 99% rename from test/metrics/test_f1_score.py rename to tests/metrics/test_f1_score.py index 7e6ceae7..9ccd8704 100644 --- a/test/metrics/test_f1_score.py +++ b/tests/metrics/test_f1_score.py @@ -4,7 +4,7 @@ import pytest from supervision.detection.core import Detections from supervision.metrics.core import AveragingMethod, MetricTarget from supervision.metrics.f1_score import F1Score -from test.helpers import assert_almost_equal +from tests.helpers import assert_almost_equal class TestF1Score: diff --git a/test/metrics/test_mean_average_precision.py b/tests/metrics/test_mean_average_precision.py similarity index 100% rename from test/metrics/test_mean_average_precision.py rename to tests/metrics/test_mean_average_precision.py diff --git a/test/metrics/test_mean_average_precision_area.py b/tests/metrics/test_mean_average_precision_area.py similarity index 100% rename from test/metrics/test_mean_average_precision_area.py rename to tests/metrics/test_mean_average_precision_area.py diff --git a/test/metrics/test_precision.py b/tests/metrics/test_precision.py similarity index 100% rename from test/metrics/test_precision.py rename to tests/metrics/test_precision.py diff --git a/test/metrics/test_recall.py b/tests/metrics/test_recall.py similarity index 99% rename from test/metrics/test_recall.py rename to tests/metrics/test_recall.py index 48ab16aa..02ebb93f 100644 --- a/test/metrics/test_recall.py +++ b/tests/metrics/test_recall.py @@ -4,7 +4,7 @@ import pytest from supervision.detection.core import Detections from supervision.metrics.core import AveragingMethod, MetricTarget from supervision.metrics.recall import Recall -from test.helpers import assert_almost_equal +from tests.helpers import assert_almost_equal class TestRecall: diff --git a/test/tracker/__init__.py b/tests/tracker/__init__.py similarity index 100% rename from test/tracker/__init__.py rename to tests/tracker/__init__.py diff --git a/test/tracker/test_byte_tracker.py b/tests/tracker/test_byte_tracker.py similarity index 100% rename from test/tracker/test_byte_tracker.py rename to tests/tracker/test_byte_tracker.py diff --git a/test/utils/__init__.py b/tests/utils/__init__.py similarity index 100% rename from test/utils/__init__.py rename to tests/utils/__init__.py diff --git a/test/utils/assets/1.jpg b/tests/utils/assets/1.jpg similarity index 100% rename from test/utils/assets/1.jpg rename to tests/utils/assets/1.jpg diff --git a/test/utils/assets/2.jpg b/tests/utils/assets/2.jpg similarity index 100% rename from test/utils/assets/2.jpg rename to tests/utils/assets/2.jpg diff --git a/test/utils/assets/3.jpg b/tests/utils/assets/3.jpg similarity index 100% rename from test/utils/assets/3.jpg rename to tests/utils/assets/3.jpg diff --git a/test/utils/assets/4.jpg b/tests/utils/assets/4.jpg similarity index 100% rename from test/utils/assets/4.jpg rename to tests/utils/assets/4.jpg diff --git a/test/utils/assets/5.jpg b/tests/utils/assets/5.jpg similarity index 100% rename from test/utils/assets/5.jpg rename to tests/utils/assets/5.jpg diff --git a/test/utils/assets/all_images_tile.png b/tests/utils/assets/all_images_tile.png similarity index 100% rename from test/utils/assets/all_images_tile.png rename to tests/utils/assets/all_images_tile.png diff --git a/test/utils/assets/all_images_tile_and_custom_colors.png b/tests/utils/assets/all_images_tile_and_custom_colors.png similarity index 100% rename from test/utils/assets/all_images_tile_and_custom_colors.png rename to tests/utils/assets/all_images_tile_and_custom_colors.png diff --git a/test/utils/assets/all_images_tile_and_custom_colors_and_titles.png b/tests/utils/assets/all_images_tile_and_custom_colors_and_titles.png similarity index 100% rename from test/utils/assets/all_images_tile_and_custom_colors_and_titles.png rename to tests/utils/assets/all_images_tile_and_custom_colors_and_titles.png diff --git a/test/utils/assets/all_images_tile_and_custom_grid.png b/tests/utils/assets/all_images_tile_and_custom_grid.png similarity index 100% rename from test/utils/assets/all_images_tile_and_custom_grid.png rename to tests/utils/assets/all_images_tile_and_custom_grid.png diff --git a/test/utils/assets/all_images_tile_and_titles_with_custom_configs.png b/tests/utils/assets/all_images_tile_and_titles_with_custom_configs.png similarity index 100% rename from test/utils/assets/all_images_tile_and_titles_with_custom_configs.png rename to tests/utils/assets/all_images_tile_and_titles_with_custom_configs.png diff --git a/test/utils/assets/four_images_tile.png b/tests/utils/assets/four_images_tile.png similarity index 100% rename from test/utils/assets/four_images_tile.png rename to tests/utils/assets/four_images_tile.png diff --git a/test/utils/assets/single_image_tile.png b/tests/utils/assets/single_image_tile.png similarity index 100% rename from test/utils/assets/single_image_tile.png rename to tests/utils/assets/single_image_tile.png diff --git a/test/utils/assets/single_image_tile_enforced_grid.png b/tests/utils/assets/single_image_tile_enforced_grid.png similarity index 100% rename from test/utils/assets/single_image_tile_enforced_grid.png rename to tests/utils/assets/single_image_tile_enforced_grid.png diff --git a/test/utils/assets/three_images_tile.png b/tests/utils/assets/three_images_tile.png similarity index 100% rename from test/utils/assets/three_images_tile.png rename to tests/utils/assets/three_images_tile.png diff --git a/test/utils/assets/two_images_tile.png b/tests/utils/assets/two_images_tile.png similarity index 100% rename from test/utils/assets/two_images_tile.png rename to tests/utils/assets/two_images_tile.png diff --git a/test/utils/conftest.py b/tests/utils/conftest.py similarity index 100% rename from test/utils/conftest.py rename to tests/utils/conftest.py diff --git a/test/utils/test_conversion.py b/tests/utils/test_conversion.py similarity index 100% rename from test/utils/test_conversion.py rename to tests/utils/test_conversion.py diff --git a/test/utils/test_file.py b/tests/utils/test_file.py similarity index 100% rename from test/utils/test_file.py rename to tests/utils/test_file.py diff --git a/test/utils/test_image.py b/tests/utils/test_image.py similarity index 100% rename from test/utils/test_image.py rename to tests/utils/test_image.py diff --git a/test/utils/test_internal.py b/tests/utils/test_internal.py similarity index 100% rename from test/utils/test_internal.py rename to tests/utils/test_internal.py diff --git a/test/utils/test_iterables.py b/tests/utils/test_iterables.py similarity index 100% rename from test/utils/test_iterables.py rename to tests/utils/test_iterables.py diff --git a/test/utils/test_video.py b/tests/utils/test_video.py similarity index 100% rename from test/utils/test_video.py rename to tests/utils/test_video.py