Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to python 3.11 #311

Open
wants to merge 25 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
types: [created]
workflow_dispatch:

jobs:
jobs:
pypi_update:

# Only run this job if new work is pushed to "main"
# if: github.event_name == 'push' && github.ref == 'refs/heads/main'

Expand All @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.9

- name: Check-out repository
uses: actions/checkout@v3
Expand All @@ -31,7 +31,7 @@ jobs:
run: |
python -m pip install --upgrade pip build twine
pip install setuptools wheel twine

- name: Publish to PyPI
run: |
scripts/push_package_pypi.sh __token__ ${{secrets.PYPI_API_TOKEN}}
10 changes: 5 additions & 5 deletions .github/workflows/test_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9
- name: Log in with Azure
uses: azure/login@v1
with:
Expand All @@ -38,7 +38,7 @@ jobs:
pip install ipykernel
- name: Setup IBMQ account
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
run: |
IBMQ_TOKEN=$IBMQ_TOKEN
source env/bin/activate
Expand Down Expand Up @@ -81,13 +81,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9

- name: Install OpenQAOA
run: |
python -m pip install --upgrade pip
make dev-install-docs

- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
Expand All @@ -104,7 +104,7 @@ jobs:
screen -d -m qvm -S
screen -d -m quilc -S
cd ..

- name: Build and test Sphinx docs
run: |
sudo apt-get install pandoc
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test_dev_ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9
- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
Expand All @@ -47,7 +47,7 @@ jobs:
source env/bin/activate
python -m pip install --upgrade pip
make local-install
pip install -e ./src/openqaoa-core[tests]
pip install -e "./src/openqaoa-core[tests]"
pip install ipykernel
- name: Run tests
run: |
Expand All @@ -66,14 +66,14 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9

- name: Install OpenQAOA
run: |
python -m pip install --upgrade pip
pip install .
pip install -e ./src/openqaoa-core[docs]
make local-install
pip install -e "./src/openqaoa-core[docs]"

- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
Expand All @@ -90,7 +90,7 @@ jobs:
screen -d -m qvm -S
screen -d -m quilc -S
cd ..

- name: Build and test Sphinx docs
run: |
sudo apt-get install pandoc
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/test_main_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ['3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11']
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
Expand All @@ -42,7 +42,7 @@ jobs:
pip install ipykernel
- name: Setup IBMQ account
env:
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
run: |
IBMQ_TOKEN=$IBMQ_TOKEN
source env/bin/activate
Expand All @@ -68,7 +68,7 @@ jobs:
source env/bin/activate
ipython kernel install --name "env" --user
pytest tests/ src/*/tests -m 'not (qpu or sim)' --cov --cov-report=xml:coverage.xml

- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
with:
Expand All @@ -86,13 +86,13 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.8
python-version: 3.9

- name: Install OpenQAOA
run: |
python -m pip install --upgrade pip
make dev-install-docs

- name: Install qvm
run: |
find /usr/lib -name "libffi.so*"
Expand All @@ -109,7 +109,7 @@ jobs:
screen -d -m qvm -S
screen -d -m quilc -S
cd ..

- name: Build and test Sphinx docs
run: |
sudo apt-get install pandoc
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_main_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11']
forest-sdk-version: ['2.23.0']

runs-on: macos-latest
Expand All @@ -25,8 +25,8 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{matrix.python}}
- name: Install forest on macos

- name: Install forest on macos
run: |
echo $PATH
cd /usr/local/bin/
Expand All @@ -44,7 +44,7 @@ jobs:
cd ..

- name: Install OpenQAOA
run: |
run: |
python -m pip install --user virtualenv
python -m venv env
source env/bin/activate
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_main_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11']
forest-sdk-version: [2.23.0]

# Run on a Windows machine
Expand All @@ -33,7 +33,7 @@ jobs:
- name: Add msbuild to PATH
uses: microsoft/[email protected]

# Install OpenQAOA
# Install OpenQAOA
- name: Install OpenQAOA
shell: pwsh
run: |
Expand All @@ -57,7 +57,7 @@ jobs:
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\quilc.exe" -ArgumentList "-S" -PassThru
Start-Process -FilePath "C:\Program Files\Rigetti Computing\Forest SDK for Windows\qvm.exe" -ArgumentList "-S" -PassThru

# Run all tests
# Run all tests
- name: Run tests
shell: pwsh
run: |
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
- cron: "0 0 * * 1,3,5" #“At 00:00 on Monday, Wednesday, and Friday.” https://crontab.guru/#0_0_*_*_1,3,5
workflow_dispatch:

jobs:
jobs:
test_pypi:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ['3.8', '3.9', '3.10']
python: ['3.9', '3.10', '3.11']
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

Expand All @@ -26,31 +26,31 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install OpenQAOA-Core
run: |
pip install openqaoa-core
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Qiskit
run: |
pip install openqaoa-qiskit
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Pyquil
run: |
pip install openqaoa-pyquil
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Braket
run: |
pip install openqaoa-braket
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Azure
run: |
pip install openqaoa-azure
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/test_pypi_prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
# - cron: "0 0 * * 1,3,5" #“At 00:00 on Monday, Wednesday, and Friday.” https://crontab.guru/#0_0_*_*_1,3,5
workflow_dispatch:

jobs:
jobs:
test_pypi:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: ['3.8', '3.9', '3.10', '3.11']
python: ['3.9', '3.10', '3.11']
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}

Expand All @@ -26,31 +26,31 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install OpenQAOA-Core release candidate
run: |
pip install --pre openqaoa-core
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Qiskit release candidate
run: |
pip install --pre openqaoa-qiskit
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Pyquil release candidate
run: |
pip install --pre openqaoa-pyquil
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Braket release candidate
run: |
pip install --pre openqaoa-braket
python -c 'from openqaoa._version import __version__; print(__version__)'


- name: Install OpenQAOA-Azure release candidate
run: |
pip install --pre openqaoa-azure
Expand Down
1 change: 0 additions & 1 deletion _version.py

This file was deleted.

Loading
Loading