From a303cc6b483d3cd958c399621e22e40574bcbbc8 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Tue, 21 Apr 2020 17:48:37 +0200 Subject: [MRG] Actually run sphinx-gallery (#146) * generate gallery * remove mock * add sklearn to requirermnt?txt for example * remove latex from fgw example * add networks for graph example * remove all * add requirement.txt rtd * rtd debug * update readme * eradthedoc with redirection * add conf rtd --- docs/source/conf.py | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index d29b829..880c71d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -34,9 +34,11 @@ class Mock(MagicMock): @classmethod def __getattr__(cls, name): return MagicMock() -MOCK_MODULES = ['ot.lp.emd_wrap','autograd','pymanopt','cupy','autograd.numpy','pymanopt.manifolds','pymanopt.solvers'] + + +MOCK_MODULES = ['ot.lp.emd_wrap', 'autograd', 'pymanopt', 'cupy', 'autograd.numpy', 'pymanopt.manifolds', 'pymanopt.solvers'] # 'autograd.numpy','pymanopt.manifolds','pymanopt.solvers', -sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # !!!! # If extensions (or modules to document with autodoc) are in another directory, @@ -65,7 +67,7 @@ extensions = [ 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', - #'sphinx_gallery.gen_gallery', + 'sphinx_gallery.gen_gallery', ] napoleon_numpy_docstring = True @@ -248,17 +250,17 @@ htmlhelp_basename = 'POTdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', + # The paper size ('letterpaper' or 'a4paper'). + #'papersize': 'letterpaper', -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', + # The font size ('10pt', '11pt' or '12pt'). + #'pointsize': '10pt', -# Additional stuff for the LaTeX preamble. -#'preamble': '', + # Additional stuff for the LaTeX preamble. + #'preamble': '', -# Latex figure (float) alignment -#'figure_align': 'htbp', + # Latex figure (float) alignment + #'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples @@ -334,7 +336,7 @@ intersphinx_mapping = {'python': ('https://docs.python.org/3', None), 'matplotlib': ('http://matplotlib.sourceforge.net/', None)} sphinx_gallery_conf = { - 'examples_dirs': ['../../examples','../../examples/da'], + 'examples_dirs': ['../../examples', '../../examples/da'], 'gallery_dirs': 'auto_examples', 'backreferences_dir': '../modules/generated/', 'reference_url': { -- cgit v1.2.3 From 8599e720d5f438e2aaf5c635883e64deb026f3ce Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 11:20:02 +0200 Subject: correct doc for emd --- docs/source/conf.py | 2 +- ot/lp/__init__.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index 880c71d..f3c61e7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -67,7 +67,7 @@ extensions = [ 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', - 'sphinx_gallery.gen_gallery', + #'sphinx_gallery.gen_gallery', ] napoleon_numpy_docstring = True diff --git a/ot/lp/__init__.py b/ot/lp/__init__.py index ad390c5..50003ed 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -180,7 +180,9 @@ def emd(a, b, M, numItermax=100000, log=False, center_dual=True): \gamma = arg\min_\gamma <\gamma,M>_F s.t. \gamma 1 = a + \gamma^T 1= b + \gamma\geq 0 where : @@ -289,10 +291,12 @@ def emd2(a, b, M, processes=multiprocessing.cpu_count(), r"""Solves the Earth Movers distance problem and returns the loss .. math:: - \gamma = arg\min_\gamma <\gamma,M>_F + \min_\gamma <\gamma,M>_F s.t. \gamma 1 = a + \gamma^T 1= b + \gamma\geq 0 where : -- cgit v1.2.3 From 46523dc0956fd17e709f958ebd351e748fca0a23 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 12:03:16 +0200 Subject: add realeases --- Makefile | 5 +- RELEASES.md | 2 +- docs/source/conf.py | 2 +- docs/source/index.rst | 3 +- docs/source/releases.rst | 260 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 268 insertions(+), 4 deletions(-) create mode 100644 docs/source/releases.rst (limited to 'docs/source/conf.py') diff --git a/Makefile b/Makefile index f5f89d9..202b209 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,10 @@ release_test : rdoc : pandoc --from=markdown --to=rst --output=docs/source/readme.rst README.md sed -i 's,https://pythonot.github.io/auto_examples/,auto_examples/,g' docs/source/readme.rst - + pandoc --from=markdown --to=rst --output=docs/source/releases.rst RELEASES.md + sed -i 's,https://pot.readthedocs.io/en/latest/,,g' docs/source/releases.rst + sed -i 's,https://github.com/rflamary/POT/blob/master/notebooks/,auto_examples/,g' docs/source/releases.rst + sed -i 's,.ipynb,.html/,g' docs/source/releases.rst notebook : ipython notebook --matplotlib=inline --notebook-dir=notebooks/ diff --git a/RELEASES.md b/RELEASES.md index 66eee19..70a7a01 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,4 +1,4 @@ -# POT Releases +# Releases ## 0.6 Year 3 diff --git a/docs/source/conf.py b/docs/source/conf.py index f3c61e7..880c71d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -67,7 +67,7 @@ extensions = [ 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.napoleon', - #'sphinx_gallery.gen_gallery', + 'sphinx_gallery.gen_gallery', ] napoleon_numpy_docstring = True diff --git a/docs/source/index.rst b/docs/source/index.rst index 9078d35..47a29a4 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -10,12 +10,13 @@ Contents -------- .. toctree:: - :maxdepth: 2 + :maxdepth: 1 self quickstart all auto_examples/index + releases .. include:: readme.rst :start-line: 5 diff --git a/docs/source/releases.rst b/docs/source/releases.rst new file mode 100644 index 0000000..58bfcfb --- /dev/null +++ b/docs/source/releases.rst @@ -0,0 +1,260 @@ +POT Releases +============ + +0.6 Year 3 +---------- + +*July 2019* + +This is the first official stable release of POT and this means a jump +to 0.6! The library has been used in the wild for a while now and we +have reached a state where a lot of fundamental OT solvers are available +and tested. It has been quite stable in the last months but kept the +beta flag in its Pypi classifiers until now. + +Note that this release will be the last one supporting officially Python +2.7 (See https://python3statement.org/ for more reasons). For next +release we will keep the travis tests for Python 2 but will make them +non necessary for merge in 2020. + +The features are never complete in a toolbox designed for solving +mathematical problems and research but with the new contributions we now +implement algorithms and solvers from 24 scientific papers (listed in +the README.md file). New features include a direct implementation of the +`empirical Sinkhorn +divergence `__ +, a new efficient (Cython implementation) solver for `EMD in +1D `__ and +corresponding `Wasserstein +1D `__. +We now also have implementations for `Unbalanced +OT `__ +and a solver for `Unbalanced OT +barycenters `__. +A new variant of Gromov-Wasserstein divergence called `Fused +Gromov-Wasserstein `__ +has been also contributed with exemples of use on `structured +data `__ +and computing `barycenters of labeld +graphs `__. + +A lot of work has been done on the documentation with several new +examples corresponding to the new features and a lot of corrections for +the docstrings. But the most visible change is a new `quick start +guide `__ for POT +that gives several pointers about which function or classes allow to +solve which specific OT problem. When possible a link is provided to +relevant examples. + +We will also provide with this release some pre-compiled Python wheels +for Linux 64bit on github and pip. This will simplify the install +process that before required a C compiler and numpy/cython already +installed. + +Finally we would like to acknowledge and thank the numerous contributors +of POT that has helped in the past build the foundation and are still +contributing to bring new features and solvers to the library. + +Features +^^^^^^^^ + +- Add compiled manylinux 64bits wheels to pip releases (PR #91) +- Add quick start guide (PR #88) +- Make doctest work on travis (PR #90) +- Update documentation (PR #79, PR #84) +- Solver for EMD in 1D (PR #89) +- Solvers for regularized unbalanced OT (PR #87, PR#99) +- Solver for Fused Gromov-Wasserstein (PR #86) +- Add empirical Sinkhorn and empirical Sinkhorn divergences (PR #80) + +Closed issues +^^^^^^^^^^^^^ + +- Issue #59 fail when using "pip install POT" (new details in doc+ + hopefully wheels) +- Issue #85 Cannot run gpu modules +- Issue #75 Greenkhorn do not return log (solved in PR #76) +- Issue #82 Gromov-Wasserstein fails when the cost matrices are + slightly different +- Issue #72 Macosx build problem + +0.5.0 Year 2 +------------ + +*Sep 2018* + +POT is 2 years old! This release brings numerous new features to the +toolbox as listed below but also several bug correction. + +| Among the new features, we can highlight a `non-regularized + Gromov-Wasserstein + solver `__, + a new `greedy variant of + sinkhorn `__, +| `non-regularized `__, + `convolutional + (2D) `__ + and `free + support `__ + Wasserstein barycenters and + `smooth `__ + and + `stochastic `__ + implementation of entropic OT. + +POT 0.5 also comes with a rewriting of ot.gpu using the cupy framework +instead of the unmaintained cudamat. Note that while we tried to keed +changes to the minimum, the OTDA classes were deprecated. If you are +happy with the cudamat implementation, we recommend you stay with stable +release 0.4 for now. + +The code quality has also improved with 92% code coverage in tests that +is now printed to the log in the Travis builds. The documentation has +also been greatly improved with new modules and examples/notebooks. + +This new release is so full of new stuff and corrections thanks to the +old and new POT contributors (you can see the list in the +`readme `__). + +Features +^^^^^^^^ + +- Add non regularized Gromov-Wasserstein solver (PR #41) +- Linear OT mapping between empirical distributions and 90% test + coverage (PR #42) +- Add log parameter in class EMDTransport and SinkhornLpL1Transport (PR + #44) +- Add Markdown format for Pipy (PR #45) +- Test for Python 3.5 and 3.6 on Travis (PR #46) +- Non regularized Wasserstein barycenter with scipy linear solver + and/or cvxopt (PR #47) +- Rename dataset functions to be more sklearn compliant (PR #49) +- Smooth and sparse Optimal transport implementation with entropic and + quadratic regularization (PR #50) +- Stochastic OT in the dual and semi-dual (PR #52 and PR #62) +- Free support barycenters (PR #56) +- Speed-up Sinkhorn function (PR #57 and PR #58) +- Add convolutional Wassersein barycenters for 2D images (PR #64) +- Add Greedy Sinkhorn variant (Greenkhorn) (PR #66) +- Big ot.gpu update with cupy implementation (instead of un-maintained + cudamat) (PR #67) + +Deprecation +^^^^^^^^^^^ + +Deprecated OTDA Classes were removed from ot.da and ot.gpu for version +0.5 (PR #48 and PR #67). The deprecation message has been for a year +here since 0.4 and it is time to pull the plug. + +Closed issues +^^^^^^^^^^^^^ + +- Issue #35 : remove import plot from ot/\ **init**.py (See PR #41) +- Issue #43 : Unusable parameter log for EMDTransport (See PR #44) +- Issue #55 : UnicodeDecodeError: 'ascii' while installing with pip + +0.4 Community edition +--------------------- + +*15 Sep 2017* + +This release contains a lot of contribution from new contributors. + +Features +^^^^^^^^ + +- Automatic notebooks and doc update (PR #27) +- Add gromov Wasserstein solver and Gromov Barycenters (PR #23) +- emd and emd2 can now return dual variables and have max\_iter (PR #29 + and PR #25) +- New domain adaptation classes compatible with scikit-learn (PR #22) +- Proper tests with pytest on travis (PR #19) +- PEP 8 tests (PR #13) + +Closed issues +^^^^^^^^^^^^^ + +- emd convergence problem du to fixed max iterations (#24) +- Semi supervised DA error (#26) + +0.3.1 +----- + +*11 Jul 2017* + +- Correct bug in emd on windows + +0.3 Summer release +------------------ + +*7 Jul 2017* + +- emd\* and sinkhorn\* are now performed in parallel for multiple + target distributions +- emd and sinkhorn are for OT matrix computation +- emd2 and sinkhorn2 are for OT loss computation +- new notebooks for emd computation and Wasserstein Discriminant + Analysis +- relocate notebooks +- update documentation +- clean\_zeros(a,b,M) for removimg zeros in sparse distributions +- GPU implementations for sinkhorn and group lasso regularization + +V0.2 +---- + +*7 Apr 2017* + +- New dimensionality reduction method (WDA) +- Efficient method emd2 returns only tarnsport (in paralell if several + histograms given) + +V0.1.11 New years resolution +---------------------------- + +*5 Jan 2017* + +- Add sphinx gallery for better documentation +- Small efficiency tweak in sinkhorn +- Add simple tic() toc() functions for timing + +V0.1.10 +------- + +*7 Nov 2016* \* numerical stabilization for sinkhorn (log domain and +epsilon scaling) + +V0.1.9 DA classes and mapping +----------------------------- + +*4 Nov 2016* + +- Update classes and examples for domain adaptation +- Joint OT matrix and mapping estimation + +V0.1.7 +------ + +*31 Oct 2016* + +- Original Domain adaptation classes + +PyPI version 0.1.3 +------------------ + +- pipy works + +First pre-release +----------------- + +*28 Oct 2016* + +It provides the following solvers: \* OT solver for the linear program/ +Earth Movers Distance. \* Entropic regularization OT solver with +Sinkhorn Knopp Algorithm. \* Bregman projections for Wasserstein +barycenter [3] and unmixing. \* Optimal transport for domain adaptation +with group lasso regularization \* Conditional gradient and Generalized +conditional gradient for regularized OT. + +Some demonstrations (both in Python and Jupyter Notebook format) are +available in the examples folder. -- cgit v1.2.3 From c3115bce070cbf567c4dda3dfe87114166595423 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 13:59:19 +0200 Subject: mockj module cupy for gpu focumentation --- docs/source/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index 880c71d..3699156 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -36,9 +36,9 @@ class Mock(MagicMock): return MagicMock() -MOCK_MODULES = ['ot.lp.emd_wrap', 'autograd', 'pymanopt', 'cupy', 'autograd.numpy', 'pymanopt.manifolds', 'pymanopt.solvers'] +MOCK_MODULES = [ 'cupy'] # 'autograd.numpy','pymanopt.manifolds','pymanopt.solvers', -#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) +sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) # !!!! # If extensions (or modules to document with autodoc) are in another directory, -- cgit v1.2.3 From 6b42088a1e089d488b1e2f4f2b42084255f331cf Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 14:56:25 +0200 Subject: better documentation --- Makefile | 4 +++- docs/source/all.rst | 4 ++-- docs/source/conf.py | 6 +++--- docs/source/releases.rst | 20 ++++++++++---------- 4 files changed, 18 insertions(+), 16 deletions(-) (limited to 'docs/source/conf.py') diff --git a/Makefile b/Makefile index 202b209..70cdbdd 100644 --- a/Makefile +++ b/Makefile @@ -62,7 +62,9 @@ rdoc : pandoc --from=markdown --to=rst --output=docs/source/releases.rst RELEASES.md sed -i 's,https://pot.readthedocs.io/en/latest/,,g' docs/source/releases.rst sed -i 's,https://github.com/rflamary/POT/blob/master/notebooks/,auto_examples/,g' docs/source/releases.rst - sed -i 's,.ipynb,.html/,g' docs/source/releases.rst + sed -i 's,.ipynb,.html,g' docs/source/releases.rst + sed -i 's,https://pythonot.github.io/auto_examples/,auto_examples/,g' docs/source/releases.rst + notebook : ipython notebook --matplotlib=inline --notebook-dir=notebooks/ diff --git a/docs/source/all.rst b/docs/source/all.rst index a6d9790..f4ba559 100644 --- a/docs/source/all.rst +++ b/docs/source/all.rst @@ -1,7 +1,7 @@ -Python modules -============== +API and modules +=============== ot -- diff --git a/docs/source/conf.py b/docs/source/conf.py index 3699156..101ccd9 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -88,7 +88,7 @@ master_doc = 'index' # General information about the project. project = u'POT Python Optimal Transport' -copyright = u'2016-2019, Rémi Flamary, Nicolas Courty' +copyright = u'2016-2020, Rémi Flamary, Nicolas Courty' author = u'Rémi Flamary, Nicolas Courty' # The version info for the project you're documenting, acts as replacement for @@ -297,7 +297,7 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'pot', u'POT Python Optimal Transport library Documentation', + (master_doc, 'pot', u'POT Python Optimal Transport', [author], 1) ] @@ -312,7 +312,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'POT', u'POT Python Optimal Transport library Documentation', - author, 'POT', 'Python Optimal Transport librar.', + author, 'POT', 'Python Optimal Transport library', 'Miscellaneous'), ] diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 58bfcfb..6b64066 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -1,5 +1,5 @@ -POT Releases -============ +Releases +======== 0.6 Year 3 ---------- @@ -28,15 +28,15 @@ divergence `__ corresponding `Wasserstein 1D `__. We now also have implementations for `Unbalanced -OT `__ +OT `__ and a solver for `Unbalanced OT -barycenters `__. +barycenters `__. A new variant of Gromov-Wasserstein divergence called `Fused Gromov-Wasserstein `__ has been also contributed with exemples of use on `structured -data `__ +data `__ and computing `barycenters of labeld -graphs `__. +graphs `__. A lot of work has been done on the documentation with several new examples corresponding to the new features and a lot of corrections for @@ -88,16 +88,16 @@ toolbox as listed below but also several bug correction. | Among the new features, we can highlight a `non-regularized Gromov-Wasserstein - solver `__, + solver `__, a new `greedy variant of sinkhorn `__, | `non-regularized `__, `convolutional - (2D) `__ + (2D) `__ and `free - support `__ + support `__ Wasserstein barycenters and - `smooth `__ + `smooth `__ and `stochastic `__ implementation of entropic OT. -- cgit v1.2.3 From 2b434924dce3fa2985babcf68191ccd85206b379 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 15:21:07 +0200 Subject: test options sphinx gallery --- RELEASES.md | 22 +++++++++++----------- docs/source/conf.py | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'docs/source/conf.py') diff --git a/RELEASES.md b/RELEASES.md index 70a7a01..5fcf485 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,7 +1,9 @@ # Releases -## 0.6 Year 3 + + +## 0.6 *July 2019* 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. - Issue #72 Macosx build problem -## 0.5.0 Year 2 +## 0.5.0 *Sep 2018* 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 * Issue #55 : UnicodeDecodeError: 'ascii' while installing with pip -## 0.4 Community edition +## 0.4 *15 Sep 2017* This release contains a lot of contribution from new contributors. @@ -152,7 +154,7 @@ This release contains a lot of contribution from new contributors. * Correct bug in emd on windows -## 0.3 Summer release +## 0.3 *7 Jul 2017* * emd* and sinkhorn* are now performed in parallel for multiple target distributions @@ -173,7 +175,7 @@ This release contains a lot of contribution from new contributors. -## V0.1.11 New years resolution +## 0.1.11 *5 Jan 2017* * Add sphinx gallery for better documentation @@ -181,24 +183,22 @@ This release contains a lot of contribution from new contributors. * Add simple tic() toc() functions for timing -## V0.1.10 +## 0.1.10 *7 Nov 2016* * numerical stabilization for sinkhorn (log domain and epsilon scaling) -## V0.1.9 DA classes and mapping +## 0.1.9 *4 Nov 2016* * Update classes and examples for domain adaptation * Joint OT matrix and mapping estimation -## V0.1.7 +## 0.1.7 *31 Oct 2016* * Original Domain adaptation classes - - -## PyPI version 0.1.3 +## 0.1.3 * pipy works diff --git a/docs/source/conf.py b/docs/source/conf.py index 101ccd9..94938cb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -311,8 +311,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'POT', u'POT Python Optimal Transport library Documentation', - author, 'POT', 'Python Optimal Transport library', + (master_doc, 'POT', u'POT Python Optimal Transport', + author, 'POT', 'Python Optimal Transport', 'Miscellaneous'), ] @@ -339,7 +339,7 @@ sphinx_gallery_conf = { 'examples_dirs': ['../../examples', '../../examples/da'], 'gallery_dirs': 'auto_examples', 'backreferences_dir': '../modules/generated/', + 'doc_module' : ('ot'), 'reference_url': { - 'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1', - 'scipy': 'http://docs.scipy.org/doc/scipy-0.17.0/reference'} + 'ot': None} } -- cgit v1.2.3 From 0d13d60cc685099d5f149a14dff9e1c8d757b8d1 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 15:33:34 +0200 Subject: Better section name + snhix-gallery tuning --- docs/source/conf.py | 5 +++-- docs/source/releases.rst | 36 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 20 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index 94938cb..546eb5d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -333,13 +333,14 @@ texinfo_documents = [ intersphinx_mapping = {'python': ('https://docs.python.org/3', None), 'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None), - 'matplotlib': ('http://matplotlib.sourceforge.net/', None)} + 'matplotlib': ('http://matplotlib.org/', None)} sphinx_gallery_conf = { 'examples_dirs': ['../../examples', '../../examples/da'], 'gallery_dirs': 'auto_examples', 'backreferences_dir': '../modules/generated/', - 'doc_module' : ('ot'), + 'inspect_global_variables' : True, + 'doc_module' : ('ot','numpy','scipy','pylab'), 'reference_url': { 'ot': None} } diff --git a/docs/source/releases.rst b/docs/source/releases.rst index 6b64066..075108f 100644 --- a/docs/source/releases.rst +++ b/docs/source/releases.rst @@ -1,8 +1,8 @@ Releases ======== -0.6 Year 3 ----------- +0.6 +--- *July 2019* @@ -78,8 +78,8 @@ Closed issues slightly different - Issue #72 Macosx build problem -0.5.0 Year 2 ------------- +0.5.0 +----- *Sep 2018* @@ -153,8 +153,8 @@ Closed issues - Issue #43 : Unusable parameter log for EMDTransport (See PR #44) - Issue #55 : UnicodeDecodeError: 'ascii' while installing with pip -0.4 Community edition ---------------------- +0.4 +--- *15 Sep 2017* @@ -184,8 +184,8 @@ Closed issues - Correct bug in emd on windows -0.3 Summer release ------------------- +0.3 +--- *7 Jul 2017* @@ -209,8 +209,8 @@ V0.2 - Efficient method emd2 returns only tarnsport (in paralell if several histograms given) -V0.1.11 New years resolution ----------------------------- +0.1.11 +------ *5 Jan 2017* @@ -218,29 +218,29 @@ V0.1.11 New years resolution - Small efficiency tweak in sinkhorn - Add simple tic() toc() functions for timing -V0.1.10 -------- +0.1.10 +------ *7 Nov 2016* \* numerical stabilization for sinkhorn (log domain and epsilon scaling) -V0.1.9 DA classes and mapping ------------------------------ +0.1.9 +----- *4 Nov 2016* - Update classes and examples for domain adaptation - Joint OT matrix and mapping estimation -V0.1.7 ------- +0.1.7 +----- *31 Oct 2016* - Original Domain adaptation classes -PyPI version 0.1.3 ------------------- +0.1.3 +----- - pipy works -- cgit v1.2.3 From fe704c348e2f1fc69c0ecd801e8fefd6888a215d Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 15:51:20 +0200 Subject: test autosummary --- docs/source/all.rst | 5 +++++ docs/source/conf.py | 1 + 2 files changed, 6 insertions(+) (limited to 'docs/source/conf.py') diff --git a/docs/source/all.rst b/docs/source/all.rst index f4ba559..fb6f218 100644 --- a/docs/source/all.rst +++ b/docs/source/all.rst @@ -1,4 +1,5 @@ +.. _sphx_glr_api_reference: API and modules =============== @@ -92,3 +93,7 @@ ot.partial .. automodule:: ot.partial :members: + +.. autosummary:: + :toctree: gen_modules/ + :template: module.rst \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index 546eb5d..c693a02 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,6 +59,7 @@ sys.path.insert(0, os.path.abspath("../..")) # ones. extensions = [ 'sphinx.ext.autodoc', + 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', -- cgit v1.2.3 From 1a3249dd6d6971de23534b797ce81fd670befa2b Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 16:20:37 +0200 Subject: awesome mini gallery --- docs/source/all.rst | 111 ++++++++++++---------------------------------------- docs/source/conf.py | 3 ++ 2 files changed, 27 insertions(+), 87 deletions(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/all.rst b/docs/source/all.rst index fb6f218..d7b878f 100644 --- a/docs/source/all.rst +++ b/docs/source/all.rst @@ -4,96 +4,33 @@ API and modules =============== -ot --- +.. currentmodule:: ot -.. automodule:: ot - :members: - -ot.lp ------ -.. automodule:: ot.lp - :members: - -ot.bregman ----------- - -.. automodule:: ot.bregman - :members: - -ot.smooth ------ -.. automodule:: ot.smooth - :members: - -ot.gromov ----------- - -.. automodule:: ot.gromov - :members: - - -ot.optim --------- - -.. automodule:: ot.optim - :members: - -ot.da --------- - -.. automodule:: ot.da - :members: - -ot.gpu --------- - -.. automodule:: ot.gpu - :members: -ot.dr --------- +:py:mod:`ot`: -.. automodule:: ot.dr - :members: - - -ot.utils --------- - -.. automodule:: ot.utils - :members: - -ot.datasets ------------ - -.. automodule:: ot.datasets - :members: - -ot.plot -------- - -.. automodule:: ot.plot - :members: +.. autosummary:: + :toctree: gen_modules/ + :template: module.rst + + lp + bregman + smooth + gromov + optim + da + gpu + dr + utils + datasets + plot + stochastic + unbalanced + partial -ot.stochastic -------------- +.. autosummary:: + :toctree: ../modules/generated/ + :template: module.rst -.. automodule:: ot.stochastic +.. automodule:: ot :members: - -ot.unbalanced -------------- - -.. automodule:: ot.unbalanced - :members: - -ot.partial -------------- - -.. automodule:: ot.partial - :members: - -.. autosummary:: - :toctree: gen_modules/ - :template: module.rst \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index c693a02..1a64d93 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -71,6 +71,9 @@ extensions = [ 'sphinx_gallery.gen_gallery', ] +autosummary_generate = True + + napoleon_numpy_docstring = True # Add any paths that contain templates here, relative to this directory. -- cgit v1.2.3 From e18e18f8453263fa95c61e666f14c89a1df5efb4 Mon Sep 17 00:00:00 2001 From: Rémi Flamary Date: Fri, 24 Apr 2020 17:09:36 +0200 Subject: test new foldeer --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/source/conf.py') diff --git a/docs/source/conf.py b/docs/source/conf.py index 1a64d93..384bf40 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -342,7 +342,7 @@ intersphinx_mapping = {'python': ('https://docs.python.org/3', None), sphinx_gallery_conf = { 'examples_dirs': ['../../examples', '../../examples/da'], 'gallery_dirs': 'auto_examples', - 'backreferences_dir': '../modules/generated/', + 'backreferences_dir': 'gen_modules/backreferences', 'inspect_global_variables' : True, 'doc_module' : ('ot','numpy','scipy','pylab'), 'reference_url': { -- cgit v1.2.3