Skip to content
Snippets Groups Projects
Commit c9db49ea authored by Bienchen's avatar Bienchen Committed by BIOPZ-Johner Niklaus
Browse files

Updated documentation

parent da323413
No related branches found
No related tags found
No related merge requests found
set(CMAKE_RST
index.rst
)
add_doc_source(NAME cmake RST ${CMAKE_RST})
|project|'s Share Of |cmake|
===============================================================================
Introduction
--------------------------------------------------------------------------------
This section describes the set of |project|'s own set of |cmake| functions (or
macros) fed from the :file:`cmake_support` directory. Those could be easily put
into three categories of varying relevance for you:
1. Functions used to integrate your contribution into |project|. Its all about
adding files to the documentation, declaring unit tests and code management.
Almost all of them have their home in the file :file:`PROMOD3.cmake`.
2. Then there is a set of functions needed to set up |cmake| itself. Those are
little helpers to find tools, external packages and such. These are found in
:file:`Find<DEPENDENCY>.cmake` files.
3. The last and probably least relevant category for you is also to be found in
:file:`PROMOD3.cmake`. There is a set of functions used to define more
|cmake| functionality. You only need to consider those if you dare to extend
this set up.
Functions For Module Maintenance
--------------------------------------------------------------------------------
Unit Tests
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. Finding packages
.. -----------------
.. Extending |cmake|
.. -----------------
.. LocalWords: cmake PROMOD
:mod:`~promod3.core.argcheck` - Standard tests for command line arguments :mod:`~promod3.core.argcheck` - Standard Tests For Command Line Arguments
================================================================================ ================================================================================
.. currentmodule:: promod3.core.argcheck .. currentmodule:: promod3.core.argcheck
...@@ -9,11 +9,11 @@ Introduction ...@@ -9,11 +9,11 @@ Introduction
For parsing command line arguments - For parsing command line arguments -
:py_docs:`optional <howto/argparse.html#introducing-optional-arguments>` and :py_docs:`optional <howto/argparse.html#introducing-optional-arguments>` and
:py_docs:`positional <howto/argparse.html#introducing-positional-arguments>` - :py_docs:`positional <howto/argparse.html#introducing-positional-arguments>` -
|project| tools should utilise Pythons own :py_docs:`argparse <library/argparse.html>` |project| tools should utilise Pythons own
module. While this comes with a lot of functionality to fetch values from the :py_docs:`argparse <library/argparse.html>` module. While this comes with a lot
command line comfortably, it has no means in checking/ verifying input. Some of of functionality to fetch values from the command line comfortably, it has no
the most common tests are covered here. All tests are designed to exit a script means in checking/ verifying input. Some of the most common tests are covered
on failure. here. All tests are designed to exit a script on failure.
.. testcode:: argcheck .. testcode:: argcheck
:hide: :hide:
......
:mod:`~promod3.core.helper` - Shared functionality for the everything :mod:`~promod3.core.helper` - Shared Functionality For the Everything
================================================================================ ================================================================================
.. currentmodule:: promod3.core.helper .. currentmodule:: promod3.core.helper
......
:mod:`~promod3.core` - ProMod3 core functionality :mod:`~promod3.core` - ProMod3 Core Functionality
================================================================================ ================================================================================
.. module:: promod3.core .. module:: promod3.core
......
...@@ -13,5 +13,6 @@ Contents: ...@@ -13,5 +13,6 @@ Contents:
rawmodel/index rawmodel/index
buildsystem buildsystem
contributing contributing
cmake/index
.. todolist:: .. todolist::
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to ProMod3's documentation! Welcome To ProMod3's Documentation!
=================================== ===================================
Contents: Contents:
...@@ -17,7 +17,7 @@ Contents: ...@@ -17,7 +17,7 @@ Contents:
.. todolist:: .. todolist::
Indices and tables Indices And Tables
================== ==================
* :ref:`genindex` * :ref:`genindex`
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Checking reStructuredText docmentation files. Checking reStructuredText docmentation files.
""" """
import re
from .. import pm3_csc
from . import base from . import base
...@@ -13,10 +15,29 @@ class Rest(base.FileCheck): ...@@ -13,10 +15,29 @@ class Rest(base.FileCheck):
base.FileCheck.__init__(self, filepath) base.FileCheck.__init__(self, filepath)
def Check(self, ignore_line_width=False): def Check(self, ignore_line_width=False):
# For now we do not have any checks for reST so this is an awkward re_head1 = re.compile(r"\s*(?:=+|-+)\s*")
# dummy, just checking line width. re_title1 = re.compile(r"(?:\:mod\:`.*`)?(.*)")
# headlines start with all upercase but articles
last_line = ''
for line in self.GetLine(ignore_line_width): for line in self.GetLine(ignore_line_width):
# pylint: disable=unused-variable if re_head1.match(line) and len(last_line):
lll = line ma_title = re_title1.match(last_line)
if ma_title:
wl_title = ma_title.group(1).split()
for wrd in wl_title:
if wrd not in ['-', 'a', 'an', 'the'] and wrd[0] != '|':
if not wrd[0].isupper():
pm3_csc.FailMsg("Line %d"%(self.current_line-1)+
" seems to be a headline "+
"which is not 'all "+
"uppercase'. Only articles "+
"'a, an, the' are allowed "+
"lowercase, even 'by, for, "+
"of, to, ...' are written "+
"uppercase since those are "+
"prepositions like 'around, "+
"under'.", 16)
last_line = line
__all__ = ('Rest', ) __all__ = ('Rest', )
:mod:`~promod3.rawmodel` - Coordinate modeling :mod:`~promod3.rawmodel` - Coordinate Modeling
================================================================================ ================================================================================
.. module:: promod3.rawmodel .. module:: promod3.rawmodel
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment