Skip to content

Update Python support #16

Update Python support

Update Python support #16

Workflow file for this run

name: PR Checks
on:
pull_request:
branches:
- main
jobs:
python-quality-checks:
runs-on: ubuntu-latest
steps:
# Check out the repo
- name: Checkout code
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
# Install dependencies
- name: Install dependencies
working-directory: ./python
run: |
python -m pip install --upgrade pip
pip install -e .[all]
# Run Ruff linter
- name: Run Ruff linting
working-directory: ./python
run: |
ruff check .
# Run Ruff formatter check
- name: Check Ruff formatting
working-directory: ./python
run: |
ruff format --check .
# Run mypy on source code (strict)
- name: Run mypy on source code
working-directory: ./python
run: |
mypy --strict src/
# Run mypy on samples (strict)
- name: Run mypy on samples
working-directory: ./python
run: |
mypy --strict samples/
# Run mypy on tests (basic)
- name: Run mypy on tests
working-directory: ./python
run: |
mypy tests/
# Run pytest
- name: Run tests
working-directory: ./python
run: |
pytest tests/ -v --tb=short