Skip to content

Commit 7c27117

Browse files
authored
Merge branch 'develop' into main
2 parents a4a2d8c + dbade52 commit 7c27117

Some content is hidden

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

47 files changed

+1601
-426
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"
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: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ name: πŸ”§ Poetry Check and Installation Test Workflow
22
on:
33
push:
44
paths:
5-
- 'poetry.lock'
6-
- 'pyproject.toml'
5+
- "poetry.lock"
6+
- "pyproject.toml"
77
pull_request:
88
paths:
9-
- 'poetry.lock'
10-
- 'pyproject.toml'
9+
- "poetry.lock"
10+
- "pyproject.toml"
1111
workflow_dispatch:
1212

1313
jobs:
1414
poetry-tests:
15+
name: Poetry install and check
16+
timeout-minutes: 10
1517
strategy:
1618
fail-fast: false
1719
matrix:
@@ -20,18 +22,21 @@ jobs:
2022
runs-on: ${{ matrix.os }}
2123
steps:
2224
- name: πŸ“₯ Checkout the repository
23-
uses: actions/checkout@v4
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2426

2527
- name: 🐍 Set up Python ${{ matrix.python-version }}
26-
uses: actions/setup-python@v5
28+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2729
with:
2830
python-version: ${{ matrix.python-version }}
2931

30-
- name: πŸ“¦ Install the base dependencies
31-
run: python -m pip install --upgrade poetry
32+
- name: πŸ“œ Setup Poetry
33+
uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd # v3.0.1
3234

3335
- name: πŸ” Check the correctness of the project config
3436
run: poetry check
3537

3638
- name: πŸš€ Do Install the package Test
37-
run: poetry install
39+
run: poetry install --with dev --extras metrics
40+
41+
- name: πŸ§ͺ Run the Import test
42+
run: poetry run python -c "import supervision; from supervision import assets; from supervision import metrics; print(supervision.__version__)"

β€Ž.github/workflows/publish-dev-docs.ymlβ€Ž

Lines changed: 0 additions & 53 deletions
This file was deleted.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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: 🐍 Set up Python ${{ matrix.python-version }}
37+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
41+
- name: πŸ“œ Setup Poetry
42+
uses: abatilo/actions-poetry@e78f54a89cb052fff327414dd9ff010b5d2b4dbd # v3.0.1
43+
44+
- name: πŸ“¦ Install dependencies
45+
run: |
46+
poetry install --with=docs
47+
48+
- name: βš™οΈ Configure git for github-actions
49+
run: |
50+
git config --global user.name "github-actions[bot]"
51+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
52+
53+
- name: πŸš€ Deploy Development Docs
54+
if: (github.event_name == 'push' && github.ref == 'refs/heads/develop') || github.event_name == 'workflow_dispatch'
55+
run: |
56+
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push develop
57+
58+
- name: πŸš€ Deploy Release Docs
59+
if: github.event_name == 'release' && github.event.action == 'published'
60+
run: |
61+
latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`)
62+
MKDOCS_GIT_COMMITTERS_APIKEY=${{ secrets.GITHUB_TOKEN }} poetry run mike deploy --push --update-aliases $latest_tag latest

β€Ž.github/workflows/publish-release-docs.ymlβ€Ž

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

0 commit comments

Comments
Β (0)