fix(docs): resolve review deprecation follow-ups - #2415
Merged
Conversation
- Extend active deprecation removals to 0.31.0 and align deprecated API docs, changelog, and warnings. - Add missing reference docs for VLM, conversion helpers, geometry, metrics extras, and tracker deprecation notices. - Raise when ImageSink cannot write an image and cover the failure path with a regression test. --- Co-authored-by: Codex <codex@openai.com>
…gon approximation adjustments
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2415 +/- ##
=======================================
Coverage 86% 86%
=======================================
Files 70 70
Lines 10330 10335 +5
=======================================
+ Hits 8872 8878 +6
+ Misses 1458 1457 -1 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR primarily updates the MkDocs documentation and API references to clarify deprecation timelines/migrations (notably sv.ByteTrack → external ByteTrackTracker) and to make metrics installation requirements more explicit. It also includes a handful of small library behavior/docs improvements (e.g., ImageSink write failure handling, Color validation, and a changed default for polygon approximation).
Changes:
- Standardize deprecation/migration guidance and delay several planned removals to
0.31.0across docs and in-code deprecation notices. - Update metrics docs to consistently instruct installing
supervision[metrics]before using metrics APIs. - Expand API reference coverage (new/expanded utility and geometry pages), plus small related code/test updates.
Reviewed changes
Copilot reviewed 35 out of 35 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/utils/test_image.py | Adds regression test for ImageSink.save_image failure behavior. |
| tests/geometry/test_core.py | Adds test ensuring Position.list() preserves definition order. |
| tests/draw/test_color.py | Adds tests for Color rejecting out-of-range channel values. |
| tests/dataset/test_utils.py | Adds test asserting default polygon approximation percentage is 0.0. |
| src/supervision/utils/internal.py | Accepts corrected + legacy env var name for deprecation warning control. |
| src/supervision/utils/image.py | Raises on failed cv2.imwrite in ImageSink.save_image; adds class docstring. |
| src/supervision/tracker/byte_tracker/core.py | Delays ByteTrack removal to 0.31.0 and updates deprecation rendering. |
| src/supervision/metrics/mean_average_precision.py | Updates result docstring to reflect -1 sentinel behavior. |
| src/supervision/keypoint/core.py | Updates keypoint module deprecation removal version to 0.31.0. |
| src/supervision/keypoint/annotators.py | Updates keypoint module deprecation removal version to 0.31.0. |
| src/supervision/keypoint/init.py | Updates keypoint module deprecation removal version to 0.31.0. |
| src/supervision/geometry/core.py | Improves docstrings; makes Position.list() deterministic via list comprehension. |
| src/supervision/draw/color.py | Adds __post_init__ range validation for direct Color(...) construction. |
| src/supervision/detection/vlm.py | Updates LMM deprecation formatting for rendered docs. |
| src/supervision/detection/utils/boxes.py | Delays deprecated denormalize_boxes arg-remap removal to 0.31.0. |
| src/supervision/detection/line_zone.py | Adds/expands docstrings for line zone annotators. |
| src/supervision/dataset/utils.py | Delays RLE compatibility removals; changes default polygon simplification to 0.0. |
| mkdocs.yml | Adjusts nav labels and adds new docs pages to navigation. |
| docs/utils/geometry.md | Expands API reference page to include Point, Rect, and Vector. |
| docs/utils/conversion.md | New API reference page for conversion utilities (needs symbol-name corrections). |
| docs/trackers.md | Adds prominent ByteTrack deprecation warning in the tracker reference. |
| docs/metrics/recall.md | Adds supervision[metrics] install instructions. |
| docs/metrics/precision.md | Adds supervision[metrics] install instructions. |
| docs/metrics/mean_average_recall.md | Adds supervision[metrics] install instructions. |
| docs/metrics/mean_average_precision.md | Adds supervision[metrics] install instructions; clarifies supported targets. |
| docs/metrics/f1_score.md | Adds supervision[metrics] install instructions. |
| docs/metrics/common_values.md | Adds supervision[metrics] install instructions. |
| docs/how_to/track_objects.md | Adds sv.ByteTrack deprecation warning and migration notes. |
| docs/faq.md | Updates tracker + benchmarking answers with deprecation/metrics guidance. |
| docs/detection/utils/vlms.md | Expands VLM utils page to document VLM, LMM, and validate_vlm_parameters. |
| docs/detection/tools/inference_slicer.md | Adds API reference entry for WindowedRasterDataset. |
| docs/detection/metrics.md | Adds supervision[metrics] install instructions to legacy metrics page. |
| docs/deprecated.md | Updates deprecation list with consistent versioning and migration guidance. |
| docs/changelog.md | Notes deprecation schedule delay + highlights related fixes/behavior changes. |
| AGENTS.md | Updates keypoint alias deprecation removal version to 0.31.0. |
- Correct conversion and deprecated docs to match exported names and restore KeyPoints.confidence. - Add regression coverage for SUPERVISION_DEPRECATION_WARNING precedence and document ImageSink.save_image() failure behavior. --- Co-authored-by: Codex <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the documentation to clarify deprecation timelines, improve migration guidance for deprecated APIs (especially
sv.ByteTrack), and enhance the docs for metrics and utility modules. It also introduces new or expanded API reference pages for several utility modules. The most important changes are summarized below.Deprecation timeline updates and migration guidance:
sv.ByteTrack,supervision.keypoint, and related arguments or modules have their removal versions delayed from0.30.0to0.31.0in the documentation, changelog, and deprecation notices. This gives users a longer transition window. [1] [2] [3] [4]sv.ByteTrackto the externalByteTrackTracker(from thetrackerspackage) and clarify method renames. Prominent warnings and migration instructions are added in API references, how-to guides, and FAQs. [1] [2] [3]Improved documentation for metrics and installation:
pip install "supervision[metrics]") before using metrics APIs. This is added to the main metrics, mean average precision, recall, F1 score, and related pages, as well as the FAQ. [1] [2] [3] [4] [5] [6] [7] [8]New and expanded API reference pages:
supervision.utils.conversion(conversion between cv2 and Pillow images), and expanded for geometry types likePoint,Rect, andVector. [1] [2]VLM,LMM, andvalidate_vlm_parameters.Changelog and description improvements:
These changes collectively improve migration clarity for users, ensure documentation is up-to-date with the latest deprecation schedules, and enhance discoverability of utility APIs.