Skip to content

feat!: ObjectNat 2.0 — UrbanGraph migration, structured provision, clustering removal - #16

Merged
DDonnyy merged 3 commits into
masterfrom
feature/objectnat2.0
Jul 10, 2026
Merged

feat!: ObjectNat 2.0 — UrbanGraph migration, structured provision, clustering removal#16
DDonnyy merged 3 commits into
masterfrom
feature/objectnat2.0

Conversation

@DDonnyy

@DDonnyy DDonnyy commented Jul 10, 2026

Copy link
Copy Markdown
Owner

BREAKING CHANGE: get_service_provision returns ProvisionResult; graph methods
consume iduedu.UrbanGraph; get_clusters_polygon removed; networkx and
scikit-learn are no longer direct dependencies.

DDonnyy added 3 commits July 9, 2026 15:20
… layout

Full ObjectNat 2.0 migration off NetworkX onto the IduEdu 2.0 UrbanGraph model,
plus a build-system and repository overhaul aligned with IduEdu.

Accessibility (isochrones + coverage)
- New objectnat/methods/accessibility/ package (coverage, isochrones, radius,
  shared _utils) built directly on iduedu.UrbanGraph and its Numba Dijkstra
  (multi_source / nearest_source / parallel), replacing the deleted
  methods/isochrones/ and methods/coverage_zones/ NetworkX code.
- "ways" geometry uses pedestrian (type=="walk") edges only on intermodal/walk
  graphs so transit legs no longer distort the shape.

Build system & packaging
- poetry -> uv + hatchling; version is dynamic from objectnat/_version.py.
- PEP 621 [project] + PEP 735 [dependency-groups]; python-semantic-release.
- CI split into quality.yml / release.yml / docs.yml (mirrors IduEdu), uv-based;
  test-image publishing to the assets branch preserved.
- src/objectnat + src/tests -> flat objectnat/ + tests/ (tests no longer a package).

Cleanup
- Removed objectnat.gdf_to_graph, dead graph utils (reverse_graph,
  remove_weakly_connected_nodes, get_closest_nodes_from_gdf) and math_utils;
  dropped the dead commented get_visibilities_from_points block in visibility.
- Exported get_air_resist_ratio from objectnat.methods.noise.
- Added AGENTS.md, CONTRIBUTING.md, CHANGELOG.md, .editorconfig, .gitattributes.

Tests validated on a live intermodal graph: accessibility 14/14 and noise 5/5
green under pandas 3.0. Known issue: clustering (HDBSCAN cluster_selection_epsilon)
fails on numpy 2.4 — upstream scikit-learn bug (#33219), tracked separately.

BREAKING CHANGE: graph-based methods now take an iduedu.UrbanGraph, not a
networkx.Graph. get_accessibility_isochrones -> get_graph_isochrones and
get_accessibility_isochrone_stepped -> get_stepped_graph_isochrones; isochrones
return a single GeoDataFrame instead of (isochrones, pt_stops, pt_routes).
Arguments are keyword-only and renamed: nx_graph -> urban_graph,
points/point -> gdf_origins, gdf_to -> gdf_destinations,
weight_value -> weight_value_cutoff, isochrone_type/step_type -> geometry_type.
Removed objectnat.gdf_to_graph and the math_utils module. Requires
iduedu>=2.0.0, pandas>=3.0, numpy>=2.4.
Refactor service provision to return a ProvisionResult with sparse flow storage,
separate demand/capacity summaries, and helper functions for materializing
buildings, services, and link GeoDataFrames.

Split provision calculation and result formatting into dedicated modules, remove
the old Provision model, export the new provision helpers, and update provision
tests, docs, and example notebook for the new API.

Improve noise propagation through vegetation by using layered tree attenuation,
robust signed-angle shadow sectors, and an optional source_position_buffer_r for
sources located inside buildings or trees.

Add ObjectNat 2.0 migration planning notes and allow lock files to be tracked.

BREAKING CHANGE: get_service_provision now a returns ProvisionResult instead of a tuple of GeoDataFrames.
recalculate_links now accepts and returns ProvisionResult.
- remove point clustering from the public API and runtime dependencies
- drop networkx and scikit-learn from project dependencies
- add focused unit coverage for provision, noise, geom utils, and config
- make provision allocation seed configurable and document ProvisionResult
- update CI quality workflow with lint and Python 3.11/3.12 test matrix
- refresh README, Sphinx docs, migration guide, and ObjectNat 2.0 examples
- update notebooks for UrbanGraph, OD matrix parquet export, coverage joins, noise edges, and visibility API
@DDonnyy
DDonnyy merged commit 8d9ff49 into master Jul 10, 2026
4 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.

2 participants