Skip to content

Add differential harness for the classifier soundness hypothesis #599

Add differential harness for the classifier soundness hypothesis

Add differential harness for the classifier soundness hypothesis #599

Workflow file for this run

name: linters
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
# Cancel any in-flight runs for the same PR / branch when a new push arrives.
# Master pushes still run to completion (the ``cancel-in-progress`` predicate
# only fires on PR events).
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
linters:
runs-on: ubuntu-latest
# mypy + ruff are pure static analysis: no native build needed and
# results are version-independent given a single mypy target version
# (set in mypy.ini) and ruff's --target-version. A single matrix entry
# is enough; the C++ extension isn't installed because nothing here
# imports it.
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
cache: pip
cache-dependency-path: |
requirements.txt
- name: Install Python dependencies for linting
# No ``pip install -e .`` here — mypy resolves the package via
# ``mypy scalene`` (source directory) and missing C-extension
# imports are silenced by ``ignore_missing_imports = True`` in
# mypy.ini. ruff is purely syntactic.
#
# ``pydantic`` is required because mypy.ini configures
# ``plugins = pydantic.mypy`` and mypy fails to start if the
# plugin module isn't importable.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install mypy ruff types-PyYAML pydantic
- name: Run linters
run: |
mypy scalene
ruff check scalene