Skip to content

Commit

Permalink
Merge branch 'main' into planar_layout
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanIsCoding authored Jan 13, 2024
2 parents d14ad6e + f75291d commit 9e3bb7c
Show file tree
Hide file tree
Showing 404 changed files with 33,268 additions and 26,607 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/docs_dev.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
name: Docs Publish
on:
workflow_dispatch:
push:
branches: [ main ]

concurrency:
group: docs-gh-pages

jobs:
deploy:
if: github.repository_owner == 'Qiskit'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U virtualenv setuptools wheel tox
sudo apt-get install graphviz pandoc
- name: Build and publish
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
- name: Build docs
run: |
tools/deploy_documentation_dev.sh
tools/build_documentation_dev.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: html_docs
path: docs/build/html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: dev_docs
force_orphan: true
29 changes: 21 additions & 8 deletions .github/workflows/docs_release.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,42 @@
name: Docs Publish
on:
workflow_dispatch:
push:
tags:
- "*"

concurrency:
group: docs-gh-pages

jobs:
deploy:
if: github.repository_owner == 'Qiskit'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -U virtualenv setuptools wheel tox
sudo apt-get install graphviz pandoc
- name: Build and publish
env:
encrypted_rclone_key: ${{ secrets.encrypted_rclone_key }}
encrypted_rclone_iv: ${{ secrets.encrypted_rclone_iv }}
QISKIT_DOCS_BUILD_TUTORIALS: 'always'
- name: Build docs
run: |
tools/deploy_documentation.sh
tools/build_documentation_release.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
name: html_docs
path: release_docs/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: release_docs/
force_orphan: true
100 changes: 38 additions & 62 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ concurrency:
cancel-in-progress: true
jobs:
build_lint:
if: github.repository_owner == 'Qiskit'
name: Build, rustfmt, and python lint
runs-on: ubuntu-latest
steps:
Expand All @@ -20,15 +21,13 @@ jobs:
echo -e "\033[31;1;4mConcurrency Group\033[0m"
echo -e "$CONCURRENCY_GROUP\n"
shell: bash
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- run: pip install -U flake8 black~=22.0
- uses: actions-rs/toolchain@v1
- run: pip install -U ruff black~=22.0
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
profile: minimal
components: rustfmt
- name: Test Build
run: cargo build
Expand All @@ -39,117 +38,97 @@ jobs:
- name: Black Codestyle Format
run: black --check --diff retworkx rustworkx retworkx tests
- name: Python Lint
run: flake8 --per-file-ignores='retworkx/__init__.py:F405,F403' setup.py retworkx tests rustworkx
run: ruff check rustworkx retworkx setup.py tests
- name: Check stray release notes
run: python tools/find_stray_release_notes.py
- name: rustworkx-core Rust Tests
run: pushd rustworkx-core && cargo test && popd
- name: rustworkx-core Docs
run: pushd rustworkx-core && cargo doc && popd
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: rustworkx_core_docs
path: target/doc/rustworkx_core
tests:
if: github.repository_owner == 'Qiskit'
needs: [build_lint]
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }}
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
rust: [stable]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11.0-rc.2"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
platform: [
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
]
include:
# Test minimal supported Rust version
- rust: 1.48.0
- rust: 1.64
python-version: 3.8
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }
msrv: "MSRV"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.platform.rust-target }}
profile: minimal
default: true
targets: ${{ matrix.platform.rust-target }}
- name: 'Install dependencies'
run: python -m pip install --upgrade tox
- name: 'Install binary dependencies'
run: sudo apt-get install -y graphviz
if: runner.os == 'Linux'
- name: 'Run tests'
run: tox -epy
tests_retworkx_compat:
needs: [build_lint]
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }}
runs-on: ${{ matrix.platform.os }}
tests_stubs:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: python-stubs-${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable]
python-version: ["3.10"]
platform: [
{ os: "macOS-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" },
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" },
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" },
]
python-version: [3.8, 3.9, "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform.python-architecture }}
architecture: x64
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.platform.rust-target }}
profile: minimal
default: true
uses: dtolnay/rust-toolchain@stable
- name: 'Install dependencies'
run: python -m pip install --upgrade tox
- name: 'Install binary dependencies'
run: sudo apt-get install -y graphviz
if: runner.os == 'Linux'
- name: 'Build rustworkx'
run: |
tox -epy --notest
- name: 'Run retworkx tests'
env:
RUSTWORKX_PKG_NAME: "retworkx"
run: tox -epy -- -t ./retworkx_backwards_compat
- name: 'Run rustworkx stub tests'
run: tox -estubs
coverage:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
profile: default
components: llvm-tools-preview
- name: Download grcov
run: curl -L https://github.com/mozilla/grcov/releases/download/v0.8.7/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
- name: Install deps
run: pip install -U setuptools-rust networkx testtools fixtures
run: pip install -U setuptools-rust networkx scipy testtools fixtures
- name: Build retworkx
run: python setup.py develop
env:
Expand All @@ -165,7 +144,7 @@ jobs:
set -e
mv tests/retworkx*profraw .
./grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "/*" -o ./coveralls.info
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: coverage
path: coveralls.info
Expand All @@ -175,30 +154,27 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coveralls.info
docs:
if: github.repository_owner == 'Qiskit'
needs: [tests]
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
uses: dtolnay/rust-toolchain@stable
- name: Install binary deps
run: sudo apt-get install -y graphviz
- name: Install deps
run: pip install -U tox
- name: Build Docs
run: tox -edocs
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: html_docs
path: docs/build/html
31 changes: 0 additions & 31 deletions .github/workflows/retworkx_wheels.yml

This file was deleted.

Loading

0 comments on commit 9e3bb7c

Please sign in to comment.