-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathjustfile
More file actions
43 lines (34 loc) · 891 Bytes
/
justfile
File metadata and controls
43 lines (34 loc) · 891 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
set positional-arguments
set dotenv-load
set shell := ["bash", "-cue"]
root_dir := `git rev-parse --show-toplevel`
flake_dir := root_dir / "tools/nix"
# Manage nix flakes
mod nix 'tools/just/nix.just'
[private]
default:
just --unsorted --list --no-aliases
alias dev := develop
# Enter a development shell.
develop:
just nix::develop default
# Set up python environment.
setup:
@echo "🔧 Setting up python environment"
uv sync --all-extras --group dev
uv run pre-commit install
# Run all quality checks.
check: setup
@echo "🚀 Validating lock file"
uv lock --check
@echo "🚀 Running all pre-commit hooks"
uv run pre-commit run -a
alias fmt := format
# Format code.
format *args: setup
@echo "🚀 Formatting python code"
uv run ruff format {{args}}
# Run unit tests.
test *args: setup
@echo "🚀 Testing code: Running pytest"
@uv run pytest {{args}}