diff --git a/core/doc/CMakeLists.txt b/core/doc/CMakeLists.txt index fbf3f9ec5ccd6aac30b6bcc6fb3f3ae0595d51a9..30f7cad13c693450321d07fdc37f3e418bb6de2e 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 1e2eccafc89bbb443c29d0b55bf9fc0eeec8aaac..8adefa269ed7f4f9bcdfdceff447a23649ccee35 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 0000000000000000000000000000000000000000..cc823ef3c50d26bd88f6ba715551f4ce3e95dc98 --- /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 f3bbada79eea0d4943c476d44d5e8f6e42a51ca2..a122ac3fb3d51c088f755c5a2c71fada8a4b91ca 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