Skip to content

Development

Set up the checkout

git clone https://github.com/jasoncpit/dynamic-street-network.git
cd dynamic-street-network/spatialdeform
uv sync --dev --group docs

To build and test the optional PyO3 extension, install Rust and add --extra rust:

uv sync --dev --group docs --extra rust
uv run python benchmarks/benchmark_smacof.py

Run checks

uv run pytest
uvx ruff check .
uvx ruff format --check .
uv run --group docs mkdocs build --strict

The test suite covers both embedding backends, the reusable constrained SMACOF solver, CRS round trips, endpoint identity, MultiLineString deformation, scikit-learn cloning, fixed scenario scale, invalid costs, and disconnected graphs.

Preview documentation

uv run --group docs mkdocs serve

Open http://127.0.0.1:8000 and edit files under docs/. MkDocs reloads the page automatically.

Build distributions

uv build --no-sources

Test both artifacts independently:

uv run --isolated --no-project \
  --with dist/spatialdeform-0.1.0a1-py3-none-any.whl \
  tests/smoke_test.py

uv run --isolated --no-project \
  --with dist/spatialdeform-0.1.0a1.tar.gz \
  tests/smoke_test.py

Release process

  1. update the version in pyproject.toml and src/spatialdeform/__init__.py;
  2. run tests, formatting, strict docs build, and artifact smoke tests;
  3. create the matching PyPI trusted publisher and GitHub pypi environment;
  4. tag the commit spatialdeform-v<version>;
  5. push the tag; the release workflow builds and publishes with uv.

The documentation workflow publishes the site after documentation or package source changes land on main.