Skip to content

Commit d8de58d

Browse files
authored
Merge pull request #1742 from roboflow/develop
`supervision-0.26.0` release
2 parents a4a2d8c + a1e4029 commit d8de58d

File tree

183 files changed

+15055
-10373
lines changed

Some content is hidden

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

183 files changed

+15055
-10373
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. They will be requested for review when someone
3+
# opens a pull request.
4+
* @SkalskiP @onuralpszr

.github/dependabot.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ updates:
44
- package-ecosystem: "github-actions"
55
directory: "/"
66
schedule:
7-
interval: "daily"
7+
interval: "weekly"
88
commit-message:
99
prefix: ⬆️
10+
target-branch: "develop"
1011
# Python
1112
- package-ecosystem: "pip"
1213
directory: "/"
1314
schedule:
14-
interval: "daily"
15+
interval: "weekly"
1516
commit-message:
1617
prefix: ⬆️
18+
target-branch: "develop"

.github/workflows/clear-cache.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,42 @@
1-
21
name: Clear cache
32

43
on:
5-
schedule:
6-
- cron: '0 0 1 * *'
7-
workflow_dispatch:
4+
schedule:
5+
- cron: "0 0 1 * *" # Run at midnight on the first day of every month
6+
workflow_dispatch:
87

8+
# Restrict permissions by default
99
permissions:
10-
actions: write
10+
actions: write # Required for cache management
1111

1212
jobs:
1313
clear-cache:
14+
name: Clear cache
1415
runs-on: ubuntu-latest
16+
timeout-minutes: 10
1517
steps:
1618
- name: Clear cache
17-
uses: actions/github-script@v7
19+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
1820
with:
1921
script: |
20-
console.log("About to clear")
22+
console.log("Starting cache cleanup...")
2123
const caches = await github.rest.actions.getActionsCacheList({
2224
owner: context.repo.owner,
2325
repo: context.repo.repo,
2426
})
27+
28+
let deletedCount = 0
2529
for (const cache of caches.data.actions_caches) {
26-
console.log(cache)
27-
github.rest.actions.deleteActionsCacheById({
28-
owner: context.repo.owner,
29-
repo: context.repo.repo,
30-
cache_id: cache.id,
31-
})
30+
console.log(`Deleting cache: ${cache.key} (${cache.size_in_bytes} bytes)`)
31+
try {
32+
await github.rest.actions.deleteActionsCacheById({
33+
owner: context.repo.owner,
34+
repo: context.repo.repo,
35+
cache_id: cache.id,
36+
})
37+
deletedCount++
38+
} catch (error) {
39+
console.error(`Failed to delete cache ${cache.key}: ${error.message}`)
40+
}
3241
}
33-
console.log("Clear completed")
42+
console.log(`Cache cleanup completed. Deleted ${deletedCount} caches.`)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Combine Dependabot PRs
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 * * 3" # Wednesday at 01:00
6+
workflow_dispatch: # allows you to manually trigger the workflow
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
checks: read
12+
13+
jobs:
14+
combine-prs:
15+
name: Combine
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: combine-prs
19+
id: combine-prs
20+
uses: github/combine-prs@2909f404763c3177a456e052bdb7f2e85d3a7cb3 # v5.2.0
21+
with:
22+
labels: combined-pr

.github/workflows/notebook-bot.yml

Lines changed: 0 additions & 64 deletions
This file was deleted.

.github/workflows/poetry-test.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.github/workflows/publish-dev-docs.yml

Lines changed: 0 additions & 53 deletions
This file was deleted.

.github/workflows/publish-docs.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Build and Publish Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
workflow_dispatch:
8+
release:
9+
types: [published]
10+
11+
# Ensure only one concurrent deployment
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event_name == 'push' && github.ref}}
14+
cancel-in-progress: true
15+
16+
# Restrict permissions by default
17+
permissions:
18+
contents: write # Required for committing to gh-pages
19+
pages: write # Required for deploying to Pages
20+
pull-requests: write # Required for PR comments
21+
22+
jobs:
23+
deploy:
24+
name: Publish Docs
25+
runs-on: ubuntu-latest
26+
timeout-minutes: 10
27+
strategy:
28+
matrix:
29+
python-version: ["3.10"]
30+
steps:
31+
- name: 📥 Checkout the repository
32+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
fetch-depth: 0
35+
36+
- name: 🐍 Install uv and set Python ${{ matrix.python-version }}
37+
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
activate-environment: true
41+
42+
43+
- name: 🔑 Create GitHub App token (mkdocs)
44+
id: mkdocs_token
45+
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
46+
with:
47+
app-id: ${{ secrets.MKDOCS_APP_ID }}
48+
private-key: ${{ secrets.MKDOCS_PEM }}
49+
owner: roboflow
50+
repositories: mkdocs-material-insiders
51+
52+
- name: 🏗️ Install dependencies
53+
run: |
54+
uv pip install -r pyproject.toml --group docs
55+
# Install mkdocs-material-insiders using the GitHub App token
56+
uv pip install "git+https://roboflow:${{ steps.mkdocs_token.outputs.token }}@github.com/roboflow/mkdocs-material-insiders.git@9.5.49-insiders-4.53.14#egg=mkdocs-material[imaging]"
57+
58+
- name: ⚙️ Configure git for github-actions
59+
run: |
60+
git config --global user.name "github-actions[bot]"
61+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
62+
63+
- name: 🚀 Deploy Development Docs
64+
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch'
65+
run: |
66+
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push develop
67+
68+
- name: 🚀 Deploy Release Docs
69+
if: github.event_name == 'release' && github.event.action == 'published'
70+
run: |
71+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
72+
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} uv run mike deploy --push --update-aliases $latest_tag latest
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish Supervision Pre-Releases to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]"
7+
- "[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]"
8+
- "[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]"
9+
workflow_dispatch:
10+
11+
permissions: {} # Explicitly remove all permissions by default
12+
13+
jobs:
14+
publish-pre-release:
15+
name: Publish Pre-release Package
16+
runs-on: ubuntu-latest
17+
environment:
18+
name: test
19+
url: https://pypi.org/project/supervision/
20+
timeout-minutes: 10
21+
permissions:
22+
id-token: write # Required for PyPI publishing
23+
contents: read # Required for checkout
24+
strategy:
25+
matrix:
26+
python-version: ["3.10"]
27+
steps:
28+
- name: 📥 Checkout the repository
29+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30+
31+
- name: 🐍 Install uv and set Python version ${{ matrix.python-version }}
32+
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.3.1
33+
with:
34+
python-version: ${{ matrix.python-version }}
35+
activate-environment: true
36+
37+
38+
- name: 🏗️ Build source and wheel distributions
39+
run: |
40+
uv pip install -r pyproject.toml --group build
41+
uv build
42+
uv run twine check --strict dist/*
43+
44+
- name: 🚀 Publish to PyPi
45+
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
46+
with:
47+
attestations: true

0 commit comments

Comments
 (0)