Salome HOME
SPO - Modifications to enable auto documentation of Python code
authorSimon Pomarede <simon.pomarede@cea.fr>
Tue, 2 Feb 2016 13:11:49 +0000 (14:11 +0100)
committerSimon Pomarede <simon.pomarede@cea.fr>
Tue, 2 Feb 2016 13:11:49 +0000 (14:11 +0100)
doc/Makefile
doc/source/conf.py
doc/source/index.rst
src/__init__.py [new file with mode: 0644]

index 70c26962e881cf2123c9c06e8ec87dc34892c6ff..f79ee7764d2e0ff614126e3892702f40d0ace5b8 100644 (file)
@@ -37,7 +37,7 @@ help:
 clean:
        -rm -rf $(BUILDDIR)/*
 
-html:
+html: apidoc
        $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
        @echo
        @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@@ -137,3 +137,6 @@ doctest:
        $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
        @echo "Testing of doctests in the sources finished, look at the " \
              "results in $(BUILDDIR)/doctest/output.txt."
+
+apidoc:
+       @sphinx-apidoc -o source/commands/apidoc ../src
index f85e513100cfab6569a2cf6b0983e04b37feb2fc..39d111727c3a5b7ccd9fcc8f7ace3b479f94aeb3 100644 (file)
@@ -26,7 +26,7 @@ import os
 
 # Add any Sphinx extension module names here, as strings. They can be extensions
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = []
+extensions = ['sphinx.ext.autodoc']
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
@@ -117,7 +117,7 @@ html_theme = 'default'
 # The name of an image file (within the static path) to use as favicon of the
 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
 # pixels large.
-html_favicon = "images/salomeTools.ico"
+#html_favicon = "images/salomeTools.ico"
 
 # 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,
@@ -216,3 +216,6 @@ man_pages = [
     ('index', 'salometools', u'salomeTools Documentation',
      [u'CEA'], 1)
 ]
+
+# Append source folder to path in order to enable autodoc
+sys.path.append(os.path.join('..'))
\ No newline at end of file
index 6aa94fe05f78e2f9d0e26ebeead19252b57facba..30b345043480b20284c575f3ad7fcda4fa1ab8de 100644 (file)
@@ -28,6 +28,16 @@ List of Commands
    
    config <commands/config>
 
+Code documentation
+==================
+.. toctree::
+   :maxdepth: 1
+   
+   SAT modules <commands/apidoc/modules.rst>
+
+
+
 Release Notes
 =============
 Here are the release notes for sat:
diff --git a/src/__init__.py b/src/__init__.py
new file mode 100644 (file)
index 0000000..e69de29