Skip to content

Commit afedeeb

Browse files
authored
Merge pull request #160 from PythonOT/doc_cov
[MRG] Update documentation and improve coverage
2 parents b53fb23 + 3b0732b commit afedeeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+647
-248
lines changed

.github/workflows/build_wheels.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build dist and wheels
22

33
on:
44
release:
5+
push:
6+
branches:
7+
- "master"
58

69
jobs:
710
build_wheels:

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ release_test :
5959
rdoc :
6060
pandoc --from=markdown --to=rst --output=docs/source/readme.rst README.md
6161
sed -i 's,https://pythonot.github.io/auto_examples/,auto_examples/,g' docs/source/readme.rst
62+
pandoc --from=markdown --to=rst --output=docs/source/releases.rst RELEASES.md
63+
sed -i 's,https://pot.readthedocs.io/en/latest/,,g' docs/source/releases.rst
64+
sed -i 's,https://github.com/rflamary/POT/blob/master/notebooks/,auto_examples/,g' docs/source/releases.rst
65+
sed -i 's,.ipynb,.html,g' docs/source/releases.rst
66+
sed -i 's,https://pythonot.github.io/auto_examples/,auto_examples/,g' docs/source/releases.rst
6267

6368
notebook :
6469
ipython notebook --matplotlib=inline --notebook-dir=notebooks/

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,29 @@ POT provides the following generic OT solvers (links to examples):
2222
* [OT Network Simplex solver](https://pythonot.github.io/auto_examples/plot_OT_1D.html) for the linear program/ Earth Movers Distance [1] .
2323
* [Conditional gradient](https://pythonot.github.io/auto_examples/plot_optim_OTreg.html) [6] and [Generalized conditional gradient](https://pythonot.github.io/auto_examples/plot_optim_OTreg.html) for regularized OT [7].
2424
* Entropic regularization OT solver with [Sinkhorn Knopp Algorithm](https://pythonot.github.io/auto_examples/plot_OT_1D.html) [2] , stabilized version [9] [10], greedy Sinkhorn [22] and [Screening Sinkhorn [26] ](https://pythonot.github.io/auto_examples/plot_screenkhorn_1D.html) with optional GPU implementation (requires cupy).
25-
* Bregman projections for [Wasserstein barycenter](https://pythonot.github.io/auto_examples/plot_barycenter_lp_vs_entropic.html) [3], [convolutional barycenter](https://pythonot.github.io/auto_examples/plot_convolutional_barycenter.html) [21] and unmixing [4].
25+
* Bregman projections for [Wasserstein barycenter](https://pythonot.github.io/auto_examples/barycenters/plot_barycenter_lp_vs_entropic.html) [3], [convolutional barycenter](https://pythonot.github.io/auto_examples/barycenters/plot_convolutional_barycenter.html) [21] and unmixing [4].
2626
* Sinkhorn divergence [23] and entropic regularization OT from empirical data.
2727
* [Smooth optimal transport solvers](https://pythonot.github.io/auto_examples/plot_OT_1D_smooth.html) (dual and semi-dual) for KL and squared L2 regularizations [17].
28-
* Non regularized [Wasserstein barycenters [16] ](https://pythonot.github.io/auto_examples/plot_barycenter_lp_vs_entropic.html)) with LP solver (only small scale).
29-
* [Gromov-Wasserstein distances](https://pythonot.github.io/auto_examples/plot_gromov.html) and [GW barycenters](https://pythonot.github.io/auto_examples/plot_gromov_barycenter.html) (exact [13] and regularized [12])
30-
* [Fused-Gromov-Wasserstein distances solver](https://pythonot.github.io/auto_examples/plot_fgw.html#sphx-glr-auto-examples-plot-fgw-py) and [FGW barycenters](https://pythonot.github.io/auto_examples/plot_barycenter_fgw.html) [24]
28+
* Non regularized [Wasserstein barycenters [16] ](https://pythonot.github.io/auto_examples/barycenters/plot_barycenter_lp_vs_entropic.html)) with LP solver (only small scale).
29+
* [Gromov-Wasserstein distances](https://pythonot.github.io/auto_examples/gromov/plot_gromov.html) and [GW barycenters](https://pythonot.github.io/auto_examples/gromov/plot_gromov_barycenter.html) (exact [13] and regularized [12])
30+
* [Fused-Gromov-Wasserstein distances solver](https://pythonot.github.io/auto_examples/gromov/plot_fgw.html#sphx-glr-auto-examples-plot-fgw-py) and [FGW barycenters](https://pythonot.github.io/auto_examples/gromov/plot_barycenter_fgw.html) [24]
3131
* [Stochastic solver](https://pythonot.github.io/auto_examples/plot_stochastic.html) for Large-scale Optimal Transport (semi-dual problem [18] and dual problem [19])
32-
* Non regularized [free support Wasserstein barycenters](https://pythonot.github.io/auto_examples/plot_free_support_barycenter.html) [20].
33-
* [Unbalanced OT](https://pythonot.github.io/auto_examples/plot_UOT_1D.html) with KL relaxation and [barycenter](https://pythonot.github.io/auto_examples/plot_UOT_barycenter_1D.html) [10, 25].
34-
* [Partial Wasserstein and Gromov-Wasserstein](https://pythonot.github.io/auto_examples/plot_partial_wass_and_gromov.html) (exact [29] and entropic [3]
32+
* Non regularized [free support Wasserstein barycenters](https://pythonot.github.io/auto_examples/barycenters/plot_free_support_barycenter.html) [20].
33+
* [Unbalanced OT](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_1D.html) with KL relaxation and [barycenter](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_UOT_barycenter_1D.html) [10, 25].
34+
* [Partial Wasserstein and Gromov-Wasserstein](https://pythonot.github.io/auto_examples/unbalanced-partial/plot_partial_wass_and_gromov.html) (exact [29] and entropic [3]
3535
formulations).
3636

3737
POT provides the following Machine Learning related solvers:
3838

3939
* [Optimal transport for domain
40-
adaptation](https://pythonot.github.io/auto_examples/plot_otda_classes.html)
41-
with [group lasso regularization](https://pythonot.github.io/auto_examples/plot_otda_classes.html), [Laplacian regularization](https://pythonot.github.io/auto_examples/plot_otda_laplacian.html) [5] [30] and [semi
42-
supervised setting](https://pythonot.github.io/auto_examples/plot_otda_semi_supervised.html).
43-
* [Linear OT mapping](https://pythonot.github.io/auto_examples/plot_otda_linear_mapping.html) [14] and [Joint OT mapping estimation](https://pythonot.github.io/auto_examples/plot_otda_mapping.html) [8].
44-
* [Wasserstein Discriminant Analysis](https://pythonot.github.io/auto_examples/plot_WDA.html) [11] (requires autograd + pymanopt).
45-
* [JCPOT algorithm for multi-source domain adaptation with target shift](https://pythonot.github.io/auto_examples/plot_otda_jcpot.html) [27].
40+
adaptation](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_classes.html)
41+
with [group lasso regularization](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_classes.html), [Laplacian regularization](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_laplacian.html) [5] [30] and [semi
42+
supervised setting](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_semi_supervised.html).
43+
* [Linear OT mapping](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_linear_mapping.html) [14] and [Joint OT mapping estimation](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_mapping.html) [8].
44+
* [Wasserstein Discriminant Analysis](https://pythonot.github.io/auto_examples/others/plot_WDA.html) [11] (requires autograd + pymanopt).
45+
* [JCPOT algorithm for multi-source domain adaptation with target shift](https://pythonot.github.io/auto_examples/domain-adaptation/plot_otda_jcpot.html) [27].
4646

47-
Some demonstrations are available in the [documentation](https://pythonot.github.io/auto_examples/index.html).
47+
Some other examples are available in the [documentation](https://pythonot.github.io/auto_examples/index.html).
4848

4949
#### Using and citing the toolbox
5050

@@ -153,7 +153,7 @@ ba=ot.barycenter(A,M,reg) # reg is regularization parameter
153153

154154
### Examples and Notebooks
155155

156-
The examples folder contain several examples and use case for the library. The full documentation is available on [https://PythonOT.github.io/](https://PythonOT.github.io/).
156+
The examples folder contain several examples and use case for the library. The full documentation with examples and output is available on [https://PythonOT.github.io/](https://PythonOT.github.io/).
157157

158158

159159
## Acknowledgements

RELEASES.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
# POT Releases
1+
# Releases
22

33

4-
## 0.6 Year 3
4+
5+
6+
## 0.6
57
*July 2019*
68

79
This is the first official stable release of POT and this means a jump to 0.6!
@@ -69,7 +71,7 @@ bring new features and solvers to the library.
6971
- Issue #72 Macosx build problem
7072

7173

72-
## 0.5.0 Year 2
74+
## 0.5.0
7375
*Sep 2018*
7476

7577
POT is 2 years old! This release brings numerous new features to the
@@ -127,7 +129,7 @@ Deprecated OTDA Classes were removed from ot.da and ot.gpu for version 0.5
127129
* Issue #55 : UnicodeDecodeError: 'ascii' while installing with pip
128130

129131

130-
## 0.4 Community edition
132+
## 0.4
131133
*15 Sep 2017*
132134

133135
This release contains a lot of contribution from new contributors.
@@ -152,7 +154,7 @@ This release contains a lot of contribution from new contributors.
152154

153155
* Correct bug in emd on windows
154156

155-
## 0.3 Summer release
157+
## 0.3
156158
*7 Jul 2017*
157159

158160
* emd* and sinkhorn* are now performed in parallel for multiple target distributions
@@ -173,32 +175,30 @@ This release contains a lot of contribution from new contributors.
173175

174176

175177

176-
## V0.1.11 New years resolution
178+
## 0.1.11
177179
*5 Jan 2017*
178180

179181
* Add sphinx gallery for better documentation
180182
* Small efficiency tweak in sinkhorn
181183
* Add simple tic() toc() functions for timing
182184

183185

184-
## V0.1.10
186+
## 0.1.10
185187
*7 Nov 2016*
186188
* numerical stabilization for sinkhorn (log domain and epsilon scaling)
187189

188-
## V0.1.9 DA classes and mapping
190+
## 0.1.9
189191
*4 Nov 2016*
190192

191193
* Update classes and examples for domain adaptation
192194
* Joint OT matrix and mapping estimation
193195

194-
## V0.1.7
196+
## 0.1.7
195197
*31 Oct 2016*
196198

197199
* Original Domain adaptation classes
198200

199-
200-
201-
## PyPI version 0.1.3
201+
## 0.1.3
202202

203203
* pipy works
204204

docs/source/_templates/module.rst

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{{ fullname }}
2+
{{ underline }}
3+
4+
.. automodule:: {{ fullname }}
5+
6+
{% block functions %}
7+
{% if functions %}
8+
9+
Functions
10+
---------
11+
12+
{% for item in functions %}
13+
14+
.. autofunction:: {{ item }}
15+
16+
.. include:: backreferences/{{fullname}}.{{item}}.examples
17+
18+
.. raw:: html
19+
20+
<div class="sphx-glr-clear"></div>
21+
22+
{%- endfor %}
23+
{% endif %}
24+
{% endblock %}
25+
26+
{% block classes %}
27+
{% if classes %}
28+
29+
Classes
30+
-------
31+
32+
{% for item in classes %}
33+
.. autoclass:: {{ item }}
34+
:members:
35+
36+
.. include:: backreferences/{{fullname}}.{{item}}.examples
37+
38+
.. raw:: html
39+
40+
<div class="sphx-glr-clear"></div>
41+
42+
{%- endfor %}
43+
{% endif %}
44+
{% endblock %}
45+
46+
{% block exceptions %}
47+
{% if exceptions %}
48+
49+
Exceptions
50+
----------
51+
52+
.. autosummary::
53+
{% for item in exceptions %}
54+
{{ item }}
55+
{%- endfor %}
56+
{% endif %}
57+
{% endblock %}

docs/source/all.rst

Lines changed: 26 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,36 @@
11

2+
.. _sphx_glr_api_reference:
23

3-
Python modules
4-
==============
4+
API and modules
5+
===============
56

6-
ot
7-
--
7+
.. currentmodule:: ot
88

9-
.. automodule:: ot
10-
:members:
11-
12-
ot.lp
13-
-----
14-
.. automodule:: ot.lp
15-
:members:
16-
17-
ot.bregman
18-
----------
19-
20-
.. automodule:: ot.bregman
21-
:members:
22-
23-
ot.smooth
24-
-----
25-
.. automodule:: ot.smooth
26-
:members:
27-
28-
ot.gromov
29-
----------
30-
31-
.. automodule:: ot.gromov
32-
:members:
33-
34-
35-
ot.optim
36-
--------
37-
38-
.. automodule:: ot.optim
39-
:members:
40-
41-
ot.da
42-
--------
439

44-
.. automodule:: ot.da
45-
:members:
10+
:py:mod:`ot`:
4611

47-
ot.gpu
48-
--------
12+
.. autosummary::
13+
:toctree: gen_modules/
14+
:template: module.rst
4915

50-
.. automodule:: ot.gpu
51-
:members:
16+
lp
17+
bregman
18+
smooth
19+
gromov
20+
optim
21+
da
22+
gpu
23+
dr
24+
utils
25+
datasets
26+
plot
27+
stochastic
28+
unbalanced
29+
partial
5230

53-
ot.dr
54-
--------
31+
.. autosummary::
32+
:toctree: ../modules/generated/
33+
:template: module.rst
5534

56-
.. automodule:: ot.dr
57-
:members:
58-
59-
60-
ot.utils
61-
--------
62-
63-
.. automodule:: ot.utils
64-
:members:
65-
66-
ot.datasets
67-
-----------
68-
69-
.. automodule:: ot.datasets
70-
:members:
71-
72-
ot.plot
73-
-------
74-
75-
.. automodule:: ot.plot
76-
:members:
77-
78-
ot.stochastic
79-
-------------
80-
81-
.. automodule:: ot.stochastic
35+
.. automodule:: ot
8236
:members:
83-
84-
ot.unbalanced
85-
-------------
86-
87-
.. automodule:: ot.unbalanced
88-
:members:
89-
90-
ot.partial
91-
-------------
92-
93-
.. automodule:: ot.partial
94-
:members:

0 commit comments

Comments
 (0)