ogdf-py 0.1.1__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/.github/workflows/build-publish.yml +3 -3
  2. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/.github/workflows/ci.yml +33 -2
  3. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/.gitignore +4 -0
  4. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/CHANGELOG.md +24 -2
  5. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/CMakeLists.txt +28 -18
  6. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/Makefile +18 -7
  7. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/PKG-INFO +15 -6
  8. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/README.md +14 -5
  9. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/README.md +5 -2
  10. ogdf_py-0.2.0/demos/algorithms_visual.py +348 -0
  11. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/gallery.py +93 -3
  12. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/generators_zoo.py +15 -0
  13. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/layouts_gallery.py +53 -0
  14. ogdf_py-0.2.0/docs/coverage.md +253 -0
  15. ogdf_py-0.2.0/docs/getting-started.md +111 -0
  16. ogdf_py-0.2.0/docs/index.md +46 -0
  17. ogdf_py-0.2.0/mkdocs.yml +39 -0
  18. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/pyproject.toml +9 -4
  19. ogdf_py-0.2.0/scripts/bootstrap_ogdf.py +126 -0
  20. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/__init__.py +1 -1
  21. ogdf_py-0.2.0/src/ogdf/bind_algorithms.cpp +439 -0
  22. ogdf_py-0.2.0/src/ogdf/bind_generators.cpp +185 -0
  23. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/bind_layouts.cpp +108 -0
  24. ogdf_py-0.2.0/tests/test_algorithms.py +364 -0
  25. ogdf_py-0.2.0/tests/test_generators.py +153 -0
  26. ogdf_py-0.2.0/tests/test_layouts.py +140 -0
  27. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/uv.lock +395 -1
  28. ogdf_py-0.1.1/demos/algorithms_visual.py +0 -110
  29. ogdf_py-0.1.1/scripts/bootstrap_ogdf.sh +0 -83
  30. ogdf_py-0.1.1/src/ogdf/bind_algorithms.cpp +0 -208
  31. ogdf_py-0.1.1/src/ogdf/bind_generators.cpp +0 -62
  32. ogdf_py-0.1.1/tests/test_algorithms.py +0 -189
  33. ogdf_py-0.1.1/tests/test_generators.py +0 -70
  34. ogdf_py-0.1.1/tests/test_layouts.py +0 -70
  35. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/LICENSE +0 -0
  36. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/_common.py +0 -0
  37. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/io_roundtrip.py +0 -0
  38. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/run_all.py +0 -0
  39. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/demos/styling_showcase.py +0 -0
  40. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/_core.cpp +0 -0
  41. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/bind_graph.cpp +0 -0
  42. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/bind_io.cpp +0 -0
  43. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/bindings.h +0 -0
  44. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/src/ogdf/py.typed +0 -0
  45. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/tests/test_ogdf.py +0 -0
  46. {ogdf_py-0.1.1 → ogdf_py-0.2.0}/tests/test_styling.py +0 -0
@@ -30,8 +30,8 @@ env:
30
30
  # this runs inside the manylinux container (git present; install cmake).
31
31
  CIBW_BEFORE_ALL_LINUX: >-
32
32
  (command -v cmake >/dev/null 2>&1 || pipx install cmake) &&
33
- bash scripts/bootstrap_ogdf.sh
34
- CIBW_BEFORE_ALL_MACOS: bash scripts/bootstrap_ogdf.sh
33
+ python3 scripts/bootstrap_ogdf.py
34
+ CIBW_BEFORE_ALL_MACOS: python3 scripts/bootstrap_ogdf.py
35
35
  # Exercise each wheel end-to-end (import + layouts + I/O).
36
36
  CIBW_TEST_REQUIRES: pytest
37
37
  CIBW_TEST_COMMAND: pytest {project}/tests -v
@@ -85,7 +85,7 @@ jobs:
85
85
  uses: actions/cache@v4
86
86
  with:
87
87
  path: thirdparty/ogdf
88
- key: ogdf-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('scripts/bootstrap_ogdf.sh') }}
88
+ key: ogdf-${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('scripts/bootstrap_ogdf.py') }}
89
89
 
90
90
  - name: Build wheels
91
91
  uses: pypa/cibuildwheel@v4.1.0
