Revival/04 docs - #7
Merged
Merged
Conversation
- 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.