]> mj.ucw.cz Git - eval.git/commitdiff
Played with the documentation
authorTomas Gavenciak <gavento@ucw.cz>
Fri, 10 Sep 2010 21:36:11 +0000 (23:36 +0200)
committerTomas Gavenciak <gavento@ucw.cz>
Fri, 10 Sep 2010 21:36:11 +0000 (23:36 +0200)
No real work done, really. Just fun.

Created a hyperlink! (and base docs for moe.eval)

t/doc/conf.py
t/doc/config.rst
t/doc/eval.rst [new file with mode: 0644]
t/doc/log.rst
t/doc/timeline.rst
t/moe/config.py
t/moe/config_parser.py
t/moe/log.py

index 30f2a77d89462a5ac45ce819b9722c542eefc139..a23201da55751685b5c81b61416b97bedc60bce5 100644 (file)
@@ -28,6 +28,8 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage']
 
 todo_include_todos = True
 
+autodoc_default_flags = ['show-inheritance']
+
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
index 5a122599cec0df6671963b83ab16cb3ea9a4fb48..fe4066203a8e4ebefd45470e420c77089697cc52 100644 (file)
@@ -3,34 +3,51 @@
 Moe configuration
 =================
 
-The configuration consists of lazy definition-style configuration resolver and configuration parser.
 
-.. contents::
+.. contents:: 
+
+The configuration consists of lazy definition-style configuration resolver and configuration parser.
 
+The configuration variables form a dot-separated tree, but internally the list of variables is just 
+flat with full names.
 
-Config elements
-----------------
+Configuration tree
+++++++++++++++++++
 
 .. automodule:: moe.config
-       :members: ConfigError, UndefinedError, VariableNameError, VariableFixedError, CyclicConfigError, ConfigTree, ConfigElem, ConfigCondition
-       :undoc-members:
 
-       
-Internal classes
-++++++++++++++++
+  Exceptions
+  ----------
+
+  .. autoclass:: ConfigError
+  .. autoclass:: UndefinedError
+  .. autoclass:: VariableNameError
+  .. autoclass:: VariableFixedError
+  .. autoclass:: CyclicConfigError
+
+  Configuration tree
+  ------------------
+
+  .. autoclass:: ConfigTree
+    :members:
+
+  Main config elements
+  --------------------
 
-.. autoclass:: moe.config.Operation
-       :members:
-       :undoc-members:
-.. autoclass:: moe.config.ConfigVar
-       :members:
-       :undoc-members:
-.. autoclass:: moe.config.ConfigExpression
-       :members:
-       :undoc-members:
+  .. autoclass:: ConfigElem
+    :members:
+  .. autoclass:: ConfigCondition
+    :members:
+  .. autoclass:: ConfigVar
+    :members:
+  
+  Internal config elements
+  ------------------------
 
+  .. autoclass:: Operation
+  .. autoclass:: ConfigExpression
 
 Config parser
---------------
++++++++++++++
 
 .. automodule:: moe.config_parser
diff --git a/t/doc/eval.rst b/t/doc/eval.rst
new file mode 100644 (file)
index 0000000..ac89cdc
--- /dev/null
@@ -0,0 +1,9 @@
+.. _eval:
+
+Class `Eval`
+============
+
+.. automodule:: moe.eval
+
+  .. autoclass:: Eval
+    :members: 
index dca955a3d10369870dc0a11750138ffe2a8e94db..723512af70d2515808fa2a8607b233842773ba5d 100644 (file)
@@ -3,11 +3,8 @@
 Moe Logging
 ===========
 
-`Loggers` is a collection of logggers for :class:`~moe.eval.Eval`, initializing 4 subloggers (see class description). 
+.. automodule:: moe.log
 
-Use as `e.log.debug(...)` for main log that goes both to `test` and `main` log, 
-`e.log.test.debug(...)` for individual logs.
-
-.. autoclass:: moe.log.Loggers
-       :members:
+  .. autoclass:: Loggers
+    :members:
 
index 3c36ea7577266f19b2ee23d54c2781ea32319e75..4c5383e0c1fc76ae3653ca366d31898feb502bf5 100644 (file)
@@ -3,10 +3,10 @@
 Evaluation timeline
 ====================
 
-Eval.init
----------
+`Eval.init`
+------------
 
-`Eval.init` is run before the main pipeline, does the following:
+:func:`Eval.init <moe.eval.Eval.init>` is run before the main pipeline and does the following:
 
 ======= ==========
 Time   Action
index f24e1ef8f357748b41b13f2b8cff20419cfb90d7..bcef93be2cb841e394bc496abeb687078275b1aa 100644 (file)
@@ -1,10 +1,6 @@
 """
-config.py
----------
-
 Lazy conditional string evaluation module for Moe configuration variables.
 
-
 * Each variable has ordered list of operations (definitions), each defining operation either 
   assigns (SET) or appends (APPEND) value of an expression to the variable. Each operation may be guarded by condition(s). 
 
index 217cd9177a5003cbea0a05d540eab0e2f2052e83..ce723baf8ff52900e6cc6aefa1ee1214fd2d6b33 100644 (file)
@@ -1,7 +1,4 @@
 r"""
-config_parser.py
-----------------
-
 Simple Moe configuration file syntax parser. 
 
 Generally, whitespace and comments are alowed everywhere except in variable names and inside expressions. 
index 19b475c70d9d181dc83d81b51cfac69fe91ad715..9a7f9d8c4256398a3bb5d874289aa58516d95d1c 100644 (file)
@@ -1,9 +1,24 @@
 #!/usr/bin/env python
 
+"""
+
+`Loggers` is a collection of logggers for :class:`~moe.eval.Eval`, initializing 4 subloggers (see class description).
+
+Use as `e.log.debug(...)` for main log that goes both to `test` and `main` log,
+`e.log.test.debug(...)` for individual logs.
+
+.. :data:: DDEBUG = 5
+       Very verbose debugging level
+
+"""
+
+
 import sys, os
 import logging 
 from logging import Logger, StreamHandler
 
+logging.addLevelName(5,'DDEBUG')
+
 
 class Loggers(Logger):
   """Defines several logs: