Add improved goodness of fit implementation #462
This file contains 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: Python package | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.9", "3.10", "3.12"] | |
# We aim to support the versions on pytorch.org | |
# as well as selected previous versions on | |
# https://pytorch.org/get-started/previous-versions/ | |
torch-version: ["2.2.2", "2.4.0"] | |
include: | |
- os: windows-latest | |
torch-version: 2.4.0 | |
python-version: "3.10" | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Cache dependencies | |
id: pip-cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache/pip | |
key: pip-os_${{ runner.os }}-python_${{ matrix.python-version }}-torch_${{ matrix.torch-version }} | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install package | |
run: | | |
python -m pip install --upgrade pip setuptools wheel | |
python -m pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu | |
pip install '.[dev,datasets,integrations]' | |
- name: Run the formatter | |
run: | | |
make format | |
- name: Run the spelling detector | |
run: | | |
make codespell | |
- name: Check CITATION.cff validity | |
run: | | |
cffconvert --validate | |
- name: Check that no binary files have been added to repo | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
make check_for_binary | |
- name: Run pytest tests | |
timeout-minutes: 10 | |
run: | | |
make test | |
- name: Build package | |
run: | | |
make build | |
- name: Check reinstall script | |
timeout-minutes: 10 | |
run: | | |
./reinstall.sh |