perfect-postcode/Taskfile.yml
2026-02-15 22:39:53 +00:00

126 lines
2.8 KiB
YAML

version: '3'
tasks:
install:
desc: Install dependencies
cmds:
- uv sync
- cd frontend && npm install
download:map-assets:
desc: Download font glyphs and emoji PNGs for local serving
status:
- test -d frontend/public/assets/fonts
- test -d frontend/public/assets/twemoji
cmds:
- uv run python -m pipeline.download.map_assets --output frontend/public/assets
download:places:
desc: Extract place names from OSM PBF
cmds:
- uv run python -m pipeline.download.places --output ./property-data/places.parquet {{.CLI_ARGS}}
test:
desc: Run all tests (Python and Rust)
cmds:
- task: test:python
- task: test:server
test:python:
cmds:
- uv run -m pipeline.utils.test_fuzzy_join
- uv run pytest pipeline/utils/test_haversine.py
- uv run pytest pipeline/utils/test_poi_counts.py
- uv run pytest pipeline/transform/postcode_boundaries/test_postcode_boundaries.py
test:server:
desc: Run Rust backend tests
dir: server-rs
cmds:
- cargo test
dev:
desc: Start all services (server, frontend, pocketbase) via Docker Compose
cmds:
- docker compose up --build
build:server:
desc: Build server for production
dir: server-rs
cmds:
- cargo build --release
build:frontend:
desc: Build frontend for production
dir: frontend
cmds:
- npm run typecheck
- npm run build
lint:
desc: Lint all code (Python, TypeScript, and Rust)
cmds:
- task: lint:python
- task: lint:frontend
- task: lint:rust
lint:python:
desc: Lint Python code with ruff and check for unused dependencies
cmds:
- uv run ruff check .
- uv run deptry .
lint:frontend:
desc: Lint frontend TypeScript code
dir: frontend
cmds:
- npm run lint
- npm run format:check
lint:rust:
desc: Lint Rust code with clippy, check formatting, and detect unused dependencies
dir: server-rs
cmds:
- cargo clippy -- -D warnings
- cargo fmt --check
- cargo machete
format:
desc: Format all code (Python, TypeScript, and Rust)
cmds:
- task: format:python
- task: format:frontend
- task: format:rust
format:python:
desc: Format Python code with ruff
cmds:
- uv run ruff check --fix .
- uv run ruff format .
format:frontend:
desc: Format frontend TypeScript code
dir: frontend
cmds:
- npm run lint:fix
- npm run format
format:rust:
desc: Format Rust code with cargo fmt
dir: server-rs
cmds:
- cargo fmt --all
check:
desc: Run all checks (lint, typecheck, build)
cmds:
- task: lint
- task: build:server
- task: build:frontend
- task: test
- task: test:server