Skip to content

Revival/04 docs - #7

Merged
adaj merged 5 commits into
masterfrom
revival/04-docs
Sep 14, 2026
Merged

adaj merged 5 commits into
masterfrom
revival/04-docs

Conversation

@adaj

@adaj adaj commented Sep 14, 2026

Copy link
Copy Markdown
Owner

No description provided.

adaj and others added 5 commits September 14, 2026 12:49
- pyproject.toml (PEP 621, setuptools backend) replaces setup.py,
  requirements.txt and install.md; version read from predspot.__version__;
  optional extras: `contour` (geojsoncontour) and `dev` (pytest, ruff, build)
- src/ layout so tests always run against the installed package
- ruff lint + format configuration; code base formatted and lint-clean
- CI workflow: ruff, pytest with coverage on Python 3.10-3.13, build + twine
  check of the distribution
- Publish workflow: on a v* tag, verify tag == package version, build and
  upload to PyPI via trusted publishing (no stored token)
- CHANGELOG.md, CONTRIBUTING.md, MANIFEST.in; README badges and install docs

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtZdc2gGrDh4PGSLyT9yRE
- crime_mapping.load_study_area("City, State, Country") geocodes a place
  with osmnx and returns its boundary polygon as a GeoDataFrame ready for
  Dataset / the create_grid* functions; osmnx is an optional extra
  (`predspot[osm]`), points instead of polygons raise a clear error
- New predspot.synthetic module: generate_crimes(study_area, ...) draws
  events from a Gaussian-hotspot + uniform-background spatial mixture and an
  inhomogeneous temporal intensity (linear trend, annual cycle, day-of-week
  and hour-of-day profiles) sampled by thinning; works with any study area
  polygon in any CRS; reproducible with `seed`; can return hotspot centres
- pipeline.generate_testdata now delegates to the synthetic generator
- Tests for both features (osmnx mocked; an opt-in network test is run with
  PREDSPOT_NETWORK_TESTS=1); README/CHANGELOG/CONTRIBUTING updated

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtZdc2gGrDh4PGSLyT9yRE
- mkdocs.yml with Material theme, mkdocstrings API pages generated from the
  docstrings, autorefs cross-references, Mermaid, tabs and admonitions
- New content: home, installation, quickstart, a user guide (how it works,
  data & study areas, grids & mapping, feature engineering, prediction &
  evaluation), API reference per module, changelog/contributing (included
  from the repo files) and a citing page; figures generated with the
  synthetic generator; every code example was executed
- Docstrings converted from Sphinx roles to mkdocstrings cross-references
- Docs workflow: strict build on PRs, deploy to the gh-pages branch on
  pushes to master (replaces the committed Sphinx HTML)
- `docs` extra in pyproject; README points to the site

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtZdc2gGrDh4PGSLyT9yRE
- crime_mapping.get_city_shape(place_query): thin wrapper around
  osmnx.geocode_to_gdf returning the raw city shape (tests included)
- PredictionPipeline.evaluate accepts a list of scorings and returns a
  DataFrame from a single time series CV pass
- examples/natal.ipynb: end-to-end walkthrough on Natal with synthetic data
  (study area from OSM, synthetic events, grids, KDE vs QuadratCount,
  bandwidth comparison, features, pipeline evaluation, recursive forecasts,
  hotspot recovery check); examples/build_natal_notebook.py regenerates it
- README reorganised: framework section summarising Chapter 3 of the thesis
  with Figures 7-12 (docs/assets/thesis), thesis linked in Resources,
  Status moved to the end
- Documentation: the home page is now generated from the README
  (docs/hooks/readme.py) and the notebook is rendered via mkdocs-jupyter
  under "Examples"

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FtZdc2gGrDh4PGSLyT9yRE
Revival 5/5: framework README, Natal example notebook and get_city_shape
@adaj
adaj merged commit 2e00ddb into master Sep 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant