Repository navigation
ogdf-py 0.2.0
Python bindings for the Open Graph Drawing Framework (OGDF), built with nanobind.
This is a curated subset of OGDF, not a full wrapper: enough to build graphs, run layout and core graph algorithms, style and draw them, and read/write common graph file formats.
Changes since the last release
Added
-
Layouts:
RadialTreeLayout,LinearLayout(arc diagram),TutteLayout(convex planar),DominanceLayout/VisibilityLayout(upward, for DAGs),MultilevelLayout/ModularMultilevelMixer(large graphs), andBalloonLayout. -
Algorithms: cut vertices (
cut_vertices) and bridges (bridges), Bellman-Ford shortest paths (bellman_ford), minimum-cost flow (min_cost_flow), general maximum-weight matching (maximum_weight_matching, Blossom V), minimum Steiner tree (steiner_tree, Mehlhorn), maximal planar subgraph (maximal_planar_subgraph), and triconnectivity viaseparation_pairandspqr_tree_summary. -
Cross-platform Python bootstrap (
scripts/bootstrap_ogdf.py) replacing the bash script; generalized CMake linking (MSVC-aware); Windows build+test CI job. -
MkDocs documentation site (
docs/) with a coverage checklist and a Gallery page rendering the demo drawings;make docs,make docs-serve,make docs-deploy. -
Demos: gallery entries for the new layouts, and algorithm visualizations for cut vertices/bridges, maximum-weight matching, Bellman-Ford distances, minimum-cost flow, the minimum Steiner tree, and the maximal planar subgraph.
-
Generators: circulant, complete-k-partite, globe, regular-lattice; graph products (cartesian, tensor, strong, lexicographical); operations (union, complement, suspension); and random models (preferential attachment, Chung-Lu, Watts-Strogatz, Waxman, geometric-cube, hierarchy, series-parallel DAG, triconnected, planar-biconnected, planar-triconnected).
-
Predicates and small algorithms:
is_two_edge_connected,is_regular,is_arborescence,triangulate,make_bimodal, andbfs_distances(unweighted single-source distances).
Fixed
-
Removed the persistent CMake
build-dirfrompyproject.toml. Sharing it between editable installs and wheel builds could leave stale objects, so auv build --wheelsometimes omitted recently-added functions. Each build now uses a fresh directory (OGDF is prebuilt, so this stays fast). -
MSVC build: replaced the non-standard
M_PI(undefined on MSVC) with an explicit constant so the extension compiles on Windows.