Skip to content

Robustness, reproducibility & dependency-safety improvements - #85

Merged
chrieke merged 1 commit into
mainfrom
streamlit-osm-importerror
Jul 8, 2026
Merged

chrieke merged 1 commit into
mainfrom
streamlit-osm-importerror

Conversation

@chrieke

@chrieke chrieke commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Code-only changes. The version bump + CHANGELOG + requirements.txt pin for the 0.7.0 release are in a separate PR, to be merged after this one.

Summary

  • Replace private geopandas.plotting functions with public matplotlib collections, and use the stable top-level osmnx API instead of submodule imports — avoids breakage on dependency upgrades.
  • Add dpi parameter to Plot (default 300, was hardcoded 1200) — much faster, lower-memory rendering; library fig.savefig() no longer silently produces ~14,400px files.
  • Seed building color variation so identical inputs render identical maps; custom cmaps now use all their colors.
  • Translate osmnx InsufficientResponseError into OsmDataError; vectorize explode_multigeometries (was quadratic).
  • Bound osmnx<3; declare geopandas/shapely as direct dependencies.
  • Fix ineffective geocode mocks that silently hit the live Nominatim service; add offline tests for the full Plot pipeline; add GitHub Actions CI.
  • Tooling: Makefile → uv, ship LICENSE in wheel, exclude tests from wheel, Dockerfile installs local source. Doc fixes.

Test plan

  • black, pylint, mypy, pytest all pass (offline). Package builds. Full Streamlit app runs end-to-end on live OSM data with no errors.

@chrieke
chrieke force-pushed the streamlit-osm-importerror branch 2 times, most recently from 458ba76 to e629508 Compare July 8, 2026 14:09
@chrieke chrieke mentioned this pull request Jul 8, 2026
- Replace private geopandas.plotting functions with public matplotlib
  collections (PatchCollection/LineCollection, polygon holes honored).
- Use the stable top-level osmnx API (ox.geocode, ox.features_from_polygon)
  instead of submodule imports; bound osmnx<3; declare geopandas/shapely as
  direct dependencies.
- Add dpi parameter to Plot (default 300, was hardcoded 1200) for much
  faster, lower-memory rendering.
- Seed building color variation so identical inputs render identical maps;
  custom cmaps use all their colors instead of the first 3.
- Translate osmnx InsufficientResponseError into OsmDataError.
- Vectorize explode_multigeometries (was quadratic), preserve input CRS.
- Fix ineffective geocode mocks that silently hit the live Nominatim
  service on every test run; correct expected values.
- Add offline tests for the full Plot rendering pipeline; tests now run
  from any working directory.
- Add GitHub Actions CI (format, lint, type-check, test, build).
- Modernize Makefile to uv; ship LICENSE in the wheel; exclude tests from
  the wheel; upgrade yanked numpy 2.4.0.
- Install the library from local source in the Dockerfile so app and
  package cannot drift apart.
- Fix README/notebook examples that mutated global settings via shallow
  copy; use None-sentinel defaults instead of mutable dict defaults.
- Clean up stale examples.json entries.
@chrieke
chrieke force-pushed the streamlit-osm-importerror branch from e629508 to e1a10b7 Compare July 8, 2026 14:12
@chrieke
chrieke merged commit 4254606 into main Jul 8, 2026
1 check passed
@chrieke
chrieke deleted the streamlit-osm-importerror branch July 8, 2026 14:16
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