Skip to content

Commit

Permalink
Flatten structure of the documentation and include examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomislijepcevic committed Jul 13, 2018
1 parent 07b8d4f commit 9aec870
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 30 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ ENV/
/TestOutputs

# IDE config
.idea/
.idea/

# Directory where examples are copied for Sphinx to process them
/docs/source/examples
2 changes: 0 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
cp -vr ../examples "$(SOURCEDIR)"
$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
rm -r "$(SOURCEDIR)"/examples
22 changes: 15 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))

import shutil

# -- Project information -----------------------------------------------------

Expand Down Expand Up @@ -47,6 +45,8 @@
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'nbsphinx',
'IPython.sphinxext.ipython_console_highlighting'
]
Expand Down Expand Up @@ -95,10 +95,7 @@
# further. For a list of options available for each theme, see the
# documentation.
#
html_theme_options = {
"navigation_depth": 5,
'collapse_navigation': True
}
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down Expand Up @@ -193,3 +190,14 @@

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']

# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {'https://docs.python.org/3.6/': None}

# copy examples
shutil.rmtree('./examples', ignore_errors=True)

try:
shutil.copytree('../../examples', './examples')
except FileExistsError:
pass
3 changes: 1 addition & 2 deletions docs/source/eolearn.core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.core
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.coregistration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.coregistration
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.features
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.geometry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.geometry
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.io
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.mask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.mask
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.ml_tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ eolearn.ml\_tools
:undoc-members:
:show-inheritance:

Submodules
----------
Submodules:

.. toctree::

Expand Down
3 changes: 1 addition & 2 deletions docs/source/eolearn.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
Package content
***************

Subpackages
-----------
Subpackages:

.. toctree::

Expand Down
8 changes: 4 additions & 4 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Examples

.. toctree::

examples/land-cover-map/1_split-AOI.ipynb
examples/land-cover-map/2_eopatch-L1C.ipynb
examples/land-cover-map/2_eopatch-L2A.ipynb
examples/water-monitor/WaterMonitorWorkflow
../../examples/land-cover-map/1_split-AOI.ipynb
../../examples/land-cover-map/2_eopatch-L1C.ipynb
../../examples/land-cover-map/2_eopatch-L2A.ipynb
../../examples/water-monitor/WaterMonitorWorkflow

0 comments on commit 9aec870

Please sign in to comment.