@@ -27,10 +27,10 @@ jobs:
27
27
  uses: actions/cache@v4
28
28
  with:
29
29
  path: thirdparty/ogdf
30
- key: ogdf-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/bootstrap_ogdf.sh') }}
30
+ key: ogdf-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/bootstrap_ogdf.py') }}
31
31
 
32
32
  - name: Bootstrap OGDF
33
- run: ./scripts/bootstrap_ogdf.sh
33
+ run: python3 scripts/bootstrap_ogdf.py
34
34
 
35
35
  - name: Install uv
36
36
  uses: astral-sh/setup-uv@v8.3.0
@@ -61,3 +61,34 @@ jobs:
61
61
  files: coverage.xml
62
62
  fail_ci_if_error: false
63
63
  token: ${{ secrets.CODECOV_TOKEN }}
64
+
65
+ windows:
66
+ name: Build & test (Windows)
67
+ runs-on: windows-latest
68
+ steps:
69
+ - uses: actions/checkout@v7
70
+
71
+ # windows-latest ships git, CMake, and MSVC; the bootstrap builds OGDF
72
+ # with the MSVC toolchain into thirdparty/ogdf/build/Release.
73
+ - name: Cache OGDF
74
+ uses: actions/cache@v4
75
+ with:
76
+ path: thirdparty/ogdf
77
+ key: ogdf-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('scripts/bootstrap_ogdf.py') }}
78
+
79
+ - name: Bootstrap OGDF
80
+ run: python scripts/bootstrap_ogdf.py
81
+
82
+ - name: Install uv
83
+ uses: astral-sh/setup-uv@v8.3.0
84
+ with:
85
+ enable-cache: true
86
+
87
+ - name: Set up Python
88
+ run: uv python install 3.13
89
+
90
+ - name: Install dependencies (builds the extension)
91
+ run: uv sync
92
+
93
+ - name: Run tests
94
+ run: uv run pytest tests/ -v
@@ -44,3 +44,7 @@ cmake_install.cmake
44
44
  .claude
45
45
  CLAUDE.md
46
46
 
47
+
48
+ # MkDocs
49
+ site/
50
+ docs/gallery.md
@@ -6,6 +6,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.0]
10
+
11
+ ### Added
12
+
13
+ - Layouts: `RadialTreeLayout`, `LinearLayout` (arc diagram), `TutteLayout` (convex planar), `DominanceLayout` / `VisibilityLayout` (upward, for DAGs), `MultilevelLayout` / `ModularMultilevelMixer` (large graphs), and `BalloonLayout`.
14
+
15
+ - 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 via `separation_pair` and `spqr_tree_summary`.
16
+
17
+ - Cross-platform Python bootstrap (`scripts/bootstrap_ogdf.py`) replacing the bash script; generalized CMake linking (MSVC-aware); Windows build+test CI job.
18
+
19
+ - MkDocs documentation site (`docs/`) with a coverage checklist and a Gallery page rendering the demo drawings; `make docs`, `make docs-serve`, `make docs-deploy`.
20
+
21
+ - 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.
22
+
23
+ - 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).
24
+
25
+ - Predicates and small algorithms: `is_two_edge_connected`, `is_regular`, `is_arborescence`, `triangulate`, `make_bimodal`, and `bfs_distances` (unweighted single-source distances).
26
+
27
+ ### Fixed
28
+
29
+ - Removed the persistent CMake `build-dir` from `pyproject.toml`. Sharing it between editable installs and wheel builds could leave stale objects, so a `uv build --wheel` sometimes omitted recently-added functions. Each build now uses a fresh directory (OGDF is prebuilt, so this stays fast).
30
+
9
31
  ## [0.1.1]
10
32
 
11
33
  ### Added
@@ -32,7 +54,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
32
54
 
33
55
  ### Changed
34
56
 
35
- - Reproducible OGDF dependency: `scripts/bootstrap_ogdf.sh` shallow-clones OGDF at a pinned tag (`foxglove-202510`) and builds its static libraries from source; the extension links them. `make build`/`make sync` auto-bootstrap if needed. Replaces reliance on a manually placed OGDF checkout.
57
+ - Reproducible OGDF dependency: `scripts/bootstrap_ogdf.py` (cross-platform: Linux, macOS, Windows) shallow-clones OGDF at a pinned tag (`foxglove-202510`) and builds its static libraries from source; the extension links them. `make build`/`make sync` auto-bootstrap if needed. Replaces reliance on a manually placed OGDF checkout.
36
58
 
