Skip to content

Commit e97ade2

Browse files
authored
Merge branch 'main' into enhance-visualization-typing
2 parents 11d4346 + f521a50 commit e97ade2

File tree

218 files changed

+8433
-2735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+8433
-2735
lines changed

.github/.mergify.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pull_request_rules:
2+
- name: backport
3+
conditions:
4+
- label=stable-backport-potential
5+
actions:
6+
backport:
7+
branches:
8+
- stable/0.16

.github/workflows/docs_dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
run: |
2929
tools/build_documentation_dev.sh
3030
- name: Upload artifact
31-
uses: actions/upload-pages-artifact@v2
31+
uses: actions/upload-pages-artifact@v3
3232
with:
3333
name: html_docs
3434
path: docs/build/html
3535
- name: Deploy
36-
uses: peaceiris/actions-gh-pages@v3
36+
uses: peaceiris/actions-gh-pages@v4
3737
with:
3838
github_token: ${{ secrets.GITHUB_TOKEN }}
3939
publish_branch: gh-pages

.github/workflows/docs_release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
run: |
3030
tools/build_documentation_release.sh
3131
- name: Upload artifact
32-
uses: actions/upload-pages-artifact@v2
32+
uses: actions/upload-pages-artifact@v3
3333
with:
3434
name: html_docs
3535
path: release_docs/
3636
- name: Deploy
37-
uses: peaceiris/actions-gh-pages@v3
37+
uses: peaceiris/actions-gh-pages@v4
3838
with:
3939
github_token: ${{ secrets.GITHUB_TOKEN }}
4040
publish_branch: gh-pages

