Skip to content

Commit

Permalink
Add support for Python 3.9 (qiskit-community#505)
Browse files Browse the repository at this point in the history
* Add support for Python 3.9

Python 3.9.0 was released on 10-05-2020, this commits marks the support
of Python 3.9 in qiskit-ignis. It adds the supported python version in
the package metadata and updates the CI configuration to run test jobs
on Python 3.9.

* Build from master for aer 3.9 support

* Split aer install into separate tox job

* Use tox -epy39 for 3.9 jobs

* Tweak gha condition

* Fix 3.9 reverse conditions in gha config

* Remove 3.9 windows job until aer release

(cherry picked from commit fddd1e5)
  • Loading branch information
mtreinish committed Feb 5, 2021
1 parent b11effe commit dac3ebe
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 29 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9]
os: ["macOS-latest", "ubuntu-latest"]
steps:
- uses: actions/checkout@v2
Expand All @@ -31,12 +31,11 @@ jobs:
run: python -m pip install -U tox setuptools virtualenv wheel
- name: Install and Run Tests
run: tox -e py
if: runner.os != 'macOS'
if: matrix.python-version != '3.9'
- name: Install and Run Tests
env:
QISKIT_IN_PARALLEL: TRUE
run: tox -e py
if: runner.os == 'macOS'
run: tox -e py39
if: matrix.python-version == '3.9'

tests-no-opt:
name: tests-python3.8-no-optional-dependencies
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -68,9 +67,12 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
# TODO: Add 3.9 to the list after aer 0.8.0 release
python-version: [3.6, 3.7, 3.8]
steps:
- uses: actions/checkout@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
Expand All @@ -90,6 +92,7 @@ jobs:
- name: Install and Run Tests
run: tox --sitepackages -epy
shell: bash -l {0}

lint:
name: lint
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
pylint==2.4.4
pycodestyle
qiskit-aer>=0.3.0
qiskit-aer>=0.3.0;python_version<'3.9'
scikit-learn>=0.17
Sphinx>=2.1
sphinx-rtd-theme>=0.4.0
sphinx-tabs>=1.1.11
sphinx-autodoc-typehints
stestr>=2.5.0
ddt>=1.2.0,!=1.4.0
jupyter
jupyter-sphinx
jupyter;python_version<'3.9'
jupyter-sphinx;python_version<'3.9'
reno
matplotlib
pyfakefs
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering",
],
keywords="qiskit sdk quantum",
Expand Down
19 changes: 0 additions & 19 deletions tools/build_aer.py

This file was deleted.

10 changes: 9 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 2.1
envlist = py36, py37, py38, lint
envlist = py36, py37, py38, py39, lint
skipsdist = True

[testenv]
Expand All @@ -20,6 +20,14 @@ commands =
pip install -U -c constraints.txt -r{toxinidir}/requirements-dev.txt
pip check
stestr run {posargs}
# Remove after qiskit-aer 0.8.0 release:
[testenv:py39]
commands =
pip install -U -c constraints.txt git+https://github.com/Qiskit/qiskit-terra.git
pip install -U -c constraints.txt git+https://github.com/Qiskit/qiskit-aer.git
pip install -U -c constraints.txt -r{toxinidir}/requirements-dev.txt
pip check
stestr run {posargs}

[testenv:no-opt]
deps =
Expand Down

0 comments on commit dac3ebe

Please sign in to comment.