37
59
  - Persist the CMake build directory so only the bindings recompile on edits.
38
60
 
@@ -42,7 +64,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
42
64
 
43
65
  - The generic `write` now raises `ValueError` for attribute-incapable formats (e.g. LEDA, Chaco) instead of crashing the interpreter.
44
66
 
45
- ## [0.1.0] - 2026-07-06
67
+ ## [0.1.0]
46
68
 
47
69
  ### Added
48
70
 
@@ -11,32 +11,45 @@ find_package(Threads REQUIRED)
11
11
 
12
12
  # --- OGDF (prebuilt static libraries) ---------------------------------------
13
13
  # OGDF is cloned at a pinned tag and built from source by
14
- # scripts/bootstrap_ogdf.sh, which produces libOGDF.a / libCOIN.a and the
15
- # generated config header. We link those static libs into the extension.
14
+ # scripts/bootstrap_ogdf.py, which produces the OGDF/COIN static libraries and
15
+ # the generated config header. We link those static libs into the extension.
16
16
  set(OGDF_ROOT "${CMAKE_SOURCE_DIR}/thirdparty/ogdf")
17
17
  set(OGDF_BUILD "${OGDF_ROOT}/build")
18
18
 
19
- # If OGDF has not been built yet, try to bootstrap it automatically (clone the
20
- # pinned tag + build from source). This lets `pip install` from an sdist work
21
- # without a separate manual step. Windows is not supported by the bash script.
22
- if(NOT EXISTS "${OGDF_BUILD}/libOGDF.a"
23
- AND EXISTS "${CMAKE_SOURCE_DIR}/scripts/bootstrap_ogdf.sh"
24
- AND NOT WIN32)
25
- message(STATUS "OGDF not built; running scripts/bootstrap_ogdf.sh ...")
19
+ # Locate the prebuilt OGDF/COIN static libraries produced by
20
+ # scripts/bootstrap_ogdf.py. Search both the single-config location and the
21
+ # multi-config Release/ subdirectory (used by MSVC and Xcode), and match both
22
+ # the Unix (libOGDF.a) and MSVC (OGDF.lib) naming.
23
+ set(_ogdf_lib_dirs "${OGDF_BUILD}" "${OGDF_BUILD}/Release")
24
+ find_library(OGDF_LIBRARY NAMES OGDF libOGDF PATHS ${_ogdf_lib_dirs}
25
+ NO_DEFAULT_PATH)
26
+
27
+ # If OGDF has not been built yet, bootstrap it automatically (clone the pinned
28
+ # tag + build from source), then search again. This lets `pip install` from an
29
+ # sdist work without a separate manual step. Uses the interpreter CMake found.
30
+ if(NOT OGDF_LIBRARY AND EXISTS "${CMAKE_SOURCE_DIR}/scripts/bootstrap_ogdf.py")
31
+ message(STATUS "OGDF not built; running scripts/bootstrap_ogdf.py ...")
26
32
  execute_process(
27
- COMMAND bash "${CMAKE_SOURCE_DIR}/scripts/bootstrap_ogdf.sh"
33
+ COMMAND "${Python_EXECUTABLE}"
34
+ "${CMAKE_SOURCE_DIR}/scripts/bootstrap_ogdf.py"
28
35
  RESULT_VARIABLE _ogdf_bootstrap_result)
29
36
  if(NOT _ogdf_bootstrap_result EQUAL 0)
30
37
  message(FATAL_ERROR
31
38
  "OGDF bootstrap failed (exit ${_ogdf_bootstrap_result}).")
32
39
  endif()
40
+ unset(OGDF_LIBRARY CACHE)
41
+ find_library(OGDF_LIBRARY NAMES OGDF libOGDF PATHS ${_ogdf_lib_dirs}
42
+ NO_DEFAULT_PATH)
33
43
  endif()
34
44
 
