Debian Codegraph @

Makefile

raw
1 # `online` tests need a network connection and secrets. Keep this a marker
2 # expression, not a whole flag: a second -m silently overrides the first.
3 TEST_MARKERS := not online
4
5 .PHONY: check
6 check:
7 uv sync --group test --group static
8 uv run ruff format .
9 uv run ruff check . --fix
10 uv run pytest -m '$(TEST_MARKERS)'
11 uv run --python 3.12 --group test pytest -m 'py12 and ($(TEST_MARKERS))'
12 uv sync --group test --group static
13 uv run mypy
14 uv run lint-imports
15
16 .PHONY: lint
17 lint:
18 uv sync --group test --group static
19 uv run ruff format .
20 uv run ruff check . --fix
21 uv run mypy
22 uv run lint-imports
23
24 .PHONY: cold-start
25 cold-start:
26 uv sync --group test --group static
27 uv run python scripts/cold_start.py
28
29 # what the release publishes to harlequin.sh, staged into dist/artifacts so
30 # you can read it before a workflow opens the PR that vendors it.
31 .PHONY: artifacts
32 artifacts:
33 uv sync --group static
34 uv run python scripts/publish_artifacts.py
35
36 .PHONY: serve
37 serve:
38 uv sync --group dev
39 uv run textual run --dev -c harlequin -P dev -f . f1.db
40
41 .PHONY: sqlite
42 sqlite:
43 uv sync --group dev
44 uv run textual run --dev -c harlequin -P sqlite
45
46 .PHONY: keys
47 keys:
48 uv sync --group dev
49 uv run textual run --dev -c harlequin --keys
50
51 marketing: $(wildcard static/themes/*.svg)
52
53 static/themes/%.svg: pyproject.toml scripts/export_screenshots.py
54 uv sync --group dev
55 uv run scripts/export_screenshots.py
56
57 profiles: .profiles/buffers.html .profiles/fast_query.html
58
59 .profiles/buffers.html: scripts/profile_buffers.py pyproject.toml $(shell find src/harlequin -type f)
60 uv sync --group dev
61 uv run pyinstrument -r html -o .profiles/buffers.html "src/scripts/profile_buffers.py"
62
63 .profiles/fast_query.html: scripts/profile_fast_query.py pyproject.toml $(shell find src/harlequin -type f)
64 uv sync --group dev
65 uv run pyinstrument -r html -o .profiles/fast_query.html "src/scripts/profile_fast_query.py"