Skip to content

Commit

Permalink
Merge branch 'main' into negative_feature_10360
Browse files Browse the repository at this point in the history
  • Loading branch information
wshanks committed Sep 1, 2023
2 parents b0ca1d4 + dcec79e commit 7353e56
Show file tree
Hide file tree
Showing 285 changed files with 53,413 additions and 2,021 deletions.
12 changes: 5 additions & 7 deletions .azure/docs-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@ jobs:
versionSpec: '${{ parameters.pythonVersion }}'
displayName: 'Use Python ${{ parameters.pythonVersion }}'

- bash: |
set -e
python -m pip install --upgrade pip setuptools wheel
python -m pip install -U "tox<4.4.0"
sudo apt-get update
sudo apt-get install -y graphviz
- bash: tools/install_ubuntu_docs_dependencies.sh
displayName: 'Install dependencies'

- bash: |
tox -edocs
set -e
tox -e docs
# Clean up Sphinx detritus.
rm -rf docs/_build/html/{.doctrees,.buildinfo}
displayName: 'Run Docs build'
- task: ArchiveFiles@2
Expand Down
4 changes: 2 additions & 2 deletions .azure/lint-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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
black --check qiskit test tools examples setup.py qiskit_pkg
echo "Running rustfmt check, any errors reported can be fixed with 'cargo fmt'"
cargo fmt --check
displayName: "Formatting"
Expand All @@ -44,7 +44,7 @@ jobs:
set -e
source test-job/bin/activate
echo "Running ruff"
ruff qiskit test tools examples setup.py
ruff qiskit test tools examples setup.py qiskit_pkg/setup.py
echo "Running pylint"
pylint -rn qiskit test tools
echo "Running Cargo Clippy"
Expand Down
35 changes: 20 additions & 15 deletions .azure/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ parameters:
- name: "testImages"
type: boolean

- name: "installOptionals"
type: boolean
default: false

- name: "installFromSdist"
type: boolean
default: false
Expand Down Expand Up @@ -84,27 +88,27 @@ jobs:
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- ${{ if eq(parameters.installOptionals, true) }}:
- bash: |
set -e
source test-job/bin/activate
python -m pip install -r requirements-optional.txt -c constraints.txt
python -m pip check
displayName: "Install optional packages"
- bash: |
set -e
sudo apt-get update
sudo apt-get install -y graphviz
displayName: 'Install optional non-Python dependencies'
- bash: |
set -e
source test-job/bin/activate
python -m pip install -U \
-c constraints.txt \
"cplex ; python_version < '3.11'" \
"qiskit-aer" \
"tweedledum ; python_version < '3.11'" \
"z3-solver"
mkdir -p /tmp/terra-tests
cp -r test /tmp/terra-tests/.
cp .stestr.conf /tmp/terra-tests/.
cp -r .stestr /tmp/terra-tests/. || :
sudo apt-get update
sudo apt-get install -y graphviz
pip check
displayName: 'Install post-install optional dependencies'
- bash: |
set -e
source test-job/bin/activate
pushd /tmp/terra-tests
export PYTHONHASHSEED=$(python -S -c "import random; print(random.randint(1, 4294967295))")
echo "PYTHONHASHSEED=$PYTHONHASHSEED"
Expand Down Expand Up @@ -178,7 +182,8 @@ jobs:
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt \
-e ".[visualization]"
-r requirements-optional.txt \
-e .
sudo apt-get update
sudo apt-get install -y graphviz pandoc
image_tests/bin/pip check
Expand Down
11 changes: 11 additions & 0 deletions .azure/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ parameters:
type: string
displayName: "Version of Python to test"

- name: "installOptionals"
type: boolean
default: false

jobs:
- job: "MacOS_Tests_Python${{ replace(parameters.pythonVersion, '.', '') }}"
displayName: "Test macOS Python ${{ parameters.pythonVersion }}"
Expand Down Expand Up @@ -45,6 +49,13 @@ jobs:
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- ${{ if eq(parameters.installOptionals, true) }}:
- bash: |
set -e
source test-job/bin/activate
pip install -r requirements-optional.txt -c constraints.txt
displayName: "Install optional packages"
- bash: |
set -e
source test-job/bin/activate
Expand Down
13 changes: 12 additions & 1 deletion .azure/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ parameters:
type: string
displayName: "Versions of Python to test"

- name: "installOptionals"
type: boolean
default: false

jobs:
- job: "Windows_Tests_Python${{ replace(parameters.pythonVersion, '.', '') }}"
displayName: "Test Windows Python ${{ parameters.pythonVersion }}"
Expand Down Expand Up @@ -38,13 +42,20 @@ jobs:
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt \
"z3-solver" \
-e .
pip check
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"
- ${{ if eq(parameters.installOptionals, true) }}:
- bash: |
set -e
source test-job/Scripts/activate
pip install -c constraints.txt -r requirements-optional.txt
pip check
displayName: "Install optional packages"
- bash: |
set -e
chcp.com 65001
Expand Down
49 changes: 14 additions & 35 deletions .azure/tutorials-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,39 @@ jobs:
pool: {vmImage: 'ubuntu-latest'}

variables:
QISKIT_SUPPRESS_PACKAGING_WARNINGS: Y
PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip
QISKIT_CELL_TIMEOUT: 300

steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '${{ parameters.pythonVersion }}'
displayName: 'Use Python ${{ parameters.pythonVersion }}'

- bash: |
set -e
git clone https://github.com/Qiskit/qiskit-tutorials --depth=1
python -m pip install --upgrade pip setuptools wheel
python -m pip install -U \
-c constraints.txt \
-r requirements.txt \
-r requirements-dev.txt \
"qiskit-ibmq-provider" \
"qiskit-aer" \
"z3-solver" \
"networkx" \
"matplotlib>=3.3.0" \
sphinx \
nbsphinx \
sphinx_rtd_theme \
"tweedledum ; python_version < '3.11'" \
cvxpy \
-e .
sudo apt-get update
sudo apt-get install -y graphviz pandoc
pip check
- bash: tools/install_ubuntu_docs_dependencies.sh
displayName: 'Install dependencies'
env:
SETUPTOOLS_ENABLE_FEATURES: "legacy-editable"

- bash: |
set -e
cd qiskit-tutorials
sphinx-build -b html . _build/html
# Sync with '.github/workflows/docs_deploy.yml'
- bash: tools/prepare_tutorials.bash circuits circuits_advanced operators
displayName: 'Download current tutorials'

- bash: tox -e tutorials
displayName: "Execute tutorials"
env:
QISKIT_PARALLEL: False
QISKIT_CELL_TIMEOUT: 300

- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'qiskit-tutorials/_build/html'
rootFolderOrFile: 'executed_tutorials'
archiveType: tar
archiveFile: '$(Build.ArtifactStagingDirectory)/html_tutorials.tar.gz'
archiveFile: '$(Build.ArtifactStagingDirectory)/executed_tutorials.tar.gz'
verbose: true
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: 'Publish docs'
displayName: 'Publish updated tutorials'
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'html_tutorials'
artifactName: 'executed_tutorials'
Parallel: true
ParallelCount: 8
condition: succeededOrFailed()
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: Generate unittest coverage report
run: |
set -e
python -m pip install -c constraints.txt -r requirements-dev.txt qiskit-aer
python -m pip install -c constraints.txt -r requirements-dev.txt -r requirements-optional.txt
stestr run
# We set the --source-dir to '.' because we want all paths to appear relative to the repo
# root (we need to combine them with the Python ones), but we only care about `grcov`
Expand Down
Loading

0 comments on commit 7353e56

Please sign in to comment.