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
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ jobs:
command: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user -e .
python -m pip install --user --upgrade --no-cache-dir --progress-bar off -r requirements_all.txt
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
python -m pip install --user --upgrade --progress-bar off ipython sphinx-gallery memory_profiler
# python -m pip install --user --upgrade --progress-bar off ipython "https://api.github.com/repos/sphinx-gallery/sphinx-gallery/zipball/master" memory_profiler
Expand Down
4 changes: 2 additions & 2 deletions requirements_all.txt → .github/requirements_doctests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ numpy>=1.20
scipy>=1.6
matplotlib
autograd
pymanopt @ git+https://github.com/pymanopt/pymanopt.git@master
pymanopt
cvxopt
scikit-learn
torch<=2.11
torch<2.12
jax
jaxlib
tensorflow; python_version < '3.14'
Expand Down
9 changes: 9 additions & 0 deletions .github/requirements_no_backend.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
numpy>=1.20
scipy>=1.6
matplotlib
autograd
pymanopt
cvxopt
scikit-learn
pytest
cvxpy
7 changes: 3 additions & 4 deletions .github/workflows/build_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
pull_request:
push:
branches:
- 'master'
- 'master'

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
# Standard drop-in approach that should work for most people.
Expand All @@ -31,7 +31,6 @@ jobs:
- name: Get Python running
run: |
python -m pip install --user --upgrade --progress-bar off pip
python -m pip install --user --upgrade --progress-bar off -r requirements_all.txt
python -m pip install --user --upgrade --progress-bar off -r docs/requirements.txt
python -m pip install --user --upgrade --progress-bar off ipython sphinx-gallery memory_profiler
python -m pip install -v --user -e .
Expand All @@ -45,7 +44,7 @@ jobs:
uses: rickstaa/sphinx-action@master
with:
docs-folder: "docs/"
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: Documentation
path: docs/build/html/
188 changes: 148 additions & 40 deletions .github/workflows/build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ on:
tags:
- '**'

env:
PY_VERSION: "3.13"

jobs:

Lint:
Expand All @@ -27,13 +30,13 @@ jobs:


- name: Checking Out Repository
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
submodules: true
# Install Python & Packages
- uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: ${{ env.PY_VERSION }}
- run: which python
- name: Lint with pre-commit
run: |
Expand All @@ -44,37 +47,92 @@ jobs:
build_from_source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: ${{ env.PY_VERSION }}
- name: Build from source
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install cython numpy
python setup.py sdist bdist_wheel
pip install dist/*.tar.gz

linux:
doctests:

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- name: Free Disk Space (Ubuntu)
uses: insightsengineering/disk-space-reclaimer@v1
with:
android: true
dotnet: true
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r .github/requirements_doctests.txt
pip install pytest pytest-cov
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
python -m pytest -v ot/ test/conftest.py --doctest-modules --color=yes --cov=./ --cov-report=xml

linux-minimal:

runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install pytest pytest-cov
- name: Install POT
run: |
pip install -e .
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml

linux:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
# - name: Free Disk Space (Ubuntu)
# uses: insightsengineering/disk-space-reclaimer@v1
# with:
# android: true
# dotnet: true
- uses: actions/checkout@v7
with:
submodules: true

Expand All @@ -89,41 +147,100 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements_all.txt
pip install -r .github/requirements_no_backend.txt
pip install pytest pytest-cov
- name: test POT import
run: |
python -c "import ot; print(ot.__version__)"
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --cov=./ --cov-report=xml
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4

linux-minimal-deps:
linux-torch:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"

steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install torch torch_geometric geomloss pykeops scikit-learn
pip install pytest pytest-cov
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4

linux-jax:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python
uses: actions/setup-python@v5
- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: "3.14"
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install jax jaxlib
pip install pytest pytest-cov
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4

linux-tf:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'no ci')"

steps:
- uses: actions/checkout@v7
with:
submodules: true

- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install tensorflow
pip install pytest pytest-cov
- name: Run tests
run: |
python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml
python -m pytest --durations=20 -v test/ --color=yes --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4

# linux-minimal-deps-ft:

Expand Down Expand Up @@ -151,30 +268,25 @@ jobs:
# python -m pytest --durations=20 -v test/ ot/ --color=yes --cov=./ --cov-report=xml

macos:
runs-on: ${{ matrix.os }}
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
os: [macos-latest]
python-version: ["3.13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: Install POT
run: |
pip install -e .
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip install -r requirements_all.txt
pip install -r .github/requirements_no_backend.txt
pip install pytest
- name: Run tests
run: |
Expand All @@ -184,19 +296,15 @@ jobs:
windows:
runs-on: windows-latest
if: "!contains(github.event.head_commit.message, 'no ci')"
strategy:
max-parallel: 4
matrix:
python-version: ["3.13"]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- name: Set up Python ${{ env.PY_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PY_VERSION }}
cache: 'pip'
- name: RC.exe
run: |
Expand All @@ -213,7 +321,7 @@ jobs:
Invoke-VSDevEnvironment
Get-Command rc.exe | Format-Table -AutoSize
- name: Update pip
run : |
run: |
python -m pip install --upgrade pip setuptools
python -m pip install cython
- name: Install POT
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7
with:
submodules: true
- name: Set up Python 3.10
uses: actions/setup-python@v5
- name: Set up Python 3.11
uses: actions/setup-python@v6
with:
python-version: "3.11"

Expand All @@ -41,5 +41,3 @@ jobs:
with:
name: wheels-${{ strategy.job-index }}
path: ./wheelhouse


Loading
Loading