.github/workflows/main.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,25 @@ jobs:
2929
- run: pip install -U ruff==0.6.8 black~=24.8
3030
- uses: dtolnay/rust-toolchain@stable
3131
with:
32-
components: rustfmt
32+
components: rustfmt, clippy
3333
- name: Test Build
3434
run: cargo build
3535
- name: Rust Format
3636
run: cargo fmt --all -- --check
3737
- name: Clippy
38-
run: cargo clippy --all-targets -- -D warnings
38+
run: cargo clippy --workspace --all-targets -- -D warnings
3939
- name: Black Codestyle Format
40-
run: black --check --diff retworkx rustworkx retworkx tests
40+
run: black --check --diff rustworkx tests retworkx
4141
- name: Python Lint
42-
run: ruff check rustworkx retworkx setup.py tests
42+
run: ruff check rustworkx setup.py tests retworkx
4343
- name: Check stray release notes
4444
run: python tools/find_stray_release_notes.py
4545
- name: rustworkx-core Rust Tests
46-
run: pushd rustworkx-core && cargo test && popd
46+
run: cargo test --workspace
4747
- name: rustworkx-core Docs
48-
run: pushd rustworkx-core && cargo doc && popd
48+
run: cargo doc -p rustworkx-core
49+
env:
50+
RUSTDOCFLAGS: '-D warnings'
4951
- uses: actions/upload-artifact@v4
5052
with:
5153
name: rustworkx_core_docs
@@ -58,7 +60,7 @@ jobs:
5860
strategy:
5961
matrix:
6062
rust: [stable]
61-
python-version: [3.9, "3.10", "3.11", "3.12"]
63+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
6264
platform: [
6365
{ os: "macOS-13", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
6466
{ os: "macOS-14", python-architecture: "arm64", rust-target: "aarch64-apple-darwin" },
@@ -67,13 +69,13 @@ jobs:
6769
]
6870
include:
6971
# Test minimal supported Rust version
70-
- rust: 1.70.0
72+
- rust: 1.79.0
7173
python-version: "3.10"
7274
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
7375
msrv: "MSRV"
7476
# Test future versions of Rust and Python
7577
- rust: beta
76-
python-version: "3.13-dev"
78+
python-version: "3.13" # upgrade to 3.14-dev when the release candidate is available
7779
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
7880
msrv: "Beta"
7981
# Exclude python 3.9 on arm64 until actions/setup-python#808 is resolved
@@ -107,7 +109,7 @@ jobs:
107109
runs-on: ubuntu-latest
108110
strategy:
109111
matrix:
110-
python-version: [3.9, "3.10", "3.11", "3.12"]
112+
python-version: [3.9, "3.10", "3.11", "3.12", "3.13"]
111113
steps:
112114
- uses: actions/checkout@v4
113115
- name: Set up Python ${{ matrix.python-version }}
@@ -139,21 +141,21 @@ jobs:
139141
- name: Download grcov
140142
run: curl -L https://github.com/mozilla/grcov/releases/download/v0.8.7/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
141143
- name: Install deps
142-
run: pip install -U setuptools-rust networkx testtools fixtures stestr
143-
- name: Build retworkx
144+
run: pip install -U setuptools setuptools-rust networkx testtools fixtures stestr
145+
- name: Build rustworkx
144146
run: python setup.py develop
145147
env:
146148
CARGO_INCREMENTAL: 0
147149
RUSTFLAGS: "-Cinstrument-coverage"
148-
LLVM_PROFILE_FILE: "retworkx-%p-%m.profraw"
150+
LLVM_PROFILE_FILE: "rustworkx-%p-%m.profraw"
149151
- name: Run tests
150152
run: cd tests && stestr run && cd ..
151153
env:
152-
LLVM_PROFILE_FILE: "retworkx-%p-%m.profraw"
154+
LLVM_PROFILE_FILE: "rustworkx-%p-%m.profraw"
153155
- name: Run grcov
154156
run: |
155157
set -e
156-
mv tests/retworkx*profraw .
158+
mv tests/rustworkx*profraw .
157159
./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./coveralls.lcov
158160
- uses: actions/upload-artifact@v4
159161
with:

.github/workflows/wheels.yml

Lines changed: 7 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
strategy:
4848
fail-fast: false
4949
matrix:
50-
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
50+
os: [ubuntu-latest, windows-latest, macos-13, macos-14, ubuntu-24.04-arm]
5151
steps:
5252
- uses: actions/checkout@v4
5353
- uses: actions/setup-python@v5
@@ -57,7 +57,7 @@ jobs:
5757
- uses: dtolnay/rust-toolchain@stable
5858
- name: Install cibuildwheel
5959
run: |
60-
python -m pip install cibuildwheel==2.17.0
60+
python -m pip install cibuildwheel==2.23.2
6161
- name: Build wheels
6262
run: |
6363
python -m cibuildwheel --output-dir wheelhouse
@@ -82,83 +82,6 @@ jobs:
8282
uses: pypa/gh-action-pypi-publish@release/v1
8383
with:
8484
packages-dir: deploy
85-
build_wheels_aarch64:
86-
name: Build wheels on ${{ matrix.os }}
87-
runs-on: ${{ matrix.os }}
88-
environment: release
89-
permissions:
90-
id-token: write
91-
strategy:
92-
fail-fast: false
93-
matrix:
94-
os: [ubuntu-latest]
95-
steps:
96-
- uses: actions/checkout@v4
97-
- uses: actions/setup-python@v5
98-
name: Install Python
99-
with:
100-
python-version: '3.10'
101-
- uses: dtolnay/rust-toolchain@stable
102-
- name: Set up QEMU
103-
uses: docker/setup-qemu-action@v2
104-
with:
105-
platforms: all
106-
- name: Install cibuildwheel
107-
run: |
108-
python -m pip install cibuildwheel==2.17.0
109-
- name: Build wheels
110-
run: |
111-
python -m cibuildwheel --output-dir wheelhouse
112-
env:
113-
CIBW_ARCHS_LINUX: aarch64
114-
CIBW_SKIP: cp36-* cp37-* pp* *musl*
115-
- uses: actions/upload-artifact@v4
116-
with:
117-
path: ./wheelhouse/*.whl
118-
name: wheel-builds-aarch64
119-
- name: Publish package distributions to PyPI
120-
uses: pypa/gh-action-pypi-publish@release/v1
121-
with:
122-
packages-dir: wheelhouse/
123-
build_wheels_musl_aarch64:
124-
name: Build wheels on ${{ matrix.os }}
125-
runs-on: ${{ matrix.os }}
126-
environment: release
127-
permissions:
128-
id-token: write
129-
strategy:
130-
fail-fast: false
131-
matrix:
132-
os: [ubuntu-latest]
133-
steps:
134-
- uses: actions/checkout@v4
135-
- uses: actions/setup-python@v5
136-
name: Install Python
137-
with:
138-
python-version: '3.10'
139-
- uses: dtolnay/rust-toolchain@stable
140-
- name: Set up QEMU
141-
uses: docker/setup-qemu-action@v2
142-
with:
143-
platforms: all
144-
- name: Install cibuildwheel
145-
run: |
146-
python -m pip install cibuildwheel==2.17.0
147-
- name: Build wheels
148-
run: |
149-
python -m cibuildwheel --output-dir wheelhouse
150-
env:
151-
CIBW_ARCHS_LINUX: aarch64
152-
CIBW_SKIP: cp36-* cp37-* cp38-* *many*
153-
CIBW_TEST_SKIP: cp39-* cp310-* cp311-* cp312-* *many*
154-
- uses: actions/upload-artifact@v4
155-
with:
156-
path: ./wheelhouse/*.whl
157-
name: wheel-builds-musl-aarch64
158-
- name: Publish package distributions to PyPI
159-
uses: pypa/gh-action-pypi-publish@release/v1
160-
with:
161-
packages-dir: wheelhouse/
16285
build_wheels_ppc64le:
16386
name: Build wheels on ${{ matrix.os }}
16487
runs-on: ${{ matrix.os }}
@@ -182,7 +105,7 @@ jobs:
182105
platforms: all
183106
- name: Install cibuildwheel
184107
run: |
185-
python -m pip install cibuildwheel==2.17.0
108+
python -m pip install cibuildwheel==2.23.2
186109
- name: Build wheels
187110
run: |
188111
python -m cibuildwheel --output-dir wheelhouse
@@ -220,7 +143,7 @@ jobs:
220143
platforms: all
221144
- name: Install cibuildwheel
222145
run: |
223-
python -m pip install cibuildwheel==2.17.0
146+
python -m pip install cibuildwheel==2.23.2
224147
- name: Build wheels
225148
run: |
226149
python -m cibuildwheel --output-dir wheelhouse
@@ -253,7 +176,7 @@ jobs:
253176
run: rustup default stable-i686-pc-windows-msvc
254177
- name: Install cibuildwheel
255178
run: |
256-
python -m pip install cibuildwheel==2.17.0
179+
python -m pip install cibuildwheel==2.23.2
257180
- name: Build wheels
258181
run: |
259182
python -m cibuildwheel --output-dir wheelhouse
@@ -279,12 +202,10 @@ jobs:
279202
- name: Install deps
280203
run: pip install -U setuptools-rust wheel build
281204
- name: Build sdist
282-
run: python setup.py bdist_wheel
283-
env:
284-
RUSTWORKX_PKG_NAME: retworkx
205+
run: pushd retworkx && python setup.py bdist_wheel && popd
285206
- uses: actions/upload-artifact@v4
286207
with:
287-
path: ./dist/*
208+
path: ./retworkx/dist/*
288209
name: sdist-retworkx
289210
- name: Publish package distributions to PyPI
290211
uses: pypa/gh-action-pypi-publish@release/v1

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,7 @@ retworkx/*pyd
2121
!/docs/source/images/*.svg
2222
*.jpg
2323
**/*.so
24-
retworkx-core/Cargo.lock
24+
rustworkx-core/Cargo.lock
25+
**/.DS_Store
26+
venv/
27+
.python-version

.mergify.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)