From c92128ea1c0f01d0606ae5bb44689f3672f9c5e3 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 6 Jul 2025 18:40:12 -0400 Subject: [PATCH 1/4] Add release notes --- ...edge-indices-functions-fc1ce122ff761ad6.yaml | 0 ...-local-complementation-f79b3b05769814cc.yaml | 0 ...successor-node-by-edge-2c14e3f96c61fc8d.yaml | 0 ...-is-strongly-connected-4f2918fa15b46d8f.yaml | 0 .../bump-msrv-179-b3732d9b786dc265.yaml | 0 .../bump-petgraph-79f354e3dce1aa14.yaml | 0 ...condensation-undirected-support-apr2025.yaml | 0 ...contract-without-cycle-bd82ec1e5fd87bc7.yaml | 0 .../farewell-retworkx-be18546ac0b0cbc2.yaml | 0 .../fix-ancestors-panic-3c64b9b43bb0551a.yaml | 0 .../fix-search-panic-fd54b704f7ee2101.yaml | 0 ...d-closeness-centrality-d4dba79712e9ac42.yaml | 0 ...l-closeness-centrality-5165f62e370181eb.yaml | 0 ...rce_all_shortest_paths-cd23a45f973a5aba.yaml | 0 .../subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml | 0 .../tier-changes-4843ec0d3cd63acb.yaml | 0 .../write_graphml-624c10b6f7592ee1.yaml | 0 .../notes/prepare-0.17-b242552a1301d816.yaml | 17 +++++++++++++++++ 18 files changed, 17 insertions(+) rename releasenotes/notes/{ => 0.17}/add-in-out-edge-indices-functions-fc1ce122ff761ad6.yaml (100%) rename releasenotes/notes/{ => 0.17}/add-local-complementation-f79b3b05769814cc.yaml (100%) rename releasenotes/notes/{ => 0.17}/add-method-find-successor-node-by-edge-2c14e3f96c61fc8d.yaml (100%) rename releasenotes/notes/{ => 0.17}/add-method-is-strongly-connected-4f2918fa15b46d8f.yaml (100%) rename releasenotes/notes/{ => 0.17}/bump-msrv-179-b3732d9b786dc265.yaml (100%) rename releasenotes/notes/{ => 0.17}/bump-petgraph-79f354e3dce1aa14.yaml (100%) rename releasenotes/notes/{ => 0.17}/condensation-undirected-support-apr2025.yaml (100%) rename releasenotes/notes/{ => 0.17}/expose-can-contract-without-cycle-bd82ec1e5fd87bc7.yaml (100%) rename releasenotes/notes/{ => 0.17}/farewell-retworkx-be18546ac0b0cbc2.yaml (100%) rename releasenotes/notes/{ => 0.17}/fix-ancestors-panic-3c64b9b43bb0551a.yaml (100%) rename releasenotes/notes/{ => 0.17}/fix-search-panic-fd54b704f7ee2101.yaml (100%) rename releasenotes/notes/{ => 0.17}/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml (100%) rename releasenotes/notes/{ => 0.17}/parallel-closeness-centrality-5165f62e370181eb.yaml (100%) rename releasenotes/notes/{ => 0.17}/single_source_all_shortest_paths-cd23a45f973a5aba.yaml (100%) rename releasenotes/notes/{ => 0.17}/subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml (100%) rename releasenotes/notes/{ => 0.17}/tier-changes-4843ec0d3cd63acb.yaml (100%) rename releasenotes/notes/{ => 0.17}/write_graphml-624c10b6f7592ee1.yaml (100%) create mode 100644 releasenotes/notes/prepare-0.17-b242552a1301d816.yaml diff --git a/releasenotes/notes/add-in-out-edge-indices-functions-fc1ce122ff761ad6.yaml b/releasenotes/notes/0.17/add-in-out-edge-indices-functions-fc1ce122ff761ad6.yaml similarity index 100% rename from releasenotes/notes/add-in-out-edge-indices-functions-fc1ce122ff761ad6.yaml rename to releasenotes/notes/0.17/add-in-out-edge-indices-functions-fc1ce122ff761ad6.yaml diff --git a/releasenotes/notes/add-local-complementation-f79b3b05769814cc.yaml b/releasenotes/notes/0.17/add-local-complementation-f79b3b05769814cc.yaml similarity index 100% rename from releasenotes/notes/add-local-complementation-f79b3b05769814cc.yaml rename to releasenotes/notes/0.17/add-local-complementation-f79b3b05769814cc.yaml diff --git a/releasenotes/notes/add-method-find-successor-node-by-edge-2c14e3f96c61fc8d.yaml b/releasenotes/notes/0.17/add-method-find-successor-node-by-edge-2c14e3f96c61fc8d.yaml similarity index 100% rename from releasenotes/notes/add-method-find-successor-node-by-edge-2c14e3f96c61fc8d.yaml rename to releasenotes/notes/0.17/add-method-find-successor-node-by-edge-2c14e3f96c61fc8d.yaml diff --git a/releasenotes/notes/add-method-is-strongly-connected-4f2918fa15b46d8f.yaml b/releasenotes/notes/0.17/add-method-is-strongly-connected-4f2918fa15b46d8f.yaml similarity index 100% rename from releasenotes/notes/add-method-is-strongly-connected-4f2918fa15b46d8f.yaml rename to releasenotes/notes/0.17/add-method-is-strongly-connected-4f2918fa15b46d8f.yaml diff --git a/releasenotes/notes/bump-msrv-179-b3732d9b786dc265.yaml b/releasenotes/notes/0.17/bump-msrv-179-b3732d9b786dc265.yaml similarity index 100% rename from releasenotes/notes/bump-msrv-179-b3732d9b786dc265.yaml rename to releasenotes/notes/0.17/bump-msrv-179-b3732d9b786dc265.yaml diff --git a/releasenotes/notes/bump-petgraph-79f354e3dce1aa14.yaml b/releasenotes/notes/0.17/bump-petgraph-79f354e3dce1aa14.yaml similarity index 100% rename from releasenotes/notes/bump-petgraph-79f354e3dce1aa14.yaml rename to releasenotes/notes/0.17/bump-petgraph-79f354e3dce1aa14.yaml diff --git a/releasenotes/notes/condensation-undirected-support-apr2025.yaml b/releasenotes/notes/0.17/condensation-undirected-support-apr2025.yaml similarity index 100% rename from releasenotes/notes/condensation-undirected-support-apr2025.yaml rename to releasenotes/notes/0.17/condensation-undirected-support-apr2025.yaml diff --git a/releasenotes/notes/expose-can-contract-without-cycle-bd82ec1e5fd87bc7.yaml b/releasenotes/notes/0.17/expose-can-contract-without-cycle-bd82ec1e5fd87bc7.yaml similarity index 100% rename from releasenotes/notes/expose-can-contract-without-cycle-bd82ec1e5fd87bc7.yaml rename to releasenotes/notes/0.17/expose-can-contract-without-cycle-bd82ec1e5fd87bc7.yaml diff --git a/releasenotes/notes/farewell-retworkx-be18546ac0b0cbc2.yaml b/releasenotes/notes/0.17/farewell-retworkx-be18546ac0b0cbc2.yaml similarity index 100% rename from releasenotes/notes/farewell-retworkx-be18546ac0b0cbc2.yaml rename to releasenotes/notes/0.17/farewell-retworkx-be18546ac0b0cbc2.yaml diff --git a/releasenotes/notes/fix-ancestors-panic-3c64b9b43bb0551a.yaml b/releasenotes/notes/0.17/fix-ancestors-panic-3c64b9b43bb0551a.yaml similarity index 100% rename from releasenotes/notes/fix-ancestors-panic-3c64b9b43bb0551a.yaml rename to releasenotes/notes/0.17/fix-ancestors-panic-3c64b9b43bb0551a.yaml diff --git a/releasenotes/notes/fix-search-panic-fd54b704f7ee2101.yaml b/releasenotes/notes/0.17/fix-search-panic-fd54b704f7ee2101.yaml similarity index 100% rename from releasenotes/notes/fix-search-panic-fd54b704f7ee2101.yaml rename to releasenotes/notes/0.17/fix-search-panic-fd54b704f7ee2101.yaml diff --git a/releasenotes/notes/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml b/releasenotes/notes/0.17/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml similarity index 100% rename from releasenotes/notes/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml rename to releasenotes/notes/0.17/newman-weighted-closeness-centrality-d4dba79712e9ac42.yaml diff --git a/releasenotes/notes/parallel-closeness-centrality-5165f62e370181eb.yaml b/releasenotes/notes/0.17/parallel-closeness-centrality-5165f62e370181eb.yaml similarity index 100% rename from releasenotes/notes/parallel-closeness-centrality-5165f62e370181eb.yaml rename to releasenotes/notes/0.17/parallel-closeness-centrality-5165f62e370181eb.yaml diff --git a/releasenotes/notes/single_source_all_shortest_paths-cd23a45f973a5aba.yaml b/releasenotes/notes/0.17/single_source_all_shortest_paths-cd23a45f973a5aba.yaml similarity index 100% rename from releasenotes/notes/single_source_all_shortest_paths-cd23a45f973a5aba.yaml rename to releasenotes/notes/0.17/single_source_all_shortest_paths-cd23a45f973a5aba.yaml diff --git a/releasenotes/notes/subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml b/releasenotes/notes/0.17/subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml similarity index 100% rename from releasenotes/notes/subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml rename to releasenotes/notes/0.17/subgraph-with-nodemap-a6ed3bb9bbbe93cd.yaml diff --git a/releasenotes/notes/tier-changes-4843ec0d3cd63acb.yaml b/releasenotes/notes/0.17/tier-changes-4843ec0d3cd63acb.yaml similarity index 100% rename from releasenotes/notes/tier-changes-4843ec0d3cd63acb.yaml rename to releasenotes/notes/0.17/tier-changes-4843ec0d3cd63acb.yaml diff --git a/releasenotes/notes/write_graphml-624c10b6f7592ee1.yaml b/releasenotes/notes/0.17/write_graphml-624c10b6f7592ee1.yaml similarity index 100% rename from releasenotes/notes/write_graphml-624c10b6f7592ee1.yaml rename to releasenotes/notes/0.17/write_graphml-624c10b6f7592ee1.yaml diff --git a/releasenotes/notes/prepare-0.17-b242552a1301d816.yaml b/releasenotes/notes/prepare-0.17-b242552a1301d816.yaml new file mode 100644 index 0000000000..7e93ec8506 --- /dev/null +++ b/releasenotes/notes/prepare-0.17-b242552a1301d816.yaml @@ -0,0 +1,17 @@ +--- +prelude: > + This is a new Rustworkx release with bug fixes and new features to + the library. The highlights of this release are: + + * Enhanced documentation and tests + * Support for writing GraphML files + * A new method for weighted closeness closeness + + This release uses the `Python Stable ABI `__, + and will be compatible with all versions from Python 3.9 onwards. The published + binaries have been tested with Python 3.9 to 3.13, although they will likely + work with future versions like 3.14. + + A special shoutout goes to Miroslav Šedivý, Etienne Wodey, Krishn Parasar, and Barak Katzir + for their pull requests and GitHub issues! Although not documented in individual + entries, we appreciate your work helping us improve our documentation, type annotations, and tests. \ No newline at end of file From cbdb9ef3615fc0e22f20b29a5b01950f83ff7cba Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 6 Jul 2025 18:51:24 -0400 Subject: [PATCH 2/4] Add docstrings for write_graphml --- src/graphml.rs | 54 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/src/graphml.rs b/src/graphml.rs index cb4ca495fb..41f7688bd0 100644 --- a/src/graphml.rs +++ b/src/graphml.rs @@ -1289,7 +1289,32 @@ impl KeySpec { } } -/// Write a graph to a file in GraphML format given the list of key definitions. +/// Write a graph to a file in GraphML format. +/// +/// GraphML is a comprehensive and easy-to-use file format for graphs. It consists +/// of a language core to describe the structural properties of a graph and a flexible +/// extension mechanism to add application-specific data. +/// +/// For more information see: +/// http://graphml.graphdrawing.org/ +/// +/// .. note:: +/// +/// This implementation does not support mixed graphs (directed and undirected edges together), +/// hyperedges, nested graphs, or ports. +/// +/// .. note:: +/// +/// GraphML attributes with `graph` domain are written from :attr:`~.PyGraph.attrs` field. +/// +/// :param PyGraph graph: The graph to write to the file. +/// :param str path: The path of the output file to write. +/// :param Optional[list[GraphMLKey]] keys: Optional list of key definitions for GraphML attributes. +/// If None, keys will be inferred from the graph data. +/// :param Optional[str] compression: Optional compression format for the output file. +/// If None, no compression is applied. +/// +/// :raises RuntimeError: when an error is encountered while writing the GraphML file. #[pyfunction] #[pyo3(signature=(graph, path, keys=None, compression=None),text_signature = "(graph, path, /, keys=None, compression=None)")] pub fn graph_write_graphml( @@ -1306,7 +1331,32 @@ pub fn graph_write_graphml( Ok(()) } -/// Write a digraph to a file in GraphML format given the list of key definitions. +/// Write a graph to a file in GraphML format. +/// +/// GraphML is a comprehensive and easy-to-use file format for graphs. It consists +/// of a language core to describe the structural properties of a graph and a flexible +/// extension mechanism to add application-specific data. +/// +/// For more information see: +/// http://graphml.graphdrawing.org/ +/// +/// .. note:: +/// +/// This implementation does not support mixed graphs (directed and undirected edges together), +/// hyperedges, nested graphs, or ports. +/// +/// .. note:: +/// +/// GraphML attributes with `graph` domain are written from :attr:`~.PyGraph.attrs` field. +/// +/// :param PyDiGraph graph: The graph to write to the file. +/// :param str path: The path of the output file to write. +/// :param Optional[list[GraphMLKey]] keys: Optional list of key definitions for GraphML attributes. +/// If None, keys will be inferred from the graph data. +/// :param Optional[str] compression: Optional compression format for the output file. +/// If None, no compression is applied. +/// +/// :raises RuntimeError: when an error is encountered while writing the GraphML file. #[pyfunction] #[pyo3(signature=(graph, path, keys=None, compression=None),text_signature = "(graph, path, /, keys=None, compression=None)")] pub fn digraph_write_graphml( From 514d38bca84a776a0620ef11231562302f1aec60 Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Sun, 6 Jul 2025 18:55:57 -0400 Subject: [PATCH 3/4] Add Python docstring --- rustworkx/__init__.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/rustworkx/__init__.py b/rustworkx/__init__.py index a8611e7c24..d75d38c508 100644 --- a/rustworkx/__init__.py +++ b/rustworkx/__init__.py @@ -2283,5 +2283,31 @@ def single_source_all_shortest_paths( @_rustworkx_dispatch def write_graphml(graph, path, /, keys=None, compression=None): - """ """ + """Write a graph to a file in GraphML format. + + GraphML is a comprehensive and easy-to-use file format for graphs. It consists + of a language core to describe the structural properties of a graph and a flexible + extension mechanism to add application-specific data. + + For more information see: + http://graphml.graphdrawing.org/ + + .. note:: + + This implementation does not support mixed graphs (directed and undirected edges together), + hyperedges, nested graphs, or ports. + + .. note:: + + GraphML attributes with `graph` domain are written from the graph's attrs field. + + :param graph: The graph to write to the file. This can be a + :class:`~rustworkx.PyGraph` or :class:`~rustworkx.PyDiGraph`. + :param path: The path of the output file to write. + :param keys: Optional list of key definitions for GraphML attributes. + If not specified, keys will be inferred from the graph data. + :param compression: Optional compression format for the output file. + If not specified, no compression is applied. + :raises RuntimeError: when an error is encountered while writing the GraphML file. + """ raise TypeError(f"Invalid Input Type {type(graph)} for graph") From c6a8c3196be49151959e51d4e23572a52e67111f Mon Sep 17 00:00:00 2001 From: Ivan Carvalho Date: Tue, 12 Aug 2025 18:27:03 -0400 Subject: [PATCH 4/4] Move last batch of release notes --- .../{ => 0.17}/barabasi_albert_seeding-a43b3374caa2a978.yaml | 0 .../expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml | 0 .../notes/{ => 0.17}/port-transitivity-c69b72f813e68693.yaml | 0 releasenotes/notes/{ => 0.17}/prepare-0.17-b242552a1301d816.yaml | 0 .../notes/{ => 0.17}/pyodide-support-2172f2313b06f10d.yaml | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename releasenotes/notes/{ => 0.17}/barabasi_albert_seeding-a43b3374caa2a978.yaml (100%) rename releasenotes/notes/{ => 0.17}/expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml (100%) rename releasenotes/notes/{ => 0.17}/port-transitivity-c69b72f813e68693.yaml (100%) rename releasenotes/notes/{ => 0.17}/prepare-0.17-b242552a1301d816.yaml (100%) rename releasenotes/notes/{ => 0.17}/pyodide-support-2172f2313b06f10d.yaml (100%) diff --git a/releasenotes/notes/barabasi_albert_seeding-a43b3374caa2a978.yaml b/releasenotes/notes/0.17/barabasi_albert_seeding-a43b3374caa2a978.yaml similarity index 100% rename from releasenotes/notes/barabasi_albert_seeding-a43b3374caa2a978.yaml rename to releasenotes/notes/0.17/barabasi_albert_seeding-a43b3374caa2a978.yaml diff --git a/releasenotes/notes/expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml b/releasenotes/notes/0.17/expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml similarity index 100% rename from releasenotes/notes/expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml rename to releasenotes/notes/0.17/expose-all-simple-path-multiple-targets-767f818daeeb5a41.yaml diff --git a/releasenotes/notes/port-transitivity-c69b72f813e68693.yaml b/releasenotes/notes/0.17/port-transitivity-c69b72f813e68693.yaml similarity index 100% rename from releasenotes/notes/port-transitivity-c69b72f813e68693.yaml rename to releasenotes/notes/0.17/port-transitivity-c69b72f813e68693.yaml diff --git a/releasenotes/notes/prepare-0.17-b242552a1301d816.yaml b/releasenotes/notes/0.17/prepare-0.17-b242552a1301d816.yaml similarity index 100% rename from releasenotes/notes/prepare-0.17-b242552a1301d816.yaml rename to releasenotes/notes/0.17/prepare-0.17-b242552a1301d816.yaml diff --git a/releasenotes/notes/pyodide-support-2172f2313b06f10d.yaml b/releasenotes/notes/0.17/pyodide-support-2172f2313b06f10d.yaml similarity index 100% rename from releasenotes/notes/pyodide-support-2172f2313b06f10d.yaml rename to releasenotes/notes/0.17/pyodide-support-2172f2313b06f10d.yaml