Skip to content

Commit 5181487

Browse files
authored
Merge pull request #4 from roboflow/toml/uv
ci: 👷 update dependencies in pyproject.toml and uv.lock and adding pre-commit config file
2 parents 7033b52 + 631e4eb commit 5181487

File tree

7 files changed

+398
-38
lines changed

7 files changed

+398
-38
lines changed

.github/workflows/publish-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535

3636
- name: 🏗️ Build source and wheel distributions
3737
run: |
38-
uv pip install -r pyproject.toml --extra build
38+
uv pip install -r pyproject.toml --group build
3939
uv build
4040
uv run twine check --strict dist/*
4141

.github/workflows/test-doc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: 🏗️ Install dependencies
3232
run: |
33-
uv pip install -r pyproject.toml --extra docs
33+
uv pip install -r pyproject.toml --group docs
3434
3535
3636
- name: 🧪 Test Docs Build

.github/workflows/uv-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
prune-cache: ${{ matrix.os != 'windows-latest' }}
2727

2828
- name: 🚀 Install Packages
29-
run: uv pip install -r pyproject.toml --extra dev --extra docs
29+
run: uv pip install -r pyproject.toml --group dev --group docs
3030

3131
#- name: 🧪 Run the Import test
3232
# run: uv run python -c "import trackers"

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,4 +169,4 @@ data/
169169
test.py
170170
**.pt
171171
**.pth
172-
.DS_Store
172+
.DS_Store

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
ci:
3+
autofix_prs: true
4+
autoupdate_schedule: weekly
5+
autofix_commit_msg: "fix(pre_commit): 🎨 auto format pre-commit hooks"
6+
autoupdate_commit_msg: "chore(pre_commit): ⬆ pre_commit autoupdate"
7+
8+
repos:
9+
- repo: https://github.com/pre-commit/pre-commit-hooks
10+
rev: v5.0.0
11+
hooks:
12+
- id: trailing-whitespace
13+
exclude: test/.*\.py
14+
- id: check-executables-have-shebangs
15+
- id: check-toml
16+
- id: check-case-conflict
17+
- id: check-added-large-files
18+
- id: detect-private-key
19+
- id: pretty-format-json
20+
args: ['--autofix', '--no-sort-keys', '--indent=4']
21+
exclude: /.*\.ipynb
22+
- id: end-of-file-fixer
23+
- id: mixed-line-ending
24+
25+
- repo: https://github.com/PyCQA/bandit
26+
rev: '1.8.3'
27+
hooks:
28+
- id: bandit
29+
args: ["-c", "pyproject.toml"]
30+
additional_dependencies: ["bandit[toml]"]
31+
32+
- repo: https://github.com/astral-sh/ruff-pre-commit
33+
rev: v0.11.2
34+
hooks:
35+
- id: ruff
36+
args: [--fix, --exit-non-zero-on-fix]
37+
- id: ruff-format
38+
types_or: [ python, pyi, jupyter]
39+
40+
- repo: https://github.com/pre-commit/mirrors-mypy
41+
rev: 'v1.15.0'
42+
hooks:
43+
- id: mypy

pyproject.toml

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,10 @@ classifiers = [
2828
"Typing :: Typed",
2929
"Operating System :: POSIX",
3030
"Operating System :: Unix",
31-
"Operating System :: MacOS"
31+
"Operating System :: MacOS",
32+
"Operating System :: Microsoft :: Windows",
3233
]
33-
keywords = ["tracking", "machine-learning", "deep-learning", "vision", "ML", "DL", "AI", "DETR", "YOLO", "Roboflow"]
34+
keywords = ["tracking","mot","sort","deepsort", "machine-learning", "deep-learning", "vision", "ML", "DL", "AI", "DETR", "YOLO", "Roboflow"]
3435

3536
dependencies = [
3637
"firerequests>=0.1.2",
@@ -39,6 +40,22 @@ dependencies = [
3940
]
4041

4142
[project.optional-dependencies]
43+
cpu = [
44+
"torch>=2.6.0",
45+
"torchvision>=0.21.0",
46+
]
47+
cu124 = [
48+
"torch>=2.6.0",
49+
"torchvision>=0.21.0",
50+
]
51+
52+
deepsort = [
53+
"scipy>=1.13.1",
54+
"timm>=1.0.15",
55+
"validators>=0.34.0",
56+
]
57+
58+
[dependency-groups]
4259
dev = [
4360
"uv>=0.4.20",
4461
"pytest>=8.3.3",
@@ -60,20 +77,12 @@ docs = [
6077
"mike>=2.1.3",
6178
]
6279

63-
cpu = [
64-
"torch>=2.6.0",
65-
"torchvision>=0.21.0",
66-
]
67-
cu124 = [
68-
"torch>=2.6.0",
69-
"torchvision>=0.21.0",
80+
build = [
81+
"twine>=5.1.1",
82+
"wheel>=0.40",
83+
"build>=0.10"
7084
]
7185

72-
deepsort = [
73-
"scipy>=1.13.1",
74-
"timm>=1.0.15",
75-
"validators>=0.34.0",
76-
]
7786

7887
[tool.uv]
7988
conflicts = [
@@ -198,7 +207,7 @@ fixable = [
198207
unfixable = []
199208
# Allow unused variables when underscore-prefixed.
200209
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
201-
pylint.max-args = 20
210+
pylint.max-args = 5 # Default is 5
202211

203212
[tool.ruff.lint.flake8-quotes]
204213
inline-quotes = "double"
@@ -212,8 +221,8 @@ convention = "google"
212221
"__init__.py" = ["E402", "F401"]
213222

214223
[tool.ruff.lint.mccabe]
215-
# Flag errors (`C901`) whenever the complexity level exceeds 5.
216-
max-complexity = 20
224+
# Flag errors (`C901`) whenever the complexity level exceeds 10.
225+
max-complexity = 10
217226

218227
[tool.ruff.lint.isort]
219228
order-by-type = true

0 commit comments

Comments
 (0)