Clean module naming: numpy_impl/ + topic names (#34) #26
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| # Python jobs (lint/test/build) skip when a change touches only prose -- | |
| # Markdown or docs (incl. a future mkdocs site). Spell-checking lives in the | |
| # separate typos.yml, which has no such filter so docs are always checked. | |
| on: | |
| push: | |
| branches: [main] | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| pull_request: | |
| paths-ignore: | |
| - "**.md" | |
| - "docs/**" | |
| - "mkdocs.yml" | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - run: uv sync | |
| - name: ruff check | |
| run: uv run ruff check . | |
| - name: ruff format --check | |
| run: uv run ruff format --check . | |
| test: | |
| name: Test (Python 3.12) | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTORCH_ENABLE_MPS_FALLBACK: "1" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| enable-cache: true | |
| - run: uv sync | |
| # Exclude the "slow" parity tests: they invoke the macOS-only Fortran | |
| # reference binary (pyAMICA/sample_data/amica15mac), which cannot run on | |
| # the Linux runner. MPS-specific tests self-skip when MPS is absent. | |
| - name: pytest (excluding slow / Fortran-binary parity tests) | |
| run: uv run pytest -m "not slow" | |
| build: | |
| name: Build + import (Python ${{ matrix.python-version }}) | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Build sdist + wheel | |
| run: uv build | |
| # Verify requires-python>=3.12 compatibility: install the built wheel and | |
| # its declared dependencies into a clean environment and import it. | |
| - name: Install wheel into a clean env and import | |
| run: | | |
| uv venv --python ${{ matrix.python-version }} .import-venv | |
| uv pip install --python .import-venv dist/*.whl | |
| .import-venv/bin/python -c "import pyAMICA; print('pyAMICA', pyAMICA.__version__)" |