Documentation

Contributing

Build, test and commit changes to geolith search.

Checks

Run all three before every commit:

cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test

Tests against the planet database

Some tests need the planet database and are ignored by default:

GEOLITH_SEARCH_TEST_DATABASE_URL=postgres://postgres:pg@localhost:54331/postgres \
  cargo test -- --ignored --test-threads=1

Use one test thread when a server is also connected, so the tests do not run out of Postgres connections.

API docs

The OpenAPI document comes from the #[utoipa::path] attributes on the handlers. After changing them, review the snapshot:

cargo insta review

Commits

Use conventional commits with a lowercase subject: feat, fix, perf, refactor, test, docs, ci, chore.