Skip to content

Commit

Permalink
Merge branch 'main' into more-greedy-color
Browse files Browse the repository at this point in the history
  • Loading branch information
mtreinish committed May 29, 2024
2 parents 3e84085 + e4dae8c commit 7101d83
Show file tree
Hide file tree
Showing 36 changed files with 3,230 additions and 432 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,17 +150,17 @@ jobs:
run: |
set -e
mv tests/retworkx*profraw .
./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./coveralls.info
./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./coveralls.lcov
- uses: actions/upload-artifact@v4
with:
name: coverage
path: coveralls.info
path: coveralls.lcov
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
file: ./coveralls.info
file: ./coveralls.lcov
docs:
if: github.repository_owner == 'Qiskit'
needs: [tests]
Expand Down
44 changes: 22 additions & 22 deletions Cargo.lock

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

8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ ahash = "0.8.6"
fixedbitset = "0.4.2"
hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] }
indexmap = { version = ">=1.9, <3", features = ["rayon"] }
ndarray = { version = "0.15.6", features = ["rayon"] }
num-traits = "0.2"
numpy = "0.21.0"
petgraph = "0.6.4"
petgraph = "0.6.5"
rand = "0.8"
rand_pcg = "0.3"
rayon = "1.10"
Expand All @@ -44,6 +45,7 @@ ahash.workspace = true
fixedbitset.workspace = true
hashbrown.workspace = true
indexmap.workspace = true
ndarray.workspace = true
ndarray-stats = "0.5.1"
num-bigint = "0.4"
num-complex = "0.4"
Expand All @@ -63,10 +65,6 @@ rustworkx-core = { path = "rustworkx-core", version = "=0.15.0" }
version = "0.21.2"
features = ["abi3-py38", "extension-module", "hashbrown", "num-bigint", "num-complex", "indexmap"]

[dependencies.ndarray]
version = "^0.15.6"
features = ["rayon"]

[dependencies.sprs]
version = "^0.11"
features = ["multi_thread"]
Expand Down
3 changes: 3 additions & 0 deletions docs/source/api/random_graph_generator_functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ Random Graph Generator Functions
rustworkx.undirected_gnp_random_graph
rustworkx.directed_gnm_random_graph
rustworkx.undirected_gnm_random_graph
rustworkx.directed_sbm_random_graph
rustworkx.undirected_sbm_random_graph
rustworkx.random_geometric_graph
rustworkx.hyperbolic_random_graph
rustworkx.barabasi_albert_graph
rustworkx.directed_barabasi_albert_graph
rustworkx.directed_random_bipartite_graph
Expand Down
12 changes: 12 additions & 0 deletions releasenotes/notes/fix-digraph-find-cycle-141e302ff4a8fcd4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
fixes:
- |
Fixed the behavior of :func:`~rustworkx.digraph_find_cycle` when
no source node was provided. Previously, the function would start looking
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:
- |
The `rustworkx-core` function `rustworkx_core::connectivity::find_cycle` now
requires the `petgraph::visit::Visitable` trait.
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, all `kwargs` were required when calling the method. The new annotation
accepts `kwargs` with partial arguments.
17 changes: 17 additions & 0 deletions releasenotes/notes/graph-ext-3f008015c31c592e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
features:
- |
Node contraction is now supported for ``petgraph`` types ``StableGraph``
and ``GraphMap`` in rustworkx-core. To use it, import one of the ``ContractNodes*`` traits
from ``graph_ext`` and call the ``contract_nodes`` method on your graph.
- |
All current ``petgraph`` data structures now support testing for parallel
edges in ``rustworkx-core``. To use this, import ``HasParallelEdgesDirected``
or ``HasParallelEdgesUndirected`` depending on your graph type, and call
the ``has_parallel_edges`` method on your graph.
- |
A new trait ``NodeRemovable`` has been added to ``graph_ext`` module in
``rustworkx-core`` which provides a consistent interface for performing
node removal operations on ``petgraph`` types ``Graph``, ``StableGraph``,
``GraphMap``, and ``MatrixGraph``. To use it, import ``NodeRemovable`` from
``graph_ext``.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
features:
- |
Adds new random graph generator function, :func:`.hyperbolic_random_graph`
to sample the hyperbolic random graph model.
- |
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,7 @@
---
features:
- |
Added a new function ``lexicographical_topological_sort`` to the
``rustworkx_core::dag_algo`` module. That is a gneric Rust implementation
for the core rust library that provides the
:func:`.lexicographical_topological_sort` function to Rust users.
7 changes: 7 additions & 0 deletions releasenotes/notes/migrate-longest_path-7c11cf2c8ac9781f.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
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.
9 changes: 9 additions & 0 deletions releasenotes/notes/sbm-random-graph-bf7ccd8e938f4218.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
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`.
- |
Adds new function ``sbm_random_graph`` to the rustworkx-core module
``rustworkx_core::generators`` that samples a graph from the stochastic
block model.
1 change: 1 addition & 0 deletions rustworkx-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ ahash.workspace = true
fixedbitset.workspace = true
hashbrown.workspace = true
indexmap.workspace = true
ndarray.workspace = true
num-traits.workspace = true
petgraph.workspace = true
priority-queue = "2.0"
Expand Down
Loading

0 comments on commit 7101d83

Please sign in to comment.