-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
49 lines (40 loc) · 908 Bytes
/
justfile
File metadata and controls
49 lines (40 loc) · 908 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
[default]
_default:
@just --list
# Run all checks
check *args:
@just test {{ args }}
@just lint
# Format the code
fmt:
@uv run ruff format
# Run the tests
test *args:
@uv run pytest {{ args }}
# Run the linters
lint:
@uv run ty check
@uv run ruff check
@uv run ruff format --check
@uv run deptry .
@typos
# Auto-fix issues
fix:
@uv run ruff check --fix
@just fmt
# Create a new version tag
tag tag message="":
#!/bin/bash
VERSION=$(uv version --short)
if [[ "{{ tag }}" != "v$VERSION" ]]; then
echo "Error: tag '{{ tag }}' doesn't match pyproject.toml version 'v$VERSION'"
exit 1
fi
if [[ -n "$(git status -s)" ]]; then
echo "Error: There are uncommitted changes"
exit 1
fi
MSG="{{ message }}"
MSG="${MSG:-Tag {{ tag }}}"
git tag -a "{{ tag }}" -m "$MSG"
echo "Tagged {{ tag }}"