-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
83 lines (66 loc) · 1.51 KB
/
Copy pathjustfile
File metadata and controls
83 lines (66 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Set shell options for safety
set shell := ["bash", "-eu", "-o", "pipefail", "-c"]
# Default: create the dev environment
default: dev
# Set up development environment
dev: sync-venv
# Format and lint code
[no-cd]
fmt:
ruff format
ruff check --output-format concise --fix --exit-non-zero-on-fix .
# Run type checkers
[no-cd]
[private]
ty-check:
ty check --output-format concise
[no-cd]
[private]
pyrefly-check:
pyrefly check --output-format min-text
[no-cd]
[private]
mypy-check:
mypy --strict
[no-cd]
[private]
pyright-check:
basedpyright
[no-cd]
[private]
zuban-check:
zuban check
[parallel]
type-check: zuban-check pyright-check
# Run both formatting and type checking
[no-cd]
lint: fmt type-check
# Run tests
[no-cd]
test:
pytest --lf
docs:
sphinx-build -b html docs/ docs/_build/html
# Sync virtual environment
sync-venv:
pixi install --frozen
# Release workflow
bump-version *args: lint test
#!/usr/bin/env bash
set -euo pipefail
echo "Will run: uv version --bump {{ args }}"
read -p "Are you sure? [y/n] " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
uv version --bump {{ args }}
pixi lock
fi
tag-package:
#!/usr/bin/env bash
set -euo pipefail
echo "Will run: git tag $(printf "v%s" $(uv version --short))"
read -p "Are you sure? [y/n] " -n 1 -r
echo # (optional) move to a new line
if [[ $REPLY =~ ^[Yy]$ ]]; then
git tag "$(printf "v%s" $(uv version --short))"
fi