Skip to content

Commit

Permalink
Prepare 0.14.0 release (#1065)
Browse files Browse the repository at this point in the history
* Prepare 0.14.0 release

This commit prepares the 0.14.0 release. It moves the release notes for
the release into a separate directory and adds a prelude to the release
notes. This should be the last commit to merge for the 0.14.0 release
and after it merges that commit will be what is should be tagged as the
0.14.0 release.

As part of this there are few small changes other changes being made.
The release notes are update to have consistent formatting and wording,
a missing universal function for `all_shortest_paths` is added, missing
doc toctree entries are added, and the ahash version in the lock file is
downgraded to 0.8.6 as 0.8.7 has an undocumented MSRV on Rust 1.72 when
building for aarch64 CPU architectures which is incompatible with
rustworkx's documented MSRV.

* Move new release notes

* New release note fixes
  • Loading branch information
mtreinish authored Jan 23, 2024
1 parent dcece27 commit 8984d9a
Show file tree
Hide file tree
Showing 42 changed files with 143 additions and 73 deletions.
76 changes: 34 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repository = "https://github.com/Qiskit/rustworkx"
license = "Apache-2.0"

[workspace.dependencies]
ahash = "0.8.7"
ahash = "0.8.6"
fixedbitset = "0.4.2"
hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] }
indexmap = { version = ">=1.9, <3", features = ["rayon"] }
Expand Down
1 change: 1 addition & 0 deletions docs/source/api/algorithm_functions/coloring.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Coloring
rustworkx.graph_bipartite_edge_color
rustworkx.graph_greedy_edge_color
rustworkx.graph_misra_gries_edge_color
rustworkx.two_color
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ Connectivity and Cycles
rustworkx.all_pairs_all_simple_paths
rustworkx.stoer_wagner_min_cut
rustworkx.longest_simple_path
rustworkx.is_bipartite
rustworkx.isolates
rustworkx.has_path
3 changes: 2 additions & 1 deletion docs/source/api/algorithm_functions/dag_algorithms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ DAG Algorithms
rustworkx.dag_weighted_longest_path_length
rustworkx.is_directed_acyclic_graph
rustworkx.layers
rustworkx.transitive_reduction
rustworkx.transitive_reduction
rustworkx.topological_generations
2 changes: 2 additions & 0 deletions docs/source/api/algorithm_functions/shortest_paths.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ Shortest Paths
rustworkx.k_shortest_path_lengths
rustworkx.num_shortest_paths_unweighted
rustworkx.unweighted_average_shortest_path_length
rustworkx.all_shortest_paths
rustworkx.digraph_all_shortest_paths
2 changes: 2 additions & 0 deletions docs/source/api/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ Exceptions
rustworkx.visit.StopSearch
rustworkx.visit.PruneSearch
rustworkx.JSONSerializationError
rustworkx.InvalidMapping
rustworkx.GraphNotBipartite
1 change: 1 addition & 0 deletions docs/source/api/pydigraph_api_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ the functions from the explicitly typed based on the data type.
rustworkx.digraph_all_pairs_bellman_ford_shortest_paths
rustworkx.digraph_all_pairs_bellman_ford_path_lengths
rustworkx.digraph_k_shortest_path_lengths
rustworkx.digraph_all_shortest_paths
rustworkx.digraph_dfs_edges
rustworkx.digraph_dfs_search
rustworkx.digraph_find_cycle
Expand Down
1 change: 1 addition & 0 deletions docs/source/api/pygraph_api_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ typed API based on the data type.
rustworkx.graph_bellman_ford_shortest_path_lengths
rustworkx.graph_all_pairs_bellman_ford_shortest_paths
rustworkx.graph_all_pairs_bellman_ford_path_lengths
rustworkx.graph_all_shortest_paths
rustworkx.graph_dfs_edges
rustworkx.graph_dfs_search
rustworkx.graph_transitivity
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
features:
- |
Added a new function :func:`.all_shortest_paths` (and the graph type specific
variants: :func:`~rustworkx.graph_all_shortest_paths` and
:func:`~rustworkx.digraph_all_shortest_paths`) that finds every
simple shortest path two nodes in a graph.
- |
Added a new function to the ``rustworkx-core`` module
``rustworkx_core::shortest_path`` module ``all_shortest_path()`` which is
used to find every simple shortest path in a graph.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ features:
graph = rx.generators.heavy_square_graph(5)
colors = rx.two_color(graph)
mpl_draw(graph, node_color=list(colors.values()))
mpl_draw(graph, node_color=[colors[i] for i in range(len(graph))])
- |
Added a new function, :func:`~.is_bipartite` to determine whether a given
graph object is bipartite or not.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
features:
- |
Added a new function, :func:`~.PyDiGraph.clear` that clears all nodes and
edges from a :class:`.PyGraph` or :class:`.PyDiGraph`.
- |
Added a new function, :func:`~.PyDiGraph.clear_edges` that clears all edges
for :class:`.PyGraph` or :class:`rustworkx.PyDiGraph` without
modifying nodes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ features:
Added a new function, :func:`~.graph_line_graph` to construct a line
graph of a :class:`~.PyGraph` object.
The line graph `L(G)` of a graph `G` represents the adjacencies between edges of G.
`L(G)` contains a vertex for every edge in `G`, and `L(G)` contains an edge between two
vertices if the corresponding edges in `G` have a vertex in common.
The line graph :math:`L(G)` of a graph :math:`G` represents the adjacencies between edges of G.
:math:`L(G)` contains a vertex for every edge in :math:`G`, and :math:`L(G)` contains an edge between two
vertices if the corresponding edges in :math:`G` have a vertex in common.
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.PyGraph()
node_a = graph.add_node("a")
Expand All @@ -26,6 +27,7 @@ features:
assert out_graph.node_indices() == [0, 1, 2, 3]
assert out_graph.edge_list() == [(3, 1), (3, 0), (1, 0), (2, 0), (2, 1)]
assert out_edge_map == {edge_ab: 0, edge_ac: 1, edge_bc: 2, edge_ad: 3}
mpl_draw(out_graph, with_labels=True)
- |
Added a new function, :func:`~.graph_greedy_edge_color` to color edges
Expand All @@ -36,7 +38,9 @@ features:
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.generators.cycle_graph(7)
edge_colors = rx.graph_greedy_edge_color(graph)
assert edge_colors == {0: 0, 1: 1, 2: 0, 3: 1, 4: 0, 5: 1, 6: 2}
mpl_draw(graph, edge_color=[edge_colors[i] for i in range(graph.num_edges())])
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@ features:
The above algorithm is described in the paper paper: "A constructive proof of
Vizing's theorem" by Misra and Gries, 1992.
The coloring produces at most d + 1 colors where d is the maximum degree
The coloring produces at most :math:`d + 1` colors where :math:`d` is the maximum degree
of the graph.
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.generators.cycle_graph(7)
edge_colors = rx.graph_misra_gries_edge_color(graph)
assert edge_colors == {0: 0, 1: 1, 2: 2, 3: 0, 4: 1, 5: 0, 6: 2}
mpl_draw(graph, edge_color=[edge_colors[i] for i in range(graph.num_edges())])
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ features:
# Draw the updated graph
mpl_draw(graph, with_labels=True)
fixes:
- |
Fixes missing method that is present in PyDiGraph but not in PyGraph.
see `#837 <https://github.com/Qiskit/rustworkx/issues/837>`__ for more info.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ features:
The implemented algorithm is based on the paper "A simple algorithm for edge-coloring
bipartite multigraphs" by Noga Alon, 2003.
The coloring produces at most d colors where d is the maximum degree of a node in the graph.
The algorithm runs in time ``O (n + m log m)``, where ``n`` is the number of vertices and
``m`` is the number of edges in the graph.
The coloring produces at most :math:`d` colors where :math:`d` is the maximum degree of a node in the graph.
The algorithm runs in time :math:`\mathcal{O}(n + m\log{}m)`, where :math:`n` is the number of vertices and
:math:`m` is the number of edges in the graph.
.. jupyter-execute::
Expand All @@ -39,4 +39,5 @@ features:
from rustworkx.visualization import mpl_draw
random_graph = rx.undirected_random_bipartite_graph(10, 5, 0.5, seed=20)
mpl_draw(random_graph)
layout = rx.bipartite_layout(random_graph, set(range(10)))
mpl_draw(random_graph, pos=layout)
14 changes: 14 additions & 0 deletions releasenotes/notes/0.14/prepare-0.14-4a655a08ce38533f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
prelude: |
This is a new feature release of Rustworkx that adds many new features to
the library. The highlights of this release are:
* Fully type annotated for support with `mypy <https://mypy-lang.org/>`__
and other tooling
* Improvements to the graph coloring functions
This release supports running with Python 3.8 through 3.12. The minimum
supported Rust version for building rustworkx and rustworkx-core from source
is now 1.64.0. The minimum supported version of macOS for this release has
been increased from 10.9 to 10.12. Also, the Linux ppc64le and s390x platform
support has been downgraded from :ref:`tier-3` to :ref:`tier-4`.

This file was deleted.

Loading

0 comments on commit 8984d9a

Please sign in to comment.