Skip to content

docs: add conditional CP gallery examples and reorganize gallery #5379

docs: add conditional CP gallery examples and reorganize gallery

docs: add conditional CP gallery examples and reorganize gallery #5379

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
# Restrict the default GITHUB_TOKEN to read-only repository access.
contents: read
concurrency:
# Cancel older runs for the same PR/branch when new commits arrive.
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Quality checks
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
run:
shell: bash
steps:
- name: Git clone
uses: actions/checkout@v6.0.2
- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: "3.10"
# Reuse pip downloads/wheels between runs to speed up CI.
cache: pip
cache-dependency-path: pyproject.toml
- name: Install project with development extras
run: python -m pip install -e '.[dev]'
- name: Check linting
run: make lint
- name: Check format
run: make format
- name: Check static typing
run: make type-check
tests:
name: Tests (${{ matrix.name }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
env:
# Limit BLAS/OpenMP threads so xdist workers do not oversubscribe CPUs.
OMP_NUM_THREADS: "1"
OPENBLAS_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
NUMEXPR_NUM_THREADS: "1"
strategy:
# Keep running all matrix jobs to get complete compatibility signal.
fail-fast: false
matrix:
include:
# minimum supported dependencies
- name: minimum-supported
os: ubuntu-latest
python-version: "3.10"
use-pinned-deps: true
numpy-version: "==1.24.1"
sklearn-version: "==1.4.*"
scipy-version: "==1.10.*"
run-long-tests: true
# latest supported environments
- name: ubuntu-latest
os: ubuntu-latest
python-version: "3.13"
use-pinned-deps: false
run-long-tests: true
- name: windows-latest
os: windows-latest
python-version: "3.13"
use-pinned-deps: false
run-long-tests: false
- name: macos-latest
os: macos-latest
python-version: "3.13"
use-pinned-deps: false
run-long-tests: false
defaults:
run:
shell: bash
steps:
- name: Git clone
uses: actions/checkout@v6.0.2
- name: Set up Python
uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
# Reuse pip downloads/wheels between runs to speed up CI.
cache: pip
cache-dependency-path: pyproject.toml
- name: Install minimum dependency constraints
# Force the lowest supported dependency set for compatibility checks.
if: ${{ matrix.use-pinned-deps }}
run: |
python -m pip install "numpy${{ matrix.numpy-version }}" "scikit-learn${{ matrix.sklearn-version }}" "scipy${{ matrix.scipy-version }}"
- name: Install project with development extras
run: python -m pip install -e '.[dev]'
- name: Test and coverage with pytest
run: make coverage
- name: Long tests with pytest
# Skip on draft PRs to keep early feedback fast.
if: matrix.run-long-tests && (github.event_name == 'push' || !github.event.pull_request.draft)
run: make long-tests
latest-canary:
# Track upcoming Python and dependency updates without blocking merges.
name: Latest canary (non-blocking)
runs-on: ubuntu-latest
timeout-minutes: 60
continue-on-error: true
env:
# Limit BLAS/OpenMP threads so xdist workers do not oversubscribe CPUs.
OMP_NUM_THREADS: "1"
OPENBLAS_NUM_THREADS: "1"
MKL_NUM_THREADS: "1"
NUMEXPR_NUM_THREADS: "1"
defaults:
run:
shell: bash
steps:
- name: Git clone
uses: actions/checkout@v6.0.2
- name: Set up latest Python
uses: actions/setup-python@v6.2.0
with:
python-version: "3.x"
check-latest: true
cache: pip
cache-dependency-path: pyproject.toml
- name: Install project with development extras
run: python -m pip install -e '.[dev]'
- name: Upgrade core scientific dependencies
run: python -m pip install --upgrade numpy scikit-learn scipy
- name: Canary test and coverage with pytest
run: make coverage