35
- if(NOT EXISTS "${OGDF_BUILD}/libOGDF.a")
45
+ find_library(COIN_LIBRARY NAMES COIN libCOIN PATHS ${_ogdf_lib_dirs}
46
+ NO_DEFAULT_PATH)
47
+
48
+ if(NOT OGDF_LIBRARY OR NOT COIN_LIBRARY)
36
49
  message(FATAL_ERROR
37
- "Prebuilt OGDF not found at ${OGDF_BUILD}/libOGDF.a.\n"
38
- "Run the bootstrap script first:\n"
39
- " scripts/bootstrap_ogdf.sh\n"
50
+ "Prebuilt OGDF not found under ${OGDF_BUILD}.\n"
51
+ "Run the bootstrap first:\n"
52
+ " python scripts/bootstrap_ogdf.py\n"
40
53
  "(or `make bootstrap`), which clones OGDF at a pinned tag and builds it.")
41
54
  endif()
42
55
 
@@ -46,10 +59,7 @@ set(OGDF_INCLUDE_DIRS
46
59
  "${OGDF_ROOT}/include"
47
60
  "${OGDF_BUILD}/include/ogdf-release")
48
61
 
49
- set(OGDF_LIBRARIES
50
- "${OGDF_BUILD}/libOGDF.a"
51
- "${OGDF_BUILD}/libCOIN.a"
52
- Threads::Threads)
62
+ set(OGDF_LIBRARIES ${OGDF_LIBRARY} ${COIN_LIBRARY} Threads::Threads)
53
63
 
