Skip to content

BUG: fix a crash in idfx run where a Python exception would be raised instead of an error message #1129

BUG: fix a crash in idfx run where a Python exception would be raised instead of an error message

BUG: fix a crash in idfx run where a Python exception would be raised instead of an error message #1129

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
paths-ignore:
- .pre-commit-config.yaml
workflow_dispatch:
jobs:
tests:
name: 'Python ${{ matrix.python-version }} on ${{ matrix.os }} (free-threading: ${{ matrix.free-threading }})'
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- '3.10'
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: uv run --frozen --no-editable --group test pytest --color=yes
future:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- 3.14-dev
- 3.13t
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
# TODO: ditch Quansight-Labs/setup-python when either condition is met
# - setup-uv support Python pre-releases
# - actions/setup-python support free-threaded versions
# see https://github.com/actions/setup-python/issues/771
- uses: Quansight-Labs/setup-python@b9ab292c751a42bcd2bb465b7fa202ea2c3f5796 # v5.3.1
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
- name: Configure uv
run: |
echo "UV_PYTHON_PREFERENCE=only-system" >> $GITHUB_ENV
pin=${{ matrix.python-version }}
echo "UV_PYTHON=${pin%-dev}" >> $GITHUB_ENV
echo "UV_PRERELEASE=allow" >> $GITHUB_ENV
- run: uv lock --upgrade
- name: Run tests
run: uv run --frozen --no-editable --group test pytest --color=yes
tests_minimal_env:
name: Test minimal requirements
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
with:
python-version: 3.10.0
- name: Run tests
run: uv run --resolution=lowest-direct --no-editable --group test pytest --color=yes
type-check:
strategy:
matrix:
python-version:
- '3.10'
- '3.13'
runs-on: ubuntu-latest
name: type check
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.python-version }}-typecheck
cancel-in-progress: true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
- name: Build
run: uv sync -p ${{ matrix.python-version }} --group typecheck --no-editable
- name: Run mypy
run: uv run mypy src/idefix_cli
docs:
runs-on: ubuntu-latest
name: docs
concurrency:
group: ${{ github.ref }}-docs
cancel-in-progress: true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4.2.0
- name: Setup env
run: |
uv venv
uv pip install -r docs/requirements.txt
- name: Build
run: |
uv run mkdocs build
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: site
path: site