-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.justfile
More file actions
44 lines (37 loc) · 906 Bytes
/
.justfile
File metadata and controls
44 lines (37 loc) · 906 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
alias i := install
alias r := run
alias t := test
alias p := pre_commit
alias c := clean
alias ch := check
# Install the virtual environment and pre-commit hooks
install:
uv sync
uv run pre-commit install
# Run pre-commit
pre_commit:
uv run pre-commit run -a
# Clean the project
clean:
# Remove cached files
find . -type d -name "__pycache__" -exec rm -r {} +
find . -type d -name "*.egg-info" -exec rm -r {} +
# Run a package
run *args='trainer':
uv run {{args}}
# Test the code with pytest
test:
uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml
# Run code quality tools
check:
# Check lock file consistency
uv lock --locked
# Run pre-commit
uv run pre-commit run -a
# Run mypy
uv run mypy .
# Run deptry with ignored issues
uv run deptry . --ignore=DEP002,DEP003
# Add scripts
add_scripts:
uv add --script scripts/this.py 'typer>=0.12.5'