54
64
  nanobind_add_module(_core
55
65
  src/ogdf/_core.cpp
@@ -4,7 +4,7 @@
4
4
  # This Makefile wraps common build commands for convenience.
5
5
  # The actual build is handled by scikit-build-core via pyproject.toml
6
6
 
7
- .PHONY: all bootstrap sync build rebuild test demos lint lint-check format format-check typecheck qa clean distclean wheel sdist dist check publish-test publish upgrade coverage coverage-html docs release help
7
+ .PHONY: all bootstrap sync build rebuild test demos lint lint-check format format-check typecheck qa clean distclean wheel sdist dist check publish-test publish upgrade coverage coverage-html docs docs-serve docs-deploy release help
8
8
 
9
9
  # Prebuilt OGDF static library; its presence marks a completed bootstrap.
10
10
  OGDF_LIB := thirdparty/ogdf/build/libOGDF.a
@@ -14,11 +14,11 @@ all: build
14
14
 
15
15
  # Clone OGDF at the pinned tag and build its static libraries from source.
16
16
  bootstrap:
17
- @./scripts/bootstrap_ogdf.sh
17
+ @python3 scripts/bootstrap_ogdf.py
18
18
 
19
19
  # Auto-bootstrap: build OGDF only if it has not been built yet.
20
20
  $(OGDF_LIB):
21
- @./scripts/bootstrap_ogdf.sh
21
+ @python3 scripts/bootstrap_ogdf.py
22
22
 
23
23
  # Sync environment (initial setup, installs dependencies + package)
24
24
  sync: $(OGDF_LIB)
@@ -101,9 +101,18 @@ coverage-html:
101
101
  @uv run pytest tests/ -v --cov=src/ogdf --cov-report=html
102
102
  @echo "Coverage report: htmlcov/index.html"
103
103
 
104
- # Build documentation (requires sphinx in dev dependencies)
105
- docs:
106
- @uv run sphinx-build -b html docs/ docs/_build/html
104
+ # Build the documentation site with MkDocs (into site/).
105
+ # Depends on demos so the gallery page (docs/gallery.md) is regenerated first.
106
+ docs: demos
107
+ @uv run --group docs mkdocs build
108
+
109
+ # Serve the documentation locally with live reload
110
+ docs-serve: demos
111
+ @uv run --group docs mkdocs serve
112
+
113
+ # Deploy the documentation to GitHub Pages (gh-pages branch)
114
+ docs-deploy: demos
115
+ @uv run --group docs mkdocs gh-deploy
107
116
 
108
117
  # Create a release (bump version, tag, push)
109
118
  release:
@@ -150,7 +159,9 @@ help:
150
159
  @echo " upgrade - Upgrade all dependencies"
151
160
  @echo " coverage - Run tests with coverage"
152
161
  @echo " coverage-html- Generate HTML coverage report"
153
- @echo " docs - Build documentation with Sphinx"
162
+ @echo " docs - Build the MkDocs documentation site"
163
+ @echo " docs-serve - Serve the docs locally with live reload"
164
+ @echo " docs-deploy - Deploy the docs to GitHub Pages"
154
165
  @echo " release - Bump version, tag, and prepare release"
155
166
  @echo " clean - Remove build artifacts"
156
167
  @echo " distclean - Remove all generated files"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ogdf-py
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: Python bindings for the Open Graph Drawing Framework (OGDF), built with nanobind.
5
5
  Keywords: nanobind,python,extension
6
6
  Author-Email: Shakeeb Alireza <shakfu@users.noreply.github.com>
@@ -70,11 +70,11 @@ n = ogdf.connected_components(g, component) # -> number of components
70
70
 
71
71
  - **Attributes:** `GraphAttributes` with coordinates, size, labels, and full styling (colors, shapes, fill patterns, stroke, edge arrows, and bends).
72
72
 
73
- - **Layouts:** `SugiyamaLayout` (layered), `FMMMLayout` / `GEMLayout` / `SpringEmbedderKK` (force-directed), `StressMinimization` / `PivotMDS` (stress/MDS), `PlanarizationLayout` (with optional orthogonal routing), `SchnyderLayout` (planar straight-line), `TreeLayout`, `CircularLayout`.
73
+ - **Layouts:** `SugiyamaLayout` (layered), `FMMMLayout` / `GEMLayout` / `SpringEmbedderKK` / `MultilevelLayout` (force-directed), `StressMinimization` / `PivotMDS` (stress/MDS), `PlanarizationLayout` (with optional orthogonal routing), `SchnyderLayout` (planar straight-line), `TreeLayout` / `RadialTreeLayout` / `BalloonLayout`, `CircularLayout`, `LinearLayout` (arc diagram), `TutteLayout` (convex planar), and `DominanceLayout` / `VisibilityLayout` (upward, for DAGs).
74
74
 
75
- - **Algorithms:** connectivity and structure tests (`is_connected`, `is_biconnected`, `is_bipartite`, `is_acyclic`, `is_planar`, ...), connected / strongly-connected / biconnected components, topological numbering, shortest paths (`dijkstra`), minimum spanning tree, maximum flow, global minimum cut, matching, node coloring, and planar embedding.
75
+ - **Algorithms:** connectivity and structure tests (`is_connected`, `is_biconnected`, `is_bipartite`, `is_acyclic`, `is_planar`, ...), components, cut vertices and bridges, separation pairs and SPQR-tree summary, topological numbering, shortest paths (`dijkstra`, `bellman_ford`), minimum spanning tree, maximum flow, minimum-cost flow, global minimum cut, matching (bipartite and maximum-weight), node coloring, minimum Steiner tree, maximal planar subgraph, and planar embedding.
76
76
 
77
- - **Generators:** complete, complete-bipartite, wheel, cube, grid, Petersen, regular tree, plus random graphs, trees, digraphs, and regular / biconnected / planar variants.
77
+ - **Generators:** classic graphs (complete, bipartite, wheel, cube, grid, Petersen, circulant, k-partite, globe, lattice), graph products (cartesian, tensor, strong, lexicographical), operations (union, complement, suspension), and random models (Erdos-Renyi, regular, planar, triconnected, Watts-Strogatz, preferential attachment, Chung-Lu, Waxman, geometric, series-parallel DAG, hierarchy).
78
78
 
79
79
  - **File I/O:** interchange formats GML, GraphML, DOT, GEXF, GDF, TLP (plus extension-based `read`/`write`), and drawing output as SVG and TikZ.
80
80
 
@@ -86,8 +86,17 @@ make demos # writes SVGs and data files to build/demo-output/
86
86
 
87
87
  The demos exercise layouts, styling, algorithm visualizations, generators, and file I/O, and assemble every drawing into `build/demo-output/index.html` for a side-by-side view. See [`demos/README.md`](demos/README.md) for details.
88
88
 
89
+ ## Documentation
90
+
91
+ ```bash
92
+ make docs # build the MkDocs site into site/
93
+ make docs-serve # serve locally with live reload
94
+ ```
95
+
96
+ The documentation site (`docs/`) includes a getting-started guide, a [coverage checklist](docs/coverage.md) of exactly what OGDF functionality is exposed, and a gallery of the demo drawings.
97
+
89
98
  ## How it builds
90
99
 
91
- `scripts/bootstrap_ogdf.sh` shallow-clones OGDF at a pinned release tag (`foxglove-202510`) into `thirdparty/ogdf` and builds its static libraries from source. The extension then links `libOGDF.a` / `libCOIN.a` statically, so wheels are self-contained. Because OGDF is prebuilt once (a couple of minutes), rebuilding the bindings only recompiles `_core.cpp` and is fast.
100
+ `scripts/bootstrap_ogdf.py` shallow-clones OGDF at a pinned release tag (`foxglove-202510`) into `thirdparty/ogdf` and builds its static libraries from source. The extension then links the OGDF / COIN static libraries, so wheels are self-contained. Because OGDF is prebuilt once (a couple of minutes), rebuilding the bindings only recompiles the binding sources and is fast.
92
101
 
93
- The pin can be overridden: `scripts/bootstrap_ogdf.sh --tag <tag>` or `OGDF_TAG=<tag> make bootstrap`. In CI, run the bootstrap once per platform (e.g. in `cibuildwheel`'s `CIBW_BEFORE_ALL`) so OGDF is reused across all Python versions.
102
+ The bootstrap script (`scripts/bootstrap_ogdf.py`) is cross-platform (Linux, macOS, Windows). The pin can be overridden: `python scripts/bootstrap_ogdf.py --tag <tag>` or `OGDF_TAG=<tag> make bootstrap`. In CI, run the bootstrap once per platform (e.g. in `cibuildwheel`'s `CIBW_BEFORE_ALL`) so OGDF is reused across all Python versions.
@@ -51,11 +51,11 @@ n = ogdf.connected_components(g, component) # -> number of components
51
51
 
52
52
  - **Attributes:** `GraphAttributes` with coordinates, size, labels, and full styling (colors, shapes, fill patterns, stroke, edge arrows, and bends).
53
53
 
54
- - **Layouts:** `SugiyamaLayout` (layered), `FMMMLayout` / `GEMLayout` / `SpringEmbedderKK` (force-directed), `StressMinimization` / `PivotMDS` (stress/MDS), `PlanarizationLayout` (with optional orthogonal routing), `SchnyderLayout` (planar straight-line), `TreeLayout`, `CircularLayout`.
54
+ - **Layouts:** `SugiyamaLayout` (layered), `FMMMLayout` / `GEMLayout` / `SpringEmbedderKK` / `MultilevelLayout` (force-directed), `StressMinimization` / `PivotMDS` (stress/MDS), `PlanarizationLayout` (with optional orthogonal routing), `SchnyderLayout` (planar straight-line), `TreeLayout` / `RadialTreeLayout` / `BalloonLayout`, `CircularLayout`, `LinearLayout` (arc diagram), `TutteLayout` (convex planar), and `DominanceLayout` / `VisibilityLayout` (upward, for DAGs).
55
55
 
56
- - **Algorithms:** connectivity and structure tests (`is_connected`, `is_biconnected`, `is_bipartite`, `is_acyclic`, `is_planar`, ...), connected / strongly-connected / biconnected components, topological numbering, shortest paths (`dijkstra`), minimum spanning tree, maximum flow, global minimum cut, matching, node coloring, and planar embedding.
56
+ - **Algorithms:** connectivity and structure tests (`is_connected`, `is_biconnected`, `is_bipartite`, `is_acyclic`, `is_planar`, ...), components, cut vertices and bridges, separation pairs and SPQR-tree summary, topological numbering, shortest paths (`dijkstra`, `bellman_ford`), minimum spanning tree, maximum flow, minimum-cost flow, global minimum cut, matching (bipartite and maximum-weight), node coloring, minimum Steiner tree, maximal planar subgraph, and planar embedding.
57
57
 
58
- - **Generators:** complete, complete-bipartite, wheel, cube, grid, Petersen, regular tree, plus random graphs, trees, digraphs, and regular / biconnected / planar variants.
58
+ - **Generators:** classic graphs (complete, bipartite, wheel, cube, grid, Petersen, circulant, k-partite, globe, lattice), graph products (cartesian, tensor, strong, lexicographical), operations (union, complement, suspension), and random models (Erdos-Renyi, regular, planar, triconnected, Watts-Strogatz, preferential attachment, Chung-Lu, Waxman, geometric, series-parallel DAG, hierarchy).
59
59
 
60
60
  - **File I/O:** interchange formats GML, GraphML, DOT, GEXF, GDF, TLP (plus extension-based `read`/`write`), and drawing output as SVG and TikZ.
61
61
 
@@ -67,8 +67,17 @@ make demos # writes SVGs and data files to build/demo-output/
67
67
 
68
68
  The demos exercise layouts, styling, algorithm visualizations, generators, and file I/O, and assemble every drawing into `build/demo-output/index.html` for a side-by-side view. See [`demos/README.md`](demos/README.md) for details.
69
69
 
70
+ ## Documentation
71
+
72
+ ```bash
73
+ make docs # build the MkDocs site into site/
74
+ make docs-serve # serve locally with live reload
75
+ ```
76
+
77
+ The documentation site (`docs/`) includes a getting-started guide, a [coverage checklist](docs/coverage.md) of exactly what OGDF functionality is exposed, and a gallery of the demo drawings.
78
+
70
79
  ## How it builds
71
80
 
72
- `scripts/bootstrap_ogdf.sh` shallow-clones OGDF at a pinned release tag (`foxglove-202510`) into `thirdparty/ogdf` and builds its static libraries from source. The extension then links `libOGDF.a` / `libCOIN.a` statically, so wheels are self-contained. Because OGDF is prebuilt once (a couple of minutes), rebuilding the bindings only recompiles `_core.cpp` and is fast.
81
+ `scripts/bootstrap_ogdf.py` shallow-clones OGDF at a pinned release tag (`foxglove-202510`) into `thirdparty/ogdf` and builds its static libraries from source. The extension then links the OGDF / COIN static libraries, so wheels are self-contained. Because OGDF is prebuilt once (a couple of minutes), rebuilding the bindings only recompiles the binding sources and is fast.
73
82
 
74
- The pin can be overridden: `scripts/bootstrap_ogdf.sh --tag <tag>` or `OGDF_TAG=<tag> make bootstrap`. In CI, run the bootstrap once per platform (e.g. in `cibuildwheel`'s `CIBW_BEFORE_ALL`) so OGDF is reused across all Python versions.
83
+ The bootstrap script (`scripts/bootstrap_ogdf.py`) is cross-platform (Linux, macOS, Windows). The pin can be overridden: `python scripts/bootstrap_ogdf.py --tag <tag>` or `OGDF_TAG=<tag> make bootstrap`. In CI, run the bootstrap once per platform (e.g. in `cibuildwheel`'s `CIBW_BEFORE_ALL`) so OGDF is reused across all Python versions.
@@ -20,12 +20,15 @@ uv run python demos/layouts_gallery.py
20
20
 
21
21
  - **`layouts_gallery.py`** - renders graphs with every layout algorithm
22
22
  (Sugiyama, FMMM, GEM, Kamada-Kawai, stress minimization, pivot MDS, Schnyder,
23
- circular, tree, and orthogonal), one SVG per layout.
23
+ circular, tree, radial tree, linear/arc, Tutte, dominance, visibility, and
24
+ orthogonal), one SVG per layout.
24
25
  - **`styling_showcase.py`** - a wheel graph styled with per-degree node colors,
25
26
  ellipse shapes, sizes, labels, and edge arrows.
26
27
  - **`algorithms_visual.py`** - visualizes algorithm results by coloring:
27
28
  connected components, a proper node coloring, shortest-path distances (as a
28
- gradient), and a highlighted minimum spanning tree.
29
+ gradient), a minimum spanning tree, cut vertices and bridges, a maximum-weight
30
+ matching, Bellman-Ford distances, a minimum-cost flow (edge width by flow),
31
+ and a minimum Steiner tree.
29
32
  - **`generators_zoo.py`** - builds a variety of named graphs (complete,
30
33
  bipartite, wheel, cube, grid, Petersen, trees, random regular) and draws each.
31
34
  - **`io_roundtrip.py`** - writes a graph to GML, GraphML, DOT, GEXF, TLP, SVG,