Skip to content

Commit

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

This commit prepares the 0.15.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.15.0 release
and after it merges that commit will be what is should be tagged as the
0.15.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.

* Add missing release notes

* Apply suggestions from code review

Co-authored-by: Raynel Sanchez <[email protected]>

* Move new release note

* Reword Dorogovtsev-Goltsev-Mendes rustworkx-core release note slightly

* Update releasenotes/notes/0.15/swap-nox-tox-dea2bb14c400641c.yaml

* Update releasenotes/notes/0.15/prepare-0.15.0-771047bc5b71c569.yaml

---------

Co-authored-by: Raynel Sanchez <[email protected]>
Co-authored-by: Ivan Carvalho <[email protected]>
  • Loading branch information
3 people authored Jun 27, 2024
1 parent 5829af6 commit 0d648b2
Show file tree
Hide file tree
Showing 48 changed files with 176 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Connectivity and Cycles
rustworkx.is_bipartite
rustworkx.isolates
rustworkx.has_path
rustworkx.connected_subgraphs
1 change: 1 addition & 0 deletions docs/source/api/algorithm_functions/other.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ Other Algorithm Functions
rustworkx.graph_line_graph
rustworkx.metric_closure
rustworkx.is_planar
rustworkx.digraph_maximum_bisimulation
2 changes: 2 additions & 0 deletions docs/source/api/custom_return_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ Custom Return Types
rustworkx.NodeMap
rustworkx.ProductNodeMap
rustworkx.BiconnectedComponents
rustworkx.RelationalCoarsestPartition
rustworkx.IndexPartitionBlock
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
features:
- |
Added two new functions, :func:`~rustworkx.from_node_link_json_file` and
:func:`~rustworkx.parse_node_link_json`, which are used to parse a node
link json object and generate a rustworkx :class:`.PyGraph` or
:class:`.PyDiGraph` object from it.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
features:
- |
Added a new function ``collect_runs`` to rustworkx-core's ``dag_algo``
module. Previously, the :func:`~.collect_runs` functionality for DAGs was
only exposed via the Python interface. Now Rust users can take advantage of
this functionality in ``rustworkx-core``.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
features:
- |
Added a function :func:`~rustworkx.connected_subgraphs` to determine all connected subgraphs of size `k` in
polynomial delay for undirected graphs. This improves upon the brute-force method by two orders of magnitude for
sparse graphs such as heavy-hex, enabling addressing larger graphs and for a larger `k`. The introduced method is
based on "Enumerating Connected Induced Subgraphs: Improved Delay and Experimental Comparison" by Christian
Komusiewicz and Frank Sommer. In particular, the procedure `Simple` is implemented. Possible runtime improvement can
Added a function :func:`~rustworkx.connected_subgraphs` to determine all connected subgraphs of size :math:`k` in
polynomial delay for undirected graphs. This improves upon the brute-force method by two orders of magnitude for
sparse graphs such as heavy-hex, enabling addressing larger graphs and for a larger :math:`k`. The introduced method is
based on "Enumerating Connected Induced Subgraphs: Improved Delay and Experimental Comparison" by Christian
Komusiewicz and Frank Sommer. In particular, the procedure ``Simple`` is implemented. Possible runtime improvement can
be gained by parallelization over each recursion or by following the discussion in Lemma 4 of above work and thus
implementing intermediate sets `X` and `P` more efficiently.
implementing intermediate sets :math:`X` and :math:`P` more efficiently.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
features:
- |
Added :func:`rustworkx.generators.dorogovtsev_goltsev_mendes_graph` that generates
deterministic scale-free graphs using the Dorogovtsev-Goltsev-Mendes iterative procedure.
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.generators.dorogovtsev_goltsev_mendes_graph(2)
mpl_draw(graph)
- |
Added a new function, ``rustworkx_core::generators::dorogovtsev_goltsev_mendes_graph``, to
rustworkx-core that is used to generate deterministic scale-free graphs using the
Dorogovtsev-Goltsev-Mendes iterative procedure.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ fixes:
for a cycle at an arbitrary node which was not guaranteed to return a cycle.
Now, the function will smartly choose a source node to start the search from
such that if a cycle exists, it will be found.
other:
upgrade:
- |
The `rustworkx-core` function `rustworkx_core::connectivity::find_cycle` now
requires the `petgraph::visit::Visitable` trait.
The ``rustworkx-core`` function ``rustworkx_core::connectivity::find_cycle``
now requires the ``petgraph::visit::Visitable`` trait for its input
argument ``graph``. This was required to fix the behavior when ``source``
is ``None`` to ensure we always find a cycle if one exists.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
fixes:
- |
Fixed an issue with the :func:`.graphviz_draw` where it would not correctly
escape special characters in all scenarios. This has been corrected so
you can now use special characters with the function, for example:
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import graphviz_draw
graphviz_draw(
rx.generators.path_graph(2),
node_attr_fn=lambda x: {"label": "the\nlabel", "tooltip": "the\ntooltip"},
)
Fixed: `#750 <https://github.com/Qiskit/rustworkx/issues/750>`__
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,4 @@ fixes:
mpl_draw(graph, with_labels=True, labels=str, edge_labels=str, alpha=0.5)
- |
Refer to `#774 <https://github.com/Qiskit/rustworkx/issues/774>` for more
details.
Fixed `#774 <https://github.com/Qiskit/rustworkx/issues/774>`__
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed a bug in the type hint for the :func:`~rustworkx.visualization.mpl_draw`.
Previously, the type hint indicated that all ``kwargs`` were required when calling the method. The type annotation has been updated to indicate that
``kwargs`` with partial arguments is allowed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ fixes:
* :func:`rustworkx.bellman_ford_shortest_paths`
* :func:`rustworkx.astar_shortest_path`
where a `Pyo3.PanicException`were raise with no much detail at the moment
of pass in the `source` argument the index of an out of bound node.
where a ``PanicException`` was raised without much detail when an
invalid node index was passed in to the ``source`` argument. This has been
corrected so an ``IndexError`` is raised instead.
Fixed `#1117 <https://github.com/Qiskit/rustworkx/issues/1117>`__
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Fixed support for handling ``Long`` type attributes from input GraphML
in the :func:`~rustworkx.read_graphml` function.
Fixed `#1140 <https://github.com/Qiskit/rustworkx/issues/1140>`__.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
features:
- |
Adds new random graph generator function, :func:`.hyperbolic_random_graph`
to sample the hyperbolic random graph model. For example:
.. jupyter-execute::
import math
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.hyperbolic_random_graph(
[[math.sinh(0.5), 0, 3.14159], [-math.sinh(1), 0, -3.14159]],
2.55,
None,
)
mpl_draw(graph)
- |
Adds new function to the rustworkx-core module ``rustworkx_core::generators``
``hyperbolic_random_graph()`` that samples the hyperbolic random graph model.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
features:
- |
Added a new function, :func:`~rustworkx.is_semi_connected` which will
check if a :class: `~rustworkx.PyDiGraph` object is semi-connected.
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ features:
graph. This function is based on the algorithm described in the publication
"Three partition refinement algorithms" by Paige and Tarjan. This function
recieves a graph and returns a
:class:`~rustworkx.RelationalCoarsestPartition`. This function is in regards
to issue `#1075 <https://github.com/Qiskit/rustworkx/issues/1075>`__.
:class:`~rustworkx.RelationalCoarsestPartition`.
- |
Added a new class :class:`~rustworkx.RelationalCoarsestPartition` to output
the maximum bisimulation or relational coarsest partition of a graph. This
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
features:
- |
Added a new function ``collect_bicolor_runs`` to rustworkx-core's ``dag_algo`` module.
Previously, the ``collect_bicolor_runs`` functionality for DAGs was only exposed
Previously, the :func:`~.collect_bicolor_runs` functionality for DAGs was only exposed
via the Python interface. Now Rust users can take advantage of this functionality in ``rustworkx-core``.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
features:
- |
Added a new module ``dag_algo`` to rustworkx-core which contains a new function ``longest_path``
function to rustworkx-core. Previously the ``longest_path`` functionality for DAGs was only exposed
via the Python interface. Now Rust users can take advantage of this functionality in rustworkx-core.
function to rustworkx-core. Previously the :func:`~.longest_path` functionality for DAGs was only exposed
via the Python interface. Now Rust users can take advantage of this functionality in rustworkx-core.
43 changes: 43 additions & 0 deletions releasenotes/notes/0.15/prepare-0.15.0-771047bc5b71c569.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
prelude: >
This is a new feature release of Rustworkx that adds many new features to
the library. The highlights of this release are:
* An expansion of functions in rustworkx-core that previously only existed
in the Python API.
* Expanded graph coloring algorithms
This release moves to using the `Python Stable ABI <https://docs.python.org/3.9/c-api/stable.html>`__,
while this release officially supports Python 3.8 through 3.12, the published
binaries should be compatible with future Python versions too. Although there
is no guarantee provided about future versions. Additionally, the minimum
supported Rust version for building rustworkx and more importantly
rustworkx-core is now 1.70.0. Additionally, in this release the macOS arm64
platform has been promoted from :ref:`tier-4` to :ref:`tier-1`.
features:
- |
Added two new keyword arguments, ``periodic`` an ``with_positions``, to the generator functions
:func:`.hexagonal_lattice_graph` and :func:`.directed_hexagonal_lattice_graph`. If periodic is
set to ``True`` the boundaries of the lattice will be joined to form a periodic grid. If the
``with_positions`` argument is set to ``True`` than the data payload of all the nodes will
be set to a tuple of the form ``(x, y)`` where x and y represent the node's position in the
lattice. For example:
.. jupyter-execute::
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.generators.hexagonal_lattice_graph(4, 4, periodic=True, with_positions=True)
mpl_draw(graph, with_labels=True, labels=str)
- |
Added a new rustworkx-core function ``rustworkx_core::generators::hexagonal_lattice_graph_weighted()``
which is used to generate a hexagonal lattice graph where a callback is used to generate the node
weights for each node from a tuple of the form ``(usize, usize)``.
upgrade:
- |
The interface of the ``rustworkx_core::generators::hexagonal_lattice_graph()`` function has been
changed, there is a new required boolean argument ``periodic`` which is used to indicate whether
the output graph should join the bondaries of the lattice to form a periodic grid or not. This
argument didn't exist in prior releases of rustworkx-core and it will need to be added when
upgrading to this new release.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@ features:
Adds new random graph generator in rustworkx for the stochastic block model.
There is a generator for directed :func:`.directed_sbm_random_graph` and
undirected graphs :func:`.undirected_sbm_random_graph`.
.. jupyter-execute::
import numpy as np
import rustworkx as rx
from rustworkx.visualization import mpl_draw
graph = rx.undirected_sbm_random_graph(
[2, 1],
np.array([[1, 1], [1, 0]], dtype=float),
False,
)
mpl_draw(graph)
- |
Adds new function ``sbm_random_graph`` to the rustworkx-core module
``rustworkx_core::generators`` that samples a graph from the stochastic
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/0.15/swap-nox-tox-dea2bb14c400641c.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
other:
- |
For developement of rustworkx the automated testing environment
tooling used has switched from Tox to instead
`Nox <https://nox.thea.codes/en/stable/>`__. This is has no impact for
end users and is only relevant if you contribute code to rustworkx.

This file was deleted.

6 changes: 0 additions & 6 deletions releasenotes/notes/collect_runs_core-13073cc7041bc2f5.yaml

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions releasenotes/notes/fix-graphviz-draw-tooltip-3f697d71c4b79e60.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions releasenotes/notes/is-semi-connected-d4176b228aa62baf.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions releasenotes/notes/swap-nox-tox-dea2bb14c400641c.yaml

This file was deleted.

0 comments on commit 0d648b2

Please sign in to comment.