summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Flamary <remi.flamary@gmail.com>2016-12-02 15:33:30 +0100
committerRémi Flamary <remi.flamary@gmail.com>2016-12-02 15:33:30 +0100
commit7609f9e6a4103e13beb294873f4dac562b1d45e1 (patch)
treea7776b0eee3ce73609fb86cf3cc6fca8986353d5
parentfd6df63f0775ba869f0dff839d5ff0713cdb89dc (diff)
working doc with gallery
-rw-r--r--docs/source/conf.py37
-rw-r--r--docs/source/index.rst4
-rw-r--r--examples/README.txt1
-rw-r--r--examples/plot_OTDA_2D.py6
-rw-r--r--examples/plot_OTDA_classes.py6
-rw-r--r--examples/plot_OTDA_color_images.py6
-rw-r--r--examples/plot_OTDA_mapping.py6
-rw-r--r--examples/plot_OTDA_mapping_color_images.py6
-rw-r--r--examples/plot_OT_1D.py6
-rw-r--r--examples/plot_OT_2D_samples.py6
10 files changed, 42 insertions, 42 deletions
diff --git a/docs/source/conf.py b/docs/source/conf.py
index dddc4fe..f76c184 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -17,23 +17,23 @@ import os
import re
import sphinx_gallery
-#try:
-from unittest.mock import MagicMock
-#except ImportError:
-# from mock import MagicMock
-
-sys.path.insert(0, os.path.abspath("../.."))
-#sys.setrecursionlimit(1500)
-
-
-
-class Mock(MagicMock):
- @classmethod
- def __getattr__(cls, name):
- return Mock()
-
-MOCK_MODULES = [ 'emd','ot.lp.emd']
-sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
+##try:
+#from unittest.mock import MagicMock
+##except ImportError:
+## from mock import MagicMock
+#
+#sys.path.insert(0, os.path.abspath("../.."))
+##sys.setrecursionlimit(1500)
+#
+#
+#
+#class Mock(MagicMock):
+# @classmethod
+# def __getattr__(cls, name):
+# return Mock()
+#
+#MOCK_MODULES = [ 'emd','ot.lp.emd']
+#sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
@@ -58,7 +58,7 @@ extensions = [
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
-# 'sphinx_gallery.gen_gallery',
+ 'sphinx_gallery.gen_gallery',
]
# Add any paths that contain templates here, relative to this directory.
@@ -324,6 +324,7 @@ intersphinx_mapping = {'https://docs.python.org/': None}
sphinx_gallery_conf = {
'examples_dirs': '../../examples',
'gallery_dirs': 'auto_examples',
+ 'mod_example_dir': '../modules/generated/',
'reference_url': {
'numpy': 'http://docs.scipy.org/doc/numpy-1.9.1',
'scipy': 'http://docs.scipy.org/doc/scipy-0.17.0/reference'}
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 07c4f9a..b8eabcb 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -10,11 +10,11 @@ Contents
--------
.. toctree::
- :maxdepth: 2
+ :maxdepth: 3
self
all
- auto_examples
+ auto_examples/index
.. include:: readme.rst
:start-line: 5
diff --git a/examples/README.txt b/examples/README.txt
index 83d114a..f8643b8 100644
--- a/examples/README.txt
+++ b/examples/README.txt
@@ -1,3 +1,2 @@
-============
POT Examples
============
diff --git a/examples/plot_OTDA_2D.py b/examples/plot_OTDA_2D.py
index db04c5e..a1fb804 100644
--- a/examples/plot_OTDA_2D.py
+++ b/examples/plot_OTDA_2D.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-===============================================
-demo of Optimal transport for domain adaptation
-===============================================
+==============================
+OT for empirical distributions
+==============================
"""
diff --git a/examples/plot_OTDA_classes.py b/examples/plot_OTDA_classes.py
index c00cef6..089b45b 100644
--- a/examples/plot_OTDA_classes.py
+++ b/examples/plot_OTDA_classes.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-===============================================
-demo of Optimal transport for domain adaptation
-===============================================
+========================
+OT for domain adaptation
+========================
"""
diff --git a/examples/plot_OTDA_color_images.py b/examples/plot_OTDA_color_images.py
index 15fbab0..68eee44 100644
--- a/examples/plot_OTDA_color_images.py
+++ b/examples/plot_OTDA_color_images.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-=====================================================================================
-Demo of Optimal transport for domain adaptation with image color adaptation as in [6]
-=====================================================================================
+========================================================
+OT for domain adaptation with image color adaptation [6]
+========================================================
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014). Regularized discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
"""
diff --git a/examples/plot_OTDA_mapping.py b/examples/plot_OTDA_mapping.py
index 779fa76..78b57e7 100644
--- a/examples/plot_OTDA_mapping.py
+++ b/examples/plot_OTDA_mapping.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-=======================================================
-Demo of OT mapping estimation for domain adaptation [8]
-=======================================================
+===============================================
+OT mapping estimation for domain adaptation [8]
+===============================================
[8] M. Perrot, N. Courty, R. Flamary, A. Habrard, "Mapping estimation for
discrete optimal transport", Neural Information Processing Systems (NIPS), 2016.
diff --git a/examples/plot_OTDA_mapping_color_images.py b/examples/plot_OTDA_mapping_color_images.py
index 0349bf6..f07dc6c 100644
--- a/examples/plot_OTDA_mapping_color_images.py
+++ b/examples/plot_OTDA_mapping_color_images.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-======================================================================================================================
-Demo of Optimal transport for domain adaptation with image color adaptation as in [6] with mapping estimation from [8]
-======================================================================================================================
+====================================================================================
+OT for domain adaptation with image color adaptation [6] with mapping estimation [8]
+====================================================================================
[6] Ferradans, S., Papadakis, N., Peyre, G., & Aujol, J. F. (2014). Regularized
discrete optimal transport. SIAM Journal on Imaging Sciences, 7(3), 1853-1882.
diff --git a/examples/plot_OT_1D.py b/examples/plot_OT_1D.py
index a8bbbd6..e5719eb 100644
--- a/examples/plot_OT_1D.py
+++ b/examples/plot_OT_1D.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-=============================
-Demo for 1D optimal transport
-=============================
+====================
+1D optimal transport
+====================
@author: rflamary
"""
diff --git a/examples/plot_OT_2D_samples.py b/examples/plot_OT_2D_samples.py
index 138690f..6c39ad4 100644
--- a/examples/plot_OT_2D_samples.py
+++ b/examples/plot_OT_2D_samples.py
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
"""
-=============================================================
-Demo for 2D Optimal transport between empirical distributions
-=============================================================
+====================================================
+2D Optimal transport between empirical distributions
+====================================================
@author: rflamary
"""