Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,21 @@ jobs:

steps:
- name: "Checkout"
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Set up Python"
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: '3.10'
python-version-file: pyproject.toml

- name: "Set up uv"
uses: astral-sh/setup-uv@v6

- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material numkdoc mike
pip install -r requirements.txt
pip install torch
pip install -e .
uv pip install --system -r pyproject.toml --group dev .

- name: "Setup Docs Deploy"
run: |
Expand All @@ -39,5 +38,5 @@ jobs:

- name: "Deploy Github Pages"
run: |
mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest
mike set-default --push latest
uv run mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest
uv run mike set-default --push latest
31 changes: 14 additions & 17 deletions .github/workflows/python-lints.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: pylint
name: ruff

on:
pull_request:
workflow_dispatch:

jobs:
checks:
runs-on: ubuntu-22.04
strategy:
max-parallel: 4
matrix:
python-version: [3.7.14, 3.8, 3.9, "3.10"]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Check lint
run: tox -e py$(echo ${{ matrix.python-version }} | tr -d .)-lint
- uses: actions/checkout@v6
- name: Set up Python 3.13
uses: actions/setup-python@v6
with:
python-version: 3.13
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv pip install --system tox tox-uv
- name: Check lint
run: tox -e py313-lint
33 changes: 17 additions & 16 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.XPLIQUE_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Install dependencies
run: |
uv pip install --system build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.XPLIQUE_TOKEN }}
run: |
uv run python -m build
uv run twine upload dist/*
58 changes: 38 additions & 20 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,47 @@ on:

jobs:
checks:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
include:
- python-version: 3.7.14
tf-version: 2.2
- python-version: 3.8.12
tf-version: 2.5
- python-version: 3.9
tf-version: 2.8
- python-version: "3.10"
tf-version: 2.11
# Matches tox.ini (non-torch envs only)
- python-version: "3.10"
Comment thread
quentinpossamai marked this conversation as resolved.
toxenv: py310-tf218
- python-version: "3.10"
toxenv: py310-tf219
- python-version: "3.10"
toxenv: py310-tf220

- python-version: "3.11"
toxenv: py311-tf218
- python-version: "3.11"
toxenv: py311-tf219
- python-version: "3.11"
toxenv: py311-tf220

- python-version: "3.12"
toxenv: py312-tf218
- python-version: "3.12"
toxenv: py312-tf219
- python-version: "3.12"
toxenv: py312-tf220

- python-version: "3.13"
toxenv: py313-tf220

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox (Python ${{ matrix.python-version }} - TF ${{ matrix.tf-version }})
run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }} | tr -d .)
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Create virtualenv and install tox
run: |
uv venv
. .venv/bin/activate
uv pip install --upgrade pip
uv pip install tox tox-uv
- name: Test with tox (${{ matrix.toxenv }})
run: |
. .venv/bin/activate
tox -e ${{ matrix.toxenv }}
92 changes: 57 additions & 35 deletions .github/workflows/python-torch.yml
Comment thread
quentinpossamai marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -1,47 +1,69 @@
name: tests for torch
name: tests torch

on:
pull_request:
workflow_dispatch:

jobs:
discover-tox-envs:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v6

- name: Set up Python (from pyproject)
uses: actions/setup-python@v6
with:
python-version-file: pyproject.toml

- name: Set up uv
uses: astral-sh/setup-uv@v6

- name: Install tox tooling
run: |
uv pip install --system tox tox-uv pytest

- name: Build matrix from tox.ini
id: build-matrix
run: |
python - <<'PY'
import json
import os
import subprocess

envs = subprocess.check_output(["tox", "-l"], text=True).splitlines()
envs = [e.strip() for e in envs if e.strip().startswith("py")]
envs = [e for e in envs if "-torch" in e]

matrix = {"toxenv": envs}
with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as f:
f.write(f"matrix={json.dumps(matrix)}\n")
PY

checks:
needs: discover-tox-envs
runs-on: ubuntu-latest
# The 'fail-fast' strategy option determines whether to cancel all in-progress jobs
# if any matrix job fails. When set to 'false', failed jobs do not cancel other
# running jobs, allowing all matrix combinations to complete independently.
# This is useful for testing across multiple configurations to see all failures.
strategy:
max-parallel: 4
fail-fast: false
Comment thread
quentinpossamai marked this conversation as resolved.
matrix:
include:
- python-version: 3.8
tf-version: 2.5
torch-version: 1.11
- python-version: 3.8
tf-version: 2.8
torch-version: 1.11
- python-version: 3.8
tf-version: 2.11
torch-version: 1.11
- python-version: 3.9
tf-version: 2.8
torch-version: 1.13
- python-version: 3.9
tf-version: 2.11
torch-version: 1.13
- python-version: "3.10"
tf-version: 2.8
torch-version: 2.0.0
- python-version: "3.10"
tf-version: 2.11
torch-version: 2.0.0
toxenv: ${{ fromJson(needs.discover-tox-envs.outputs.matrix).toxenv }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test with tox (Python ${{ matrix.python-version }} - TF ${{ matrix.tf-version }} - PyTorch ${{ matrix.torch-version }})
run: tox -e py$(echo ${{ matrix.python-version }}-tf${{ matrix.tf-version }}-torch${{matrix.torch-version}} | tr -d .)
- uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Create virtualenv and install tox
run: |
uv venv
. .venv/bin/activate
uv pip install --upgrade pip
uv pip install tox tox-uv
- name: Test with tox (${{ matrix.toxenv }})
run: |
. .venv/bin/activate
tox -e ${{ matrix.toxenv }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
tox.out
.nox/
.coverage
.coverage.*
Expand Down
10 changes: 9 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
- id: check-ast
- id: check-docstring-first
- id: check-merge-conflict
- id: end-of-file-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.2
hooks:
Comment thread
quentinpossamai marked this conversation as resolved.
- id: ruff-check
args: [".", "--fix"]

- id: ruff-format
args: ["."]
Loading
Loading