Skip to content

docs: use lowercase parameter names in channel_dim error messages #5161

docs: use lowercase parameter names in channel_dim error messages

docs: use lowercase parameter names in channel_dim error messages #5161

name: check-build
permissions:
contents: read
id-token: write
on:
pull_request:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
types: [opened, reopened, converted_to_draft, ready_for_review, synchronize]
branches:
- master
push:
branches:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#running-your-workflow-only-when-a-push-to-specific-branches-occurs
- master
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# Pin ruff to the version in pyproject so CI formatting matches local/pre-commit.
- uses: astral-sh/ruff-action@v3
with:
version: "0.15.0"
# Check only (no --fix / no in-place format): style and format violations must fail CI
# rather than being silently auto-fixed in the runner and discarded.
- run: ruff check
- run: ruff format --check
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
# Run the ty type checker for visibility. Non-blocking for now: there is a large backlog of existing
# diagnostics, so failing CI on them would require a separate type-annotation cleanup.
- name: Type-check with ty (non-blocking)
continue-on-error: true
run: uv run --group lint ty check toqito
toqito-pytest:
strategy:
fail-fast: false
matrix:
# Add versions here to expand support matrix
python-version: ["3.12", "3.13", "3.14"]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
env:
PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install blas, lapack for Linux
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libblas-dev liblapack-dev
- name: Install blas, lapack, suite-sparse for macOS
if: runner.os == 'macOS'
run: |
brew install openblas lapack suite-sparse
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install toqito + dependencies
run: |
uv sync --group dev --no-group docs --no-group lint
- name: Run tests
if: matrix.python-version != '3.12' || matrix.os != 'ubuntu-latest'
run: uv run pytest -v -m "not slow"
- name: Run tests with coverage (including slow tests)
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
run: uv run pytest -v --runslow --cov-config=.coveragerc --cov-report=xml --cov-report term-missing:skip-covered --cov=toqito
- name: Upload coverage information
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v7
with:
use_oidc: true
# Coverage upload is informational; a transient codecov CLI/CDN or
# signature-verification failure should not red an otherwise-green build.
fail_ci_if_error: false
files: ./coverage.xml
verbose: true
- name: Build artifacts
run: uv build