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.
Updated type checking to include hints and mypy/pyright; refreshed links to latest docs, LICENSE, and cookbook examples.
This pull request updates the CONTRIBUTING.md file to align with the current state of the Supervision project, improving accuracy, clarity, and usefulness for contributors. The changes address outdated information, broken or inconsistent links, and evolving project practices, ensuring the guide remains a reliable resource for the community.
Summary of Changes:
Type Checking Section:
Previously: Stated "So far, there is no type checking with mypy. See issue."
Updated to: "We use type hints throughout the codebase. Contributors are encouraged to use tools like mypy or pyright for static type checking. Run mypy . or pyright . to verify types."
Motivation/Context: The original text referenced an outdated issue from a template repository (roboflow-ai/template-python), which is no longer relevant to Supervision. The project now incorporates type hints extensively, and static checking with mypy/pyright is a recommended best practice (as evidenced by the presence of type annotations in recent commits and the dev dependencies including mypy).
This update removes the misleading "no type checking" statement and provides actionable guidance to encourage type-safe contributions, reducing potential bugs and easing code reviews.
Documentation Links:
Cookbook example link: Changed from https://supervision.roboflow.com/develop/notebooks/count-objects-crossing-the-line/ to https://supervision.roboflow.com/latest/notebooks/count-objects-crossing-the-line/.
LICENSE link: Changed from https://github.com/roboflow/supervision/blob/develop/LICENSE.md to https://github.com/roboflow/supervision/blob/main/LICENSE.
pytest link: Changed from https://docs.pytest.org/en/7.1.x/ to https://docs.pytest.org/en/stable/.
Motivation/Context: The develop branch links point to unstable or archived versions of the docs/notebooks, which can lead to 404 errors or outdated examples for users. Switching to /latest/ and /stable/ ensures contributors access the most current, production-ready content. The LICENSE branch was updated to main as that's the default stable branch in the repo (confirmed via repo settings). This prevents confusion and broken links, improving the contributor onboarding experience.
No specific issues or tickets are directly fixed by this PR, but it builds on general maintenance needs for documentation hygiene. Relevant context: Similar updates have been made in other Roboflow repos (e.g., recent PRs in supervision's history focusing on doc accuracy).
Dependencies:
None required. All changes are textual and do not introduce new code, tools, or external dependencies. Existing dev extras (e.g., mypy via --extra dev) already support the updated type checking guidance.
Type of change
Please delete options that are not relevant.
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
This change requires a documentation update
How has this change been tested, please provide a testcase or example of how you tested the change?
To verify the updates:
Local Rendering and Link Validation:
Cloned the repo: git clone https://github.com/roboflow/supervision.git && cd supervision.
Switched to develop branch: git checkout develop.
Installed dev dependencies: uv pip install -r pyproject.toml --extra dev --extra docs.
Applied the proposed changes to CONTRIBUTING.md.
Served the docs locally: mkdocs serve (accessed at http://127.0.0.1:8000/ to preview rendered Markdown).
Manually navigated sections (e.g., Type Checking, Cookbooks) to confirm formatting, readability, and no syntax errors.
Link Functionality:
Clicked/verified each updated link in the rendered docs:
Cookbook: Resolves to the latest notebook with current examples.
LICENSE: Loads the MIT license from main branch.
pytest: Directs to stable docs (version-agnostic).
Tested original links for breakage (e.g., /develop/ notebook returns 404 in latest context).
Type Checking Guidance:
Ran mypy . in the dev environment: Confirmed it executes without errors on existing code (no new issues introduced).
Simulated contributor workflow: Added a dummy type-hinted function, committed, and ran pre-commit hooks to ensure the guidance aligns with actual tooling.
Overall Consistency:
Diffed against upstream develop to ensure no unintended changes.
Reviewed for tone/clarity: Ensured language remains encouraging and precise.
These steps confirm the updates enhance usability without regressions.
Any specific deployment considerations
Documentation Impact: This is purely a docs update, so merging to develop will trigger automatic MkDocs builds and deployment to the /latest/ docs site. No changes to usability, costs, or secrets—contributors will immediately benefit from