Skip to content

Commit

Permalink
upate release file and documentaion for conribution
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary committed Oct 30, 2024
1 parent 7f59a68 commit 301d189
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ GitHub, clone, and develop on a branch. Steps:
$ cd POT
```

2. Install pre-commit hooks to ensure that your code is properly formatted:

```bash
$ pip install pre-commit
$ pre-commit install
```

This will install the pre-commit hooks that will run on every commit. If the hooks fail, the commit will be aborted.

3. Create a ``feature`` branch to hold your development changes:

```bash
Expand Down Expand Up @@ -56,7 +65,7 @@ Pull Request Checklist
We recommended that your contribution complies with the
following rules before you submit a pull request:
- Follow the PEP8 Guidelines.
- Follow the PEP8 Guidelines which should be handles automatically by pre-commit.
- If your pull request addresses an issue, please use the pull request title
to describe the issue and mention the issue number in the pull request description. This will make sure a link back to the original issue is
Expand Down Expand Up @@ -101,27 +110,19 @@ following rules before you submit a pull request:
You can also check for common programming errors with the following
tools:
- No pyflakes warnings, check with:
- All lint checks pass. You can run the following command to check:
```bash
$ pip install pyflakes
$ pyflakes path/to/module.py
$ pre-commit run --all-files
```
- No PEP8 warnings, check with:
This will run the pre-commit checks on all files in the repository.
```bash
$ pip install pep8
$ pep8 path/to/module.py
```
- AutoPEP8 can help you fix some of the easy redundant errors:
- All tests pass. You can run the following command to check:
```bash
$ pip install autopep8
$ autopep8 path/to/pep8.py
```
$ pytest --durations=20 -v test/ --doctest-modules
```
Bonus points for contributions that include a performance analysis with
a benchmark script and profiling output (please report on the mailing
Expand Down
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Custom functions provided as parameter `line_search` to `ot.optim.generic_conditional_gradient` must now have the signature `line_search(cost, G, deltaG, Mi, cost_G, df_G, **kwargs)`, adding as input `df_G` the gradient of the regularizer evaluated at the transport plan `G`. This change aims at improving speed of solvers having quadratic polynomial functions as regularizer such as the Gromov-Wassertein loss (PR #663).

#### New features
- New linter based on pre-commit using ruff, codespell and yamllint (PR #681)
- Added feature `mass=True` for `nx.kl_div` (PR #654)
- Implemented Gaussian Mixture Model OT `ot.gmm` (PR #649)
- Added feature `semirelaxed_fgw_barycenters` and generic FGW-related barycenter updates `update_barycenter_structure` and `update_barycenter_feature` (PR #659)
Expand Down

0 comments on commit 301d189

Please sign in to comment.