Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into more-annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding committed Nov 21, 2023
2 parents 93e4a48 + dc617e9 commit 7072c4f
Show file tree
Hide file tree
Showing 11 changed files with 232 additions and 37 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,82 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels_musl_aarch64:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment: release
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: cp36-* cp37-* cp311-* cp312-* *many*
CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* *many*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels_musl_aarch64_part_2:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
environment: release
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.8'
- uses: dtolnay/rust-toolchain@stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_SKIP: cp36-* cp37-* cp38-* cp39-* cp310-* *many*
CIBW_TEST_SKIP: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-* *many*
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
build_wheels_ppc64le:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
81 changes: 51 additions & 30 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions 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.3"
ahash = "0.8.6"
fixedbitset = "0.4.2"
hashbrown = { version = ">=0.13, <0.15", features = ["rayon"] }
indexmap = { version = ">=1.9, <3", features = ["rayon"] }
Expand All @@ -51,7 +51,7 @@ num-complex = "0.4"
num-traits.workspace = true
numpy.workspace = true
petgraph.workspace = true
quick-xml = "0.30"
quick-xml = "0.31"
rand.workspace = true
rand_pcg.workspace = true
rayon.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ source.
- x86_64
- :ref:`tier-3`
-
* - Linux (musl)
- aarch64
- :ref:`tier-4`
-
* - macOS (10.12 or newer)
- x86_64
- :ref:`tier-1`
Expand Down
7 changes: 7 additions & 0 deletions releasenotes/notes/fix-all-simple-paths-03f4534438d1068d.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
fixes:
- |
Fixed the behavior of :func:`~rustworkx.graph_all_simple_paths` and
:func:`~rustworkx.digraph_all_simple_paths` when ``min_depth`` is set to
``0``. Refer to `#955 <https://github.com/Qiskit/rustworkx/issues/955>`__ for
more information.
12 changes: 12 additions & 0 deletions releasenotes/notes/numpy-2-pin-11bc3a379fb29bf7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
other:
- |
This version of rustworkx is explicitly pinned to the Numpy 1.x series,
because it includes compiled extensions that are not yet compiled against
the as-yet-unreleased Numpy 2.x series. We will release a new version of
rustworkx with Numpy 2.x support as soon as feasible.
We cannot prevent your package manager from resolving to older versions of
rustworkx (which do not have the same pin but are still likely to be
incompatible) if you forcibly try to install rustworkx alongside Numpy 2,
before we have released a compatible version.
3 changes: 2 additions & 1 deletion releasenotes/notes/platform-updates-e9b296144e633c95.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
features:
- |
Added support for musl Linux platforms on x86_64 and aarch64 at :ref:`tier-3`.
Added support for musl Linux platforms on x86_64 at :ref:`tier-3`
and aarch64 at :ref:`tier-4`.
upgrade:
- |
Support for the Linux ppc64le pllatform has changed from tier 3 to tier 4
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def readme():
PKG_NAME = os.getenv("RUSTWORKX_PKG_NAME", "rustworkx")
PKG_VERSION = "0.14.0"
PKG_PACKAGES = ["rustworkx", "rustworkx.visualization"]
PKG_INSTALL_REQUIRES = ["numpy>=1.16.0"]
PKG_INSTALL_REQUIRES = ["numpy>=1.16.0,<2"]
RUST_EXTENSIONS = [RustExtension("rustworkx.rustworkx", "Cargo.toml",
binding=Binding.PyO3, debug=rustworkx_debug)]

Expand Down
6 changes: 3 additions & 3 deletions src/connectivity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ pub fn graph_all_simple_paths(
));
}
let min_intermediate_nodes: usize = match min_depth {
Some(0) | None => 0,
Some(depth) => depth - 2,
None => 0,
};
let cutoff_petgraph: Option<usize> = cutoff.map(|depth| depth - 2);
let result: Vec<Vec<usize>> = algo::all_simple_paths(
Expand All @@ -573,7 +573,7 @@ pub fn graph_all_simple_paths(
/// :param int to: The node index to find the paths to
/// :param int min_depth: The minimum depth of the path to include in the output
/// list of paths. By default all paths are included regardless of depth,
/// sett to 0 will behave like the default.
/// setting to 0 will behave like the default.
/// :param int cutoff: The maximum depth of path to include in the output list
/// of paths. By default includes all paths regardless of depth, setting to
/// 0 will behave like default.
Expand Down Expand Up @@ -602,8 +602,8 @@ pub fn digraph_all_simple_paths(
));
}
let min_intermediate_nodes: usize = match min_depth {
Some(0) | None => 0,
Some(depth) => depth - 2,
None => 0,
};
let cutoff_petgraph: Option<usize> = cutoff.map(|depth| depth - 2);
let result: Vec<Vec<usize>> = algo::all_simple_paths(
Expand Down
Loading

0 comments on commit 7072c4f

Please sign in to comment.