From 76582859cb7df9678fa82d72e4d3d599a1bbd0ea Mon Sep 17 00:00:00 2001 From: Stefan Bienert <stefan.bienert@unibas.ch> Date: Mon, 10 Aug 2015 15:29:59 +0200 Subject: [PATCH] Added documentation --- core/doc/CMakeLists.txt | 1 + core/doc/index.rst | 4 +++- core/doc/pm3argparse.rst | 33 +++++++++++++++++++++++++++++++++ doc/conf.py.in | 3 +++ 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 core/doc/pm3argparse.rst diff --git a/core/doc/CMakeLists.txt b/core/doc/CMakeLists.txt index fbf3f9ec..30f7cad1 100644 --- a/core/doc/CMakeLists.txt +++ b/core/doc/CMakeLists.txt @@ -1,6 +1,7 @@ set(CORE_RST index.rst argcheck.rst +pm3argparse.rst helper.rst setcompoundschemlib.rst ) diff --git a/core/doc/index.rst b/core/doc/index.rst index 1e2eccaf..8adefa26 100644 --- a/core/doc/index.rst +++ b/core/doc/index.rst @@ -9,7 +9,9 @@ modeling per se but cover standard programming issues. .. toctree:: :maxdepth: 2 - + + pm3argparse + argcheck helper diff --git a/core/doc/pm3argparse.rst b/core/doc/pm3argparse.rst new file mode 100644 index 00000000..cc823ef3 --- /dev/null +++ b/core/doc/pm3argparse.rst @@ -0,0 +1,33 @@ +:mod:`~promod3.core.pm3argparse` - Parsing Command Lines +================================================================================ + +.. currentmodule:: promod3.core.pm3argparse + +Introduction +-------------------------------------------------------------------------------- + +A lot of the actions in |project| have a bunch of command line parameters/ +arguments in common. For example we need an input alignment quite often and +usually for an alignment we need information on what is the target sequence, +what identifies a template sequence and eventually a hint on the format. That +means we need the same functionality on the command line in several actions. +There :class:`pm3argparse.PM3ArgumentParser` serves as a simplification. It +provides a set of standard arguments you just need to activate for your action +plus it comes with some verification functionality for input. + +.. synopsis/ example + +Argument Parser +-------------------------------------------------------------------------------- + +.. autoclass:: PM3ArgumentParser + :members: + + .. automethod:: __init__ + +.. |descattr| replace:: :attr:`description` +.. |argpinit| replace:: :meth:`ArgumentParser.__init__` +.. |progattr| replace:: :attr:`prog` + +.. LocalWords: currentmodule argparse ArgumentParser autoclass automethod +.. LocalWords: init descattr attr argpinit meth progattr prog diff --git a/doc/conf.py.in b/doc/conf.py.in index f3bbada7..a122ac3f 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -286,6 +286,9 @@ rst_epilog = """ .. _ost_s: http://www.OpenStructure.org .. _nameattr: @PYTHON_DOC_URL@/library/__main__.html .. _mainattr: @PYTHON_DOC_URL@/library/__main__.html +.. _descattr: @PYTHON_DOC_URL@/library/argparse.html#description +.. _progattr: @PYTHON_DOC_URL@/library/argparse.html#prog +.. _argpinit: @PYTHON_DOC_URL@/library/argparse.html#argparse.ArgumentParser .. |pep8| replace:: PEP 8 .. _pep8: https://www.python.org/dev/peps/pep-0008/ """ % project -- GitLab