-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
61 lines (48 loc) · 966 Bytes
/
justfile
File metadata and controls
61 lines (48 loc) · 966 Bytes
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
set shell := ["bash", "-cu"]
set windows-shell := ["pwsh", "-Command"]
pkg := "package"
# Default action
_:
just fmt
just lint
just type
just test
# Install
i:
uv sync --all-packages
# Format the code
fmt:
uv run ruff format
# Lint the code
lint:
ls-lint -config ./.ls-lint.yaml
typos
uv run ruff check --fix
# Check types
type:
uv run ty check
# Run tests
test:
uv run pytest
# Build the package
build:
uv build --package jder_fastapi --out-dir ./{{pkg}}/dist
# Run example
example:
cd example && uv run fastapi dev main.py --port 4001
# Publish package as dry-run
publish-try:
cd ./{{pkg}} && uv publish --dry-run
# Publish package
publish:
cd ./{{pkg}} && uv publish
# Clean caches
clean:
cd ./{{pkg}} && rm -rf ./dist
rm -rf .pytest_cache
rm -rf .ruff_cache
find . -type d -name "__pycache__" -exec rm -rf {} +
# Clean everything
clean-all:
just clean
rm -rf .venv