Releases: Qiskit/rustworkx
rustworkx 0.12.0
retworkx 0.11.0
retworkx 0.10.2
retworkx 0.10.1
retworkx 0.10.0
retworkx 0.9.0
retworkx 0.8.0
retworkx 0.7.2
retworkx 0.7.1
This release includes a fix for an oversight in the previous 0.7.0 and 0.6.0 releases. Those releases both added custom return types BFSSuccessors
, NodeIndices
, EdgeList
, and WeightedEdgeList
that implemented the Python sequence protocol which were used in place of lists for certain functions and methods. However, none of those classes had support for being pickled, which was causing compatibility issues for users that were using the return in a context where it would be pickled (for example as an argument to or return of a function called with multiprocessing). This release has a single change over 0.7.0 which is to add the missing support for pickling BFSSuccessors
, NodeIndices
, EdgeList
, and WeightedEdgeList
which fixes that issue.
retworkx 0.7.0
This release includes several new features and bug fixes.
This release also dropped support for Python 3.5. If you want to use
retworkx with Python 3.5 that last version which supports Python 3.5
is 0.6.0.
Added
- New generator functions for two new generator types, mesh and grid
were added toretworkx.generators
for generating all to all and grid
graphs respectively. These functions are:
retworkx.generators.mesh_graph()
,
retworkx.generators.directed_mesh_graph()
,
retworkx.generators.grid_graph()
, and
retworkx.generators.directed_grid_graph()
- A new function,
digraph_union()
, for taking the union between two
PyDiGraph
objects has been added. - A new
PyDiGraph
methodmerge_nodes()
has been added. This method can be used
to merge 2 nodes in a graph if they have the same weight/data payload. - A new
PyDiGraph
methodfind_node_by_weight()
which can be used to lookup
a node index by a given weight/data payload. - A new return type
NodeIndices
has been added. This class is returned
by functions and methods that return a list of node indices. It
implements the Python sequence protocol and can be used as list. - Two new return types
EdgeList
andWeightedEdgeList
. These classes are
returned from functions and methods that return a list of edge tuples
and a list of edge tuples with weights. They both implement the Python
sequence protocol and can be used as a list - A new function
collect_runs()
has been added. This function is used to
find linear paths of nodes that match a given condition.
Upgrade
- Support for running retworkx on Python 3.5 has been dropped. The last
release with support for Python 3.5 is 0.6.0. - The
PyDiGraph.node_indexes()
,PyDiGraph.neighbors()
,
PyDiGraph.successor_indices()
,PyDiGraph.predecessor_indices()
,
PyDiGraph.add_nodes_from()
,PyGraph.node_indexes()
,
PyGraph.add_nodes_from()
, andPyGraph.neighbors()
methods and the
dag_longest_path()
,topological_sort()
,
graph_astar_shortest_path()
, anddigraph_astar_shortest_path()
functions now return aNodeIndices
object instead of a list of
integers. This should not require any changes unless explicit type
checking for a list was used. - The
PyDiGraph.edge_list()
andPyGraph.edge_list()
methods and
digraph_dfs_edges()
,graph_dfs_edges()
, anddigraph_find_cycle()
functions now return anEdgeList
object instead of a list of integers.
This should not require any changes unless explicit type checking
for a list was used. - The
PyDiGraph.weighted_edge_list()
,PyDiGraph.in_edges()
,
PyDiGraph.out_edges()
, andPyGraph.weighted_edge_list()
methods now
return aWeightedEdgeList
object instead of a list of integers. This
should not require any changes unless explicit type checking for a
list was used.
Fixes
BFSSuccessors
objects now can be compared with==
and!=
to any other
Python sequence type- The built and published sdist packages for retworkx were previously
not including the Cargo.lock file. This meant that the reproducible
build versions of the rust dependencies were not passed through to
source. This has been fixed so building from sdist will always use
known working versions that we use for testing in CI.