Skip to content

Commit 58e27f4

Browse files
authored
Merge pull request #1573 from roboflow/develop
supervision-0.24.0 release
2 parents 27c68f2 + 953ecba commit 58e27f4

File tree

79 files changed

+5402
-3021
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5402
-3021
lines changed

.github/workflows/publish-test.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Supervision Test Releases to PyPi
1+
name: Publish Supervision Pre-Releases to PyPI and TestPyPI
22
on:
33
push:
44
tags:
@@ -9,9 +9,11 @@ on:
99
workflow_dispatch:
1010

1111
jobs:
12-
build-n-publish:
12+
build-and-publish-pre-release-pypi:
1313
name: Build and publish to PyPI
1414
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
1517
strategy:
1618
matrix:
1719
python-version: ["3.10"]
@@ -30,14 +32,11 @@ jobs:
3032
python -m pip install --upgrade build twine
3133
python -m build
3234
twine check --strict dist/*
33-
- name: 🚀 Publish distribution to PyPI
34-
uses: pypa/gh-action-pypi-publish@release/v1
35-
with:
36-
user: ${{ secrets.PYPI_USERNAME }}
37-
password: ${{ secrets.PYPI_PASSWORD }}
35+
36+
- name: 🚀 Publish to PyPi
37+
uses: pypa/gh-action-pypi-publish@release/v1.10
38+
3839
- name: 🚀 Publish to Test-PyPi
39-
uses: pypa/gh-action-pypi-publish@release/v1
40+
uses: pypa/gh-action-pypi-publish@release/v1.10
4041
with:
4142
repository-url: https://test.pypi.org/legacy/
42-
user: ${{ secrets.PYPI_TEST_USERNAME }}
43-
password: ${{ secrets.PYPI_TEST_PASSWORD }}

.github/workflows/publish.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Supervision Releases to PyPi
1+
name: Publish Supervision Releases to PyPI and TestPyPI
22
on:
33
push:
44
tags:
@@ -7,8 +7,10 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
build:
10+
build-and-publish-pre-release:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
1214
strategy:
1315
matrix:
1416
python-version: ["3.10"]
@@ -27,14 +29,11 @@ jobs:
2729
python -m pip install --upgrade build twine
2830
python -m build
2931
twine check --strict dist/*
32+
3033
- name: 🚀 Publish to PyPi
31-
uses: pypa/gh-action-pypi-publish@release/v1
32-
with:
33-
user: ${{ secrets.PYPI_USERNAME }}
34-
password: ${{ secrets.PYPI_PASSWORD }}
34+
uses: pypa/gh-action-pypi-publish@release/v1.10
35+
3536
- name: 🚀 Publish to Test-PyPi
36-
uses: pypa/gh-action-pypi-publish@release/v1
37+
uses: pypa/gh-action-pypi-publish@release/v1.10
3738
with:
3839
repository-url: https://test.pypi.org/legacy/
39-
user: ${{ secrets.PYPI_TEST_USERNAME }}
40-
password: ${{ secrets.PYPI_TEST_PASSWORD }}

.pre-commit-config.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,31 @@ repos:
2525
- id: mixed-line-ending
2626

2727
- repo: https://github.com/PyCQA/bandit
28-
rev: '1.7.9'
28+
rev: '1.7.10'
2929
hooks:
3030
- id: bandit
3131
args: ["-c", "pyproject.toml"]
3232
additional_dependencies: ["bandit[toml]"]
3333

3434
- repo: https://github.com/astral-sh/ruff-pre-commit
35-
rev: v0.6.2
35+
rev: v0.6.8
3636
hooks:
3737
- id: ruff
3838
args: [--fix, --exit-non-zero-on-fix]
3939
- id: ruff-format
4040
types_or: [ python, pyi, jupyter ]
41+
42+
# - repo: https://github.com/executablebooks/mdformat
43+
# rev: 0.7.17
44+
# hooks:
45+
# - id: mdformat
46+
# additional_dependencies:
47+
# - "mdformat-mkdocs[recommended]>=2.1.0"
48+
# args: ["--number"]
49+
50+
- repo: https://github.com/codespell-project/codespell
51+
rev: v2.3.0
52+
hooks:
53+
- id: codespell
54+
additional_dependencies:
55+
- tomli

CODE_OF_CONDUCT.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
21
# Contributor Covenant Code of Conduct
32

43
## Our Pledge
54

65
We as members, contributors, and leaders pledge to make participation in our
76
community a harassment-free experience for everyone, regardless of age, body
87
size, visible or invisible disability, ethnicity, sex characteristics, gender
9-
identity and expression, level of experience, education, socio-economic status,
8+
identity and expression, level of experience, education, socioeconomic status,
109
nationality, personal appearance, race, caste, color, religion, or sexual
1110
identity and orientation.
1211

@@ -18,23 +17,23 @@ diverse, inclusive, and healthy community.
1817
Examples of behavior that contributes to a positive environment for our
1918
community include:
2019

21-
* Demonstrating empathy and kindness toward other people
22-
* Being respectful of differing opinions, viewpoints, and experiences
23-
* Giving and gracefully accepting constructive feedback
24-
* Accepting responsibility and apologizing to those affected by our mistakes,
20+
- Demonstrating empathy and kindness toward other people
21+
- Being respectful of differing opinions, viewpoints, and experiences
22+
- Giving and gracefully accepting constructive feedback
23+
- Accepting responsibility and apologizing to those affected by our mistakes,
2524
and learning from the experience
26-
* Focusing on what is best not just for us as individuals, but for the overall
25+
- Focusing on what is best not just for us as individuals, but for the overall
2726
community
2827

2928
Examples of unacceptable behavior include:
3029

31-
* The use of sexualized language or imagery, and sexual attention or advances of
30+
- The use of sexualized language or imagery, and sexual attention or advances of
3231
any kind
33-
* Trolling, insulting or derogatory comments, and personal or political attacks
34-
* Public or private harassment
35-
* Publishing others' private information, such as a physical or email address,
32+
- Trolling, insulting or derogatory comments, and personal or political attacks
33+
- Public or private harassment
34+
- Publishing others' private information, such as a physical or email address,
3635
without their explicit permission
37-
* Other conduct which could reasonably be considered inappropriate in a
36+
- Other conduct which could reasonably be considered inappropriate in a
3837
professional setting
3938

4039
## Enforcement Responsibilities
@@ -121,14 +120,14 @@ version 2.1, available at
121120
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
122121

123122
Community Impact Guidelines were inspired by
124-
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123+
[Mozilla's code of conduct enforcement ladder][mozilla coc].
125124

126125
For answers to common questions about this code of conduct, see the FAQ at
127-
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126+
[https://www.contributor-covenant.org/faq][faq]. Translations are available at
128127
[https://www.contributor-covenant.org/translations][translations].
129128

129+
[faq]: https://www.contributor-covenant.org/faq
130130
[homepage]: https://www.contributor-covenant.org
131-
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
132-
[Mozilla CoC]: https://github.com/mozilla/diversity
133-
[FAQ]: https://www.contributor-covenant.org/faq
131+
[mozilla coc]: https://github.com/mozilla/diversity
134132
[translations]: https://www.contributor-covenant.org/translations
133+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

CONTRIBUTING.md

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ We are actively improving this library to reduce the amount of work you need to
66

77
## Code of Conduct
88

9-
Please read and adhere to our [Code of Conduct](CODE_OF_CONDUCT.md). This document outlines the expected behavior for all participants in our project.
9+
Please read and adhere to our [Code of Conduct](https://supervision.roboflow.com/latest/code_of_conduct/). This document outlines the expected behavior for all participants in our project.
1010

1111
## Table of Contents
1212

1313
- [Contribution Guidelines](#contribution-guidelines)
14-
- [Contributing Features](#contributing-features-)
14+
- [Contributing Features](#contributing-features)
1515
- [How to Contribute Changes](#how-to-contribute-changes)
1616
- [Installation for Contributors](#installation-for-contributors)
17-
- [Code Style and Quality](#-code-style-and-quality)
18-
- [Pre-commit tool](#pre-commit-tool)
19-
- [Docstrings](#docstrings)
20-
- [Type checking](#type-checking)
21-
- [Documentation](#-documentation)
22-
- [Cookbooks](#-cookbooks)
23-
- [Tests](#-tests)
24-
- [License](#-license)
17+
- [Code Style and Quality](#code-style-and-quality)
18+
- [Pre-commit tool](#pre-commit-tool)
19+
- [Docstrings](#docstrings)
20+
- [Type checking](#type-checking)
21+
- [Documentation](#documentation)
22+
- [Cookbooks](#cookbooks)
23+
- [Tests](#tests)
24+
- [License](#license)
2525

2626
## Contribution Guidelines
2727

@@ -83,9 +83,10 @@ git push -u origin <your_branch_name>
8383

8484
Use conventional commit messages to clearly describe your changes. The format is:
8585

86-
<type>[optional scope]: <description>
86+
<type>\[optional scope\]: <description>
8787

8888
Common types include:
89+
8990
- feat: A new feature
9091
- fix: A bug fix
9192
- docs: Documentation only changes
@@ -128,40 +129,47 @@ PRs must pass all tests and linting requirements before they can be merged.
128129
Before starting your work on the project, set up your development environment:
129130

130131
1. Clone your fork of the project:
131-
```bash
132-
git clone https://github.com/YOUR_USERNAME/supervision.git
133-
cd supervision
134-
```
135-
Replace `YOUR_USERNAME` with your GitHub username.
132+
133+
```bash
134+
git clone https://github.com/YOUR_USERNAME/supervision.git
135+
cd supervision
136+
```
137+
138+
Replace `YOUR_USERNAME` with your GitHub username.
136139

137140
2. Create and activate a virtual environment:
138-
```bash
139-
python3 -m venv .venv
140-
source .venv/bin/activate
141-
```
141+
142+
```bash
143+
python3 -m venv .venv
144+
source .venv/bin/activate
145+
```
142146

143147
3. Install Poetry:
144148

145-
Using pip:
146-
```bash
147-
pip install -U pip setuptools
148-
pip install poetry
149-
```
149+
Using pip:
150150

151-
Or using pipx (recommended for global installation):
152-
```bash
153-
pipx install poetry
154-
```
151+
```bash
152+
pip install -U pip setuptools
153+
pip install poetry
154+
```
155+
156+
Or using pipx (recommended for global installation):
157+
158+
```bash
159+
pipx install poetry
160+
```
155161

156162
4. Install project dependencies:
157-
```bash
158-
poetry install
159-
```
163+
164+
```bash
165+
poetry install
166+
```
160167

161168
5. Run pytest to verify the setup:
162-
```bash
163-
poetry run pytest
164-
```
169+
170+
```bash
171+
poetry run pytest
172+
```
165173

166174
## 🎨 Code Style and Quality
167175

0 commit comments

Comments
 (0)