This repository was archived by the owner on Jan 12, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
111 lines (94 loc) · 2.2 KB
/
Justfile
File metadata and controls
111 lines (94 loc) · 2.2 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
alias check := checks
alias linter := lint
alias lints := lint
alias lintr := lint
alias ruff := format
alias ruff-check := ruff-checks
alias test := pytest
alias tests := pytest
alias typing := static
[group("Misc")]
[doc("List Just recipes")]
default:
@just --list
[group("Misc")]
dev-deps:
uv add --dev mypy basedpyright ty pyrefly ruff pytest
[group("Ruff")]
[doc("Format code (modifies files)")]
format:
@echo
uv run ruff format
[group("Checks")]
[group("Ruff")]
[doc("Check if files are formatted")]
format-check:
@echo
uv run ruff format --check
[group("Checks")]
[group("Ruff")]
[doc("Run linter (does not modify files)")]
lint:
@echo
uv run ruff check
[group("Checks")]
[group("Ruff")]
[doc("Run Ruff checks: format-check + lint")]
ruff-checks: format-check lint
[group("Checks")]
[group("Tests")]
pytest:
@echo
uv run pytest --doctest-modules
[group("Checks")]
[doc("Run static typing checks")]
static:
@echo
uv run basedpyright
@echo
uv run mypy .
@echo
uv run pyrefly check
@echo
uv run ty check
[group("Checks")]
[group("Tests")]
[group("Ruff")]
[doc("Run all checks: Ruff linter/formatter, static typing, tests")]
checks:
uv lock --check
@just ruff-checks pytest static
[doc("Template steps for a release. Usage: just release <major|minor|patch>")]
[group("Misc")]
release semver:
#!/usr/bin/sh
just checks
uv version --bump {{ semver }}
new_version="$(uv version --short)"
uv sync
git add pyproject.toml uv.lock
git commit -m "chore(release): bump version"
git cliff --tag "$new_version" --output CHANGELOG.md
git add CHANGELOG.md
git commit -m "chore(release): update CHANGELOG"
git tag "$new_version"
git push origin main --tags
[doc("Clean temporary files")]
[group("Misc")]
clean:
@echo "Cleaning temporary files, except in .venv and .env"
find . -type d \
-name .venv -prune \
-o -name .env -prune \
-o \( \
-name .mypy_cache -o \
-name .pytest_cache -o \
-name __pycache__ -o \
-name .ruff_cache -o \
-name .idea -o \
-name dist -o \
-name main.spec -o \
-name build \
\) \
-print \
-exec rm -rf {} +