-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJustfile
More file actions
66 lines (49 loc) · 1.41 KB
/
Copy pathJustfile
File metadata and controls
66 lines (49 loc) · 1.41 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
@_:
just --list
_require-uv:
@uv --version > /dev/null || (echo "Please install uv: https://docs.astral.sh/uv/" && exit 1)
_require-hatch:
@hatch --version > /dev/null || (echo "Please install hatch: uv tool install hatch" && exit 1)
# check code style and potential issues
lint: _require-uv
uv run ruff check .
# format code
format: _require-uv
uv run ruff format .
# fix automatically fixable linting issues
fix: _require-uv
uv run ruff check --fix .
# run tests across all supported Python versions
test: _require-hatch
hatch run test:test
# build the package
build: _require-uv
uv build
# setup or update local dev environment, keeps previously installed extras
sync: _require-uv
uv sync --inexact --extra dev
uv run pre-commit install
# run tests with coverage and show a coverage report
coverage: _require-uv
uv run coverage run -m pytest
uv run coverage report
# clean build artifacts and caches
clean:
rm -rf .venv .pytest_cache .pyrefly .ruff_cache
find . -type d -name "__pycache__" -exec rm -r {} +
# static type check with pyrefly
typecheck: _require-uv
uv run pyrefly check
# check code for common misspellings
spell: _require-uv
uv run codespell
# run all quality checks
check: lint coverage typecheck spell
uv run ruff format --check .
# list available recipes
help:
just --list
alias fmt := format
alias cov := coverage
alias pyrefly := typecheck
alias dev := sync