Repository navigation
ogdf-py 0.6.0
Changes since the last Release
Added
-
Pushing a release tag now creates the GitHub release, with all wheels, the sdist, and the matching CHANGELOG section as notes. Tag pushes no longer publish to TestPyPI or PyPI; a manual run of
build-publish.ymldoes, with thetestpypiandpypiinputs (both off by default). The README now givespip install ogdf-py. -
The project is now licensed under the GPL, version 2 or 3, with the same linking exception for COIN-OR and Tulip that OGDF grants; it was MIT. Every wheel statically links OGDF, which is GPL v2/v3, so the wheels were never distributable as MIT-only.
pyproject.tomldeclaresGPL-2.0-only OR GPL-3.0-only. Released versions keep their MIT licence. -
Wheels ship OGDF's licence texts (
LICENSE.txt, GPL v2 and v3, Minisat) underogdf/_licenses/ogdf/. The extension links OGDF statically, so the texts must travel with the binary.
Changed
-
to_networkxreturns an undirected graph unlessdirected=Trueis passed. It used to readGraphAttributes.directed, which OGDF sets toTrueby default, soto_networkx(g, ogdf.layout(g))returned aDiGraphfor an undirected graph. Changing OGDF's default instead would remove arrowheads from every default SVG and TikZ drawing. -
min_spanning_treeuses Kruskal and returns a minimum spanning forest. OGDF's Prim started from the first node, so on a disconnected graph it covered one component; the docstring already promised a forest. -
set_seedaccepts[-2**31, 2**32), andnew_seed()returns values in[0, 2**32)on every platform.set_seedaccepted int32 only, so about half of drawn seeds raisedTypeError. OGDF'srandomSeed()computes inuint_fast32_t, which is 64 bits under libstdc++, so on Linuxnew_seed()also returned values up to about7 * 2**32. Values outside the range raisePreconditionError(aValueError).
Fixed
-
Inputs that broke an OGDF precondition now raise
PreconditionErrororInvalidGraphErrorinstead of segfaulting, hanging, or returning a wrong result. OGDF checks its preconditions only in debug builds. Findings C1-C14 and P1 inREVIEW.mdlist each case;tests/test_safety.pycovers them. The main classes:GraphAttributesaccessors, layouts, metrics, transforms and SVG/TikZ output check the attribute flags they read. A defaultGraphAttributessegfaulted onset_node_label.- A handle whose element was deleted, or whose graph was cleared or destroyed, is rejected with a
TypeError(and a nanobindRuntimeWarning) instead of reading freed memory. If OGDF later reuses the address for a new element of the same kind, the old handle names that element. A side table keyed by address made array access and generators 3x slower, because each lookup missed the cache; marking the Python object invalid costs nothing per access. - Arrays,
GraphAttributes, and node/edge arguments from a different graph are rejected.connected_componentswith another graph's array returned 16 for a 200000-node graph and wrote out of bounds. FPPLayout,MixedModelLayout,SchnyderLayout,DominanceLayoutandVisibilityLayoutrequire a connected graph, andvalidate()reports it.validate()returned[]for inputs that then segfaulted.- Generators validate sizes, degrees, probabilities and parity, and reject aliased graph arguments. Impossible
random_regular_graphandrandom_watts_strogatz_grapharguments looped forever;cube_graph(g, 40)overflowed to 256 nodes. planar_embed_planar_graphrejects non-planar input; on K5 it added two nodes and marked the result embedded.min_cost_flowchecks connectivity, bounds and supply balance, and verifies OGDF's result. OGDF's Reinelt solver reports success with zero flow on a one-edge network; that now raisesAlgorithmError.bellman_fordno longer relaxes edges out of unreachable nodes. OGDF added edge lengths to itsINT_MAXsentinel, which overflowed and gave every node downstream of an unreachable one a wrong distance. Lengths whose absolute sum reaches2**31 - 1are rejected.- NaN weights and capacities are rejected wherever negative ones were.
PivotMDS.set_edge_costs(0)(an endless loop) andSugiyamaLayout.set_runs(0)are rejected.
-
make cleandeleted every.sounder the repository, including the 241 in.venv. It now cleanssrc/only. -
The tag trigger matched only
v*, but every release tag so far is bare (0.5.1). Tag pushes never ran the publish jobs, so each release went out by manual dispatch. The trigger now matches bare tags, andmake releasecreates them instead ofv-prefixed ones. A tag that disagrees withpyproject.tomlfails the sdist job before any wheel builds. -
The two
0.5.0strings indocs/getting-started.mdare now0.5.1, andmake releaserewrites them along withpyproject.toml.test_provenance_example_keys_matchcompares the documentedpackage_versionagainst the installed one, so a version bump that touches onlypyproject.tomlfails every wheel job at the cibuildwheel test step - after the wheels have already been built.