aboutsummaryrefslogtreecommitdiffstats
path: root/justfile
blob: b25fb1e35dd32aae9fab476a6d4f8fa672e7624f (plain) (blame)
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
export VIRTUAL_ENV := ""

docker := if `test -w /var/run/docker.sock && echo ok || echo no` == "ok" { "docker" } else { "sudo docker" }

default: check

install-dev:
    uv sync

check: format-check lint typecheck

check-strict: check
    uv run --inexact ruff check --select F401,F841,ARG,PLR0913,C901,RUF src/ test/

fix:
    uv run --inexact ruff format src/ test/
    uv run --inexact ruff check --fix src/ test/

format:
    uv run --inexact ruff format src/ test/

format-check:
    uv run --inexact ruff format --check src/ test/

lint:
    uv run --inexact ruff check src/ test/

typecheck:
    uv run --inexact mypy src/

test:
    uv run --inexact pytest

test-docker:
    {{docker}} compose -f compose/scenarios/standalone.yml run --build --rm gemini-py

test-docker-tools:
    {{docker}} compose -f compose/scenarios/standalone.yml run --build --rm gemini-py /app/scripts/tool_test.py

build:
    uv build

clean:
    rm -rf dist/ .mypy_cache/ .ruff_cache/
    find . -type d -name __pycache__ -exec rm -rf {} +