Skip to content

Commit

Permalink
Merge branch 'main' into pr-diagonal
Browse files Browse the repository at this point in the history
  • Loading branch information
king-p3nguin authored Dec 4, 2023
2 parents b77e1a8 + 6137248 commit fd9c25c
Show file tree
Hide file tree
Showing 468 changed files with 6,748 additions and 94,227 deletions.
6 changes: 4 additions & 2 deletions .azure/lint-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
Expand All @@ -35,7 +37,7 @@ jobs:
set -e
source test-job/bin/activate
echo "Running black, any errors reported can be fixed with 'tox -eblack'"
black --check qiskit test tools examples setup.py qiskit_pkg
black --check qiskit test tools examples setup.py
echo "Running rustfmt check, any errors reported can be fixed with 'cargo fmt'"
cargo fmt --check
displayName: "Formatting"
Expand All @@ -44,7 +46,7 @@ jobs:
set -e
source test-job/bin/activate
echo "Running ruff"
ruff qiskit test tools examples setup.py qiskit_pkg/setup.py
ruff qiskit test tools examples setup.py
echo "Running pylint"
pylint -rn qiskit test tools
echo "Running Cargo Clippy"
Expand Down
13 changes: 8 additions & 5 deletions .azure/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,16 @@ jobs:
# Use stable Rust, rather than MSRV, to spot-check that stable builds properly.
rustup override set stable
source test-job/bin/activate
python -m pip install -U pip setuptools wheel
# Install setuptools-rust for building sdist
python -m pip install -U -c constraints.txt setuptools-rust
python setup.py sdist
python -m pip install -U pip
python -m pip install -U build
python -m build --sdist .
python -m pip install -U \
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt \
dist/qiskit-terra*.tar.gz
dist/qiskit-*.tar.gz
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: "Install Terra from sdist"
- ${{ if eq(parameters.installFromSdist, false) }}:
Expand All @@ -91,6 +92,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
displayName: "Install Terra directly"
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
Expand Down
2 changes: 2 additions & 0 deletions .azure/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
pip check
displayName: 'Install dependencies'
env:
Expand Down
2 changes: 2 additions & 0 deletions .azure/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
-r requirements.txt \
-r requirements-dev.txt \
-e .
# Build and install both qiskit and qiskit-terra so that any optionals
# depending on `qiskit` will resolve correctly.
pip check
displayName: 'Install dependencies'
env:
Expand Down
42 changes: 0 additions & 42 deletions .azure/tutorials-linux.yml

This file was deleted.

61 changes: 1 addition & 60 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ on:
description: "Push to qiskit.org?"
required: false
type: boolean
do_translatables:
description: "Push translatable strings?"
required: false
type: boolean

jobs:
build:
Expand Down Expand Up @@ -53,33 +49,8 @@ jobs:
- name: Install dependencies
run: tools/install_ubuntu_docs_dependencies.sh

# This is just to have tox create the environment, so we can use it to execute the tutorials.
# We want to re-use it later for the build, hence 'tox run --notest' instead of 'tox devenv'.
- name: Prepare Python environment
run: tox run -e docs --notest

# The reason to use the custom script rather than letting 'nbsphinx' do its thing normally
# within the Sphinx build is so that the execution process is the same as in the test CI.
- name: Execute tutorials in place
run: .tox/docs/bin/python tools/execute_tutorials.py docs/tutorials
env:
QISKIT_CELL_TIMEOUT: "300"

- name: Build documentation
# We can skip re-installing the package, since we just did it a couple of steps ago.
run: tox run -e docs --skip-pkg-install
env:
QISKIT_ENABLE_ANALYTICS: "true"
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"

- name: Build translatable strings
run: tox run -e gettext
env:
# We've already built them.
QISKIT_DOCS_BUILD_TUTORIALS: "never"
DOCS_PROD_BUILD: "true"
run: tox run -e docs

- name: Store built documentation artifact
uses: actions/upload-artifact@v3
Expand All @@ -91,13 +62,6 @@ jobs:
!**/.buildinfo
if-no-files-found: error

- name: Store translatable strings artifact
uses: actions/upload-artifact@v3
with:
name: qiskit-translatables
path: ./docs/locale/en/*
if-no-files-found: error

deploy:
if: github.event_name != 'workflow_dispatch' || inputs.do_deployment
name: Deploy to qiskit.org
Expand Down Expand Up @@ -198,26 +162,3 @@ jobs:
JOINED_PREFIXES: ${{ steps.choose.outputs.joined_prefixes }}
RCLONE_KEY: ${{ secrets.ENCRYPTED_RCLONE_KEY}}
RCLONE_IV: ${{ secrets.ENCRYPTED_RCLONE_IV }}

deploy_translatables:
if: (github.event_name == 'workflow_dispatch' && inputs.do_translatables) || (github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == needs.build.outputs.latest_tag)
name: Push translatable strings
needs: [build]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
path: 'qiskit'

- uses: actions/download-artifact@v3
with:
name: qiskit-translatables
path: 'deploy'

- name: Deploy translations
id: ssh_key
run: qiskit/tools/deploy_translatable_strings.sh "${{ github.workspace }}/deploy"
env:
encrypted_deploy_po_branch_key: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_KEY }}
encrypted_deploy_po_branch_iv: ${{ secrets.ENCRYPTED_DEPLOY_PO_BRANCH_IV }}
4 changes: 3 additions & 1 deletion .github/workflows/neko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ jobs:
- uses: Qiskit/qiskit-neko@main
with:
test_selection: terra
repo_install_command: "pip install -c constraints.txt ."
# We have to forcibly uninstall any old version of qiskit or qiskit-terra during the
# changeover, because it's not possible to safely upgrade an existing installation to 1.0.
repo_install_command: "pip uninstall qiskit qiskit-terra && pip install -c constraints.txt ."
42 changes: 7 additions & 35 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
Expand All @@ -42,7 +42,7 @@ jobs:
python-version: '3.10'
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BEFORE_ALL: rustup target add aarch64-apple-darwin
CIBW_ARCHS_MACOS: arm64 universal2
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: s390x
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: ppc64le
CIBW_TEST_SKIP: "cp*"
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.13.0
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v3
Expand All @@ -168,7 +168,7 @@ jobs:
with:
packages-dir: wheelhouse/
sdist:
name: Build and publish terra sdist
name: Build and publish sdist
runs-on: ${{ matrix.os }}
needs: ["upload_shared_wheels"]
environment: release
Expand All @@ -185,36 +185,8 @@ jobs:
with:
python-version: '3.10'
- name: Install deps
run: pip install -U twine setuptools-rust wheel build
run: pip install -U build
- name: Build sdist
run: python -m build . --sdist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
metapackage:
name: Build and publish terra sdist
runs-on: ${{ matrix.os }}
needs: ["sdist"]
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.10'
- name: Install deps
run: pip install -U twine setuptools-rust wheel build
- name: Build packages
run: |
set -e
cd qiskit_pkg
python -m build .
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: qiskit_pkg/dist
Loading

0 comments on commit fd9c25c

Please sign in to comment.