v0.4.0 #171
yu-ta-sato
announced in
Announcements
v0.4.0
#171
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's Changed
v0.4.0focuses on directed/undirected edge handling across the GeoPandas ⇄ PyTorch Geometric ⇄ NetworkX conversion pipeline, a terminology rename in the morphology module, and more robust tessellation.Added
directedparameter togdf_to_pyg(). With the new defaultdirected=False, each edge(u, v)is symmetrized by adding the reverse edge(v, u)so PyTorch Geometric receives a proper undirected graph, andpyg_to_gdf()deduplicates the edges back to the original rows on reconstruction. For heterogeneous graphs,directedalso accepts a per-edge-type dictionary. Related PRs: [#157](Fix the treatment of undirected edges ingdf_to_pygandpyg_to_gdf#157)reverse_edge_typesparameter togdf_to_pyg()for undirected cross-type heterogeneous edges:"auto"generates(dst_type, "rev_<relation>", src_type)stores for message passing, a dict provides explicit mappings, andNoneenables strict mode. Related PRs: [#157](Fix the treatment of undirected edges ingdf_to_pygandpyg_to_gdf#157)multigraphparameter togdf_to_pyg()that promotes two-level edge indexes to a keyed(source, target, key)contract so parallel edges round-trip exactly, and extendednx_to_pyg()/pyg_to_nx()to infer directionality from the NetworkX graph type and to preserveMultiGraph/MultiDiGraphedge keys. Related PRs: [#157](Fix the treatment of undirected edges ingdf_to_pygandpyg_to_gdf#157)canonicalize_edges()to collapse reciprocal(u, v)/(v, u)rows and parallel duplicates in edge GeoDataFrames (duplicates="first" | "key" | "error"), andsymmetrize_edges()as its idempotent inverse, appending reverse rows with reversed geometries. Related PRs: [#157](Fix the treatment of undirected edges ingdf_to_pygandpyg_to_gdf#157), [#168](Addsymmetrize_edges()andduplicate_edgesparameter for the functions of undirected graph construction #168)duplicate_edgesparameter to the proximity generators (knn_graph(),delaunay_graph(),gabriel_graph(),relative_neighborhood_graph(),euclidean_minimum_spanning_tree(),fixed_radius_graph(),waxman_graph(),contiguity_graph()) and the morphology functions to optionally emit both(u, v)and(v, u)rows per undirected edge. Related PRs: [#168](Addsymmetrize_edges()andduplicate_edgesparameter for the functions of undirected graph construction #168)extent_buffer,limit, andinclude_unenclosed_buildingsparameters tomorphological_graph(), amax_connection_distanceparameter toplace_to_movement_graph(), and alimitparameter tocreate_tessellation()(auto-computed as a buffered convex hull when omitted, so buildings near outer street loops are no longer dropped). Related PRs: [#164](Fix/fix tessellations #164)directedparameter tosegments_to_graph();directed=Falsecanonicalizes each edge to an unordered(min, max)node-id order so reverse-drawn duplicate segments become parallel edges of one unordered pair. Related PRs: [#165](Set multigraph by default forsegments_to_graph()#165)Changed
gdf_to_pyg()now treats edges as undirected by default and validates them: edge tables containing both(u, v)and(v, u)rows (typical of OSMnx-style directed sources), or parallel rows for the same unordered pair, raise aValueErrorpointing tocanonicalize_edges(),multigraph=True, ordirected=Trueas remedies. Passdirected=Trueto restore the previous as-is behavior. Related PRs: [#157](Fix the treatment of undirected edges ingdf_to_pygandpyg_to_gdf#157)"place"and"movement"; edge types are("place", "touched_to", "place"),("movement", "connected_to", "movement"), and("place", "faced_to", "movement"); identifier columns areplace_id,movement_id,from_place_id/to_place_id, andfrom_movement_id/to_movement_id. Related PRs: [#169](Change the wording in morphological_graph #169)segments_to_graph()now defaults tomultigraph=True, returning a three-level(from_node_id, to_node_id, edge_key)MultiIndex (and annx.MultiGraphwhenas_nx=True). Withmultigraph=False, duplicate node pairs now raise aValueErrorinstead of silently returning a duplicated MultiIndex. Related PRs: [#165](Set multigraph by default forsegments_to_graph()#165)requests2.33.0,aiohttp3.14.0,pillow12.2.0,pytest9.0.3,nbconvert7.17.1, andcodecov/codecov-actionv7. Related PRs: [#147](Bump requests from 2.32.5 to 2.33.0 in the uv group across 1 directory #147), [#148](Bump codecov/codecov-action from 5 to 6 #148), [#149](Bump aiohttp from 3.13.3 to 3.13.4 in the uv group across 1 directory #149), [#151](Bump pillow from 12.1.1 to 12.2.0 in the uv group across 1 directory #151), [#152](Bump pytest from 9.0.2 to 9.0.3 in the uv group across 1 directory #152), [#153](Bump nbconvert from 7.17.0 to 7.17.1 in the uv group across 1 directory #153), [#158](Bump the uv group across 1 directory with 2 updates #158), [#159](Bump the uv group across 1 directory with 3 updates #159), [#160](Bump the uv group across 1 directory with 2 updates #160), [#162](Bump aiohttp from 3.13.4 to 3.14.0 in the uv group across 1 directory #162), [#163](Bump codecov/codecov-action from 6 to 7 #163)Deprecated
private_to_private_graph(),private_to_public_graph(), andpublic_to_public_graph()in favor ofplace_to_place_graph(),place_to_movement_graph(), andmovement_to_movement_graph(). The old names emit aDeprecationWarningand will be removed in a future major release. Related PRs: [#169](Change the wording in morphological_graph #169)Fixed
UnicodeDecodeErrorinload_overture_data()when reading back files saved withsave_to_file=True, by @Jah-yee. Related PRs: [#161](Fix UnicodeDecodeError when save_to_file=True in _download_and_process_type #161)simplify=False, and GEOS topology errors retry with a coarsergrid_sizebefore falling back gracefully. Related PRs: [#164](Fix/fix tessellations #164)segments_to_graph()ignoringas_nx=Truefor empty inputs, andsegments_to_graph(multigraph=True, as_nx=True)silently collapsing parallel edges by returning annx.Graphinstead of annx.MultiGraph. Related PRs: [#165](Set multigraph by default forsegments_to_graph()#165)load_gtfs()UDF registration against newer DuckDB releases and guardedget_od_pairs()against an empty calendar table. Related PRs: [#170](V0.3.1 to v0.4.0 #170)New Contributors
Full Changelog: v0.3.1...v0.4.0
This discussion was created from the release v0.4.0.
Beta Was this translation helpful? Give feedback.
All reactions