Skip to content

Typo fixes in max_sharpe_ratio_optimization.ipynb #2806

Typo fixes in max_sharpe_ratio_optimization.ipynb

Typo fixes in max_sharpe_ratio_optimization.ipynb #2806

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: superstaq
on:
push:
branches: [main]
paths-ignore:
- "general-superstaq/general_superstaq/_version.py"
pull_request:
branches: [main]
workflow_call: null
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
format:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq
- name: Format
run: |
checks/format_.py
lint:
name: Lint check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq -e ./cirq-superstaq -e ./supermarq-benchmarks
- name: Pylint
run: |
checks/pylint_.py --all
flake8:
name: Flake8 check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq
- name: Flake8
run: |
checks/flake8_.py
mypy:
name: Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
- name: Type check
run: |
checks/mypy_.py
coverage:
name: Pytest and Coverage check
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
- name: Coverage check
run: |
checks/coverage_.py
coverage-gss:
name: Standalone general-superstaq coverage check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev]
- name: Coverage check
run: |
checks/coverage_.py general-superstaq
coverage-css:
name: Minimum cirq version coverage check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies, using minimum supported cirq version
run: |
cirq_version=$(sed cirq-superstaq/requirements.txt -ne 's/^cirq-core.=/cirq-core==/p')
echo "Using minimum cirq-core version: $cirq_version"
python -m pip install --upgrade pip
pip install "$cirq_version" -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq -e ./cirq-superstaq[dev]
- name: Coverage check
run: |
checks/coverage_.py cirq-superstaq
coverage-qss:
name: Standalone qiskit-superstaq coverage check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies, using minimum supported qiskit version
run: |
qiskit_version=$(sed qiskit-superstaq/requirements.txt -ne 's/^qiskit-ibm-provider.=/qiskit-ibm-provider==/p')
echo "Using minimum qiskit-ibm-provider version: $qiskit_version"
python -m pip install --upgrade pip
pip install "$qiskit_version" -e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq[dev]
- name: Coverage check
run: |
checks/coverage_.py qiskit-superstaq
pytest-mac:
name: Pytest macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
- name: Pytest-mac check
run: |
checks/pytest_.py
pytest-win:
name: Pytest Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
- name: Pytest-win check
run: |
checks/pytest_.py
shell: bash
requirements:
name: Requirements check
runs-on: ubuntu-latest
timeout-minutes: 6
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
- name: Requirements check
run: |
checks/requirements.py
notebook:
env:
SUPERSTAQ_API_KEY: ${{ secrets.SUPERSTAQ_API_KEY }}
IBMQ_TOKEN: ${{ secrets.IBMQ_TOKEN }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- type: "qiskit-superstaq"
pattern: "*_qss.ipynb qiskit-superstaq"
dependencies: "-e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq[examples] -e ./cirq-superstaq -e ./supermarq-benchmarks"
- type: "cirq-superstaq"
pattern: "*_css.ipynb cirq-superstaq"
dependencies: "-e ./checks-superstaq -e ./general-superstaq -e ./qiskit-superstaq -e ./cirq-superstaq -e ./supermarq-benchmarks"
name: Notebook check for ${{ matrix.type }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ${{ matrix.dependencies }}
- name: Check notebooks
run: |
checks/pytest_.py --notebook ${{ matrix.pattern }}
docs:
name: Build docs
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/cache@v4
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('**/pyproject.toml', '**/*requirements.txt') }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ./checks-superstaq -e ./general-superstaq[dev] -e ./qiskit-superstaq[dev] -e ./cirq-superstaq[dev] -e ./supermarq-benchmarks[dev]
pip install -r ./docs/requirements.txt
sudo apt-get install pandoc
- name: Build docs
run: |
checks/build_docs.py