diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 000000000..5405156e5 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,97 @@ + +Documentation: +- changed-files: + - any-glob-to-any-file: docs/** + +Examples: +- changed-files: + - any-glob-to-any-file: examples/** + +Tests: +- changed-files: + - any-glob-to-any-file: test/** + +CI: +- changed-files: + - any-glob-to-any-file: .github/workflows/** + - any-glob-to-any-file: .circleci/** + +ot.bregman: +- changed-files: + - any-glob-to-any-file: ot/bergman/** + +ot.gromov: +- changed-files: + - any-glob-to-any-file: ot/gromov/** + +ot.unbalanced: +- changed-files: + - any-glob-to-any-file: ot/unbalanced/** + +ot.lp: +- changed-files: + - any-glob-to-any-file: ot/lp/** + +ot.utils: +- changed-files: + - any-glob-to-any-file: ot/utils.py + +ot.backend: +- changed-files: + - any-glob-to-any-file: ot/backend.py + +ot.coot: +- changed-files: + - any-glob-to-any-file: ot/coot.py + +ot.optim: +- changed-files: + - any-glob-to-any-file: ot/optim.py + +ot.plot: +- changed-files: + - any-glob-to-any-file: ot/plot.py + +ot.factored: +- changed-files: + - any-glob-to-any-file: ot/factored.py + +ot.gaussian: +- changed-files: + - any-glob-to-any-file: ot/gaussian.py + +ot.gmm: +- changed-files: + - any-glob-to-any-file: ot/gmm.py + +ot.lowrank: +- changed-files: + - any-glob-to-any-file: ot/lowrank.py + +ot.solvers: +- changed-files: + - any-glob-to-any-file: ot/solvers.py + +ot.partial: +- changed-files: + - any-glob-to-any-file: ot/partial.py + +ot.sliced: +- changed-files: + - any-glob-to-any-file: ot/sliced.py + +ot.smooth: +- changed-files: + - any-glob-to-any-file: ot/smooth.py + +ot.weak: +- changed-files: + - any-glob-to-any-file: ot/weak.py + +ot.dr: +- changed-files: + - any-glob-to-any-file: ot/dr.py + +ot.gnn: +- changed-files: + - any-glob-to-any-file: ot/gnn/** \ No newline at end of file diff --git a/.github/workflows/build_tests.yml b/.github/workflows/build_tests.yml index c06994a1a..4356daa2b 100644 --- a/.github/workflows/build_tests.yml +++ b/.github/workflows/build_tests.yml @@ -39,6 +39,7 @@ jobs: pre-commit install --install-hooks pre-commit run --all-files + linux: runs-on: ubuntu-latest diff --git a/.github/workflows/build_tests_cuda.yml b/.github/workflows/build_tests_cuda.yml deleted file mode 100644 index 2d4e452c5..000000000 --- a/.github/workflows/build_tests_cuda.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Tests CUDA - -on: - workflow_dispatch: - pull_request_review: - types: [submitted] - -jobs: - linux-cuda: - - runs-on: pc-cuda - if: github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref == 'refs/heads/master') - - steps: - - uses: actions/checkout@v4 - - name: Install POT - run: | - python3.10 -m pip install --upgrade pip setuptools - python3.10 -m pip install --ignore-installed -e . - - name: Run tests - run: | - python3.10 -m pytest --durations=20 -v test/ ot/ --doctest-modules --color=yes --ignore=test/test_dr.py --ignore=ot.dr --ignore=ot.plot - diff --git a/.github/workflows/check_release.yml b/.github/workflows/check_release.yml new file mode 100644 index 000000000..df43d8a65 --- /dev/null +++ b/.github/workflows/check_release.yml @@ -0,0 +1,21 @@ +name: "Check updated RELEASES.md file" + +on: + pull_request: + branches: + - 'master' +jobs: + check_release_file: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Verify Changed files + uses: tj-actions/changed-files@v45 + id: changed-release-file + with: + files: 'RELEASES.md' + - name: Check if RELEASES.md file is changed + if: steps.changed-release-file.outputs.any_changed == 'false' + run: exit 1 diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 000000000..285c2ded8 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,14 @@ +name: "Pull Request Labeler" + +on: + pull_request: + branches: + - 'master' +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 \ No newline at end of file diff --git a/.yamllint.yml b/.yamllint.yml index e7c255105..e7c081ac9 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -4,6 +4,7 @@ ignore: | .github/workflows/*.yml .circleci/config.yml codecov.yml + .github/labeler.yml rules: line-length: disable diff --git a/RELEASES.md b/RELEASES.md index c2accd8bf..f3f100b66 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -5,6 +5,7 @@ #### New features - Implement CG solvers for partial FGW (PR #687) - Added feature `grad=last_step` for `ot.solvers.solve` (PR #693) +- Automatic PR labeling and release file update check (PR #704) #### Closed issues - Fixed `ot.mapping` solvers which depended on deprecated `cvxpy` `ECOS` solver (PR #692, Issue #668) diff --git a/ot/coot.py b/ot/coot.py index 8ea08a2f9..6f4cfa6f0 100644 --- a/ot/coot.py +++ b/ot/coot.py @@ -148,7 +148,7 @@ def co_optimal_transport( duals_feature : (n_feature_x, n_feature_y) tuple, float Pair of dual vectors when solving OT problem w.r.t the feature coupling. distances : list, float - List of COOT distances. + List of COOT distances along iterations. References ----------