From aa8be8688aeeec8ca3737f44617e57ed1721992b Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Wed, 11 Feb 2015 15:52:23 +0100 Subject: [PATCH] Documentation --- core/doc/CMakeLists.txt | 1 + core/doc/setcompoundschemlib.rst | 17 +++++++++++++++++ core/pymod/__init__.py.in | 2 +- doc/conf.py.in | 3 +++ doc/developers.rst | 1 + 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 core/doc/setcompoundschemlib.rst diff --git a/core/doc/CMakeLists.txt b/core/doc/CMakeLists.txt index 9097ded5..fbf3f9ec 100644 --- a/core/doc/CMakeLists.txt +++ b/core/doc/CMakeLists.txt @@ -2,6 +2,7 @@ set(CORE_RST index.rst argcheck.rst helper.rst +setcompoundschemlib.rst ) add_doc_source(NAME core RST ${CORE_RST}) diff --git a/core/doc/setcompoundschemlib.rst b/core/doc/setcompoundschemlib.rst new file mode 100644 index 00000000..fb022343 --- /dev/null +++ b/core/doc/setcompoundschemlib.rst @@ -0,0 +1,17 @@ +:func:`~promod3.SetCompoundsChemlib` +================================================================================ + +.. currentmodule:: promod3 + +This is the one function defined on the highest level of |project|'s module +hierarchy. It is used to load an |ost_s| compound library to avoid running +|python| code via the ancient |ost_s| wrapper. Applying this function at +top-level, we can set a decent default by |cmake| plus the library is +immediately available just by invoking **any** |project| module. You do not +need to call this function, only if you want to load a different chemical +components dictionary. + +.. autofunction:: SetCompoundsChemlib + +.. LocalWords: func promod SetCompoundsChemlib currentmodule ost cmake +.. LocalWords: autofunction diff --git a/core/pymod/__init__.py.in b/core/pymod/__init__.py.in index 8f55113e..2806c35d 100644 --- a/core/pymod/__init__.py.in +++ b/core/pymod/__init__.py.in @@ -7,7 +7,7 @@ from ost import conop from ost import io def SetCompoundsChemlib(path_to_chemlib=@OST_COMPOUNDS_CHEMLIB_PATH@): - """ + """SetCompoundsChemlib(path_to_chemlib) Load a compounds library. Does not return anything, the library is just enabled globally. diff --git a/doc/conf.py.in b/doc/conf.py.in index a0707ded..cced43b7 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -38,6 +38,9 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', 'sphinx.ext.extlinks', 'cmake'] +# Check first line of docstring for signatures (autofunction) +autodoc_docstring_signature = True + # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] diff --git a/doc/developers.rst b/doc/developers.rst index 0830ebc6..a750240d 100644 --- a/doc/developers.rst +++ b/doc/developers.rst @@ -9,6 +9,7 @@ Contents: .. toctree:: :maxdepth: 2 + core/setcompoundschemlib core/index rawmodel/index buildsystem -- GitLab