Files
kennethreitz.org/Makefile
kennethreitzandClaude Fable 5 ea406a22f8 Add test suite: pages, content, feeds, API, and full sitemap sweep
48 tests running in ~8s against an in-process client (api.requests),
so broad refactors now have a safety net. The sweep test fetches every
URL the sitemap advertises and names any that break.

Fixes found while writing them:
- Bare-slug legacy redirects failed for YYYY-MM-DD-named essays (the
  date-strip regex only handled the old YYYY-MM- format)
- Search index was only built by background cache warming, so /api/search
  returned empty results until (or unless) warming finished; it now
  builds lazily on first use
- Sitemap advertised /docs pages that no route serves; removed

Also: make test target, pytest config in pyproject.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-06 22:50:56 -04:00

18 lines
287 B
Makefile

init:
uv sync
test:
uv run pytest
run:
uv run granian --interface asgi --host 0.0.0.0 --port 8000 --reload engine:api
run-prod:
uv run granian --interface asgi --host 0.0.0.0 --port 8000 --workers 4 engine:api
docker-run:
docker-compose up --build
build:
docker compose build