From: Tomas Gavenciak Date: Fri, 10 Sep 2010 21:36:11 +0000 (+0200) Subject: Played with the documentation X-Git-Tag: python-dummy-working~29 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=750990d7dbbaf2740f290a26dab527ce4444cbfb;p=moe.git Played with the documentation No real work done, really. Just fun. Created a hyperlink! (and base docs for moe.eval) --- diff --git a/t/doc/conf.py b/t/doc/conf.py index 30f2a77..a23201d 100644 --- a/t/doc/conf.py +++ b/t/doc/conf.py @@ -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'] diff --git a/t/doc/config.rst b/t/doc/config.rst index 5a12259..fe40662 100644 --- a/t/doc/config.rst +++ b/t/doc/config.rst @@ -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 index 0000000..ac89cdc --- /dev/null +++ b/t/doc/eval.rst @@ -0,0 +1,9 @@ +.. _eval: + +Class `Eval` +============ + +.. automodule:: moe.eval + + .. autoclass:: Eval + :members: diff --git a/t/doc/log.rst b/t/doc/log.rst index dca955a..723512a 100644 --- a/t/doc/log.rst +++ b/t/doc/log.rst @@ -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: diff --git a/t/doc/timeline.rst b/t/doc/timeline.rst index 3c36ea7..4c5383e 100644 --- a/t/doc/timeline.rst +++ b/t/doc/timeline.rst @@ -3,10 +3,10 @@ Evaluation timeline ==================== -Eval.init ---------- +`Eval.init` +------------ -`Eval.init` is run before the main pipeline, does the following: +:func:`Eval.init ` is run before the main pipeline and does the following: ======= ========== Time Action diff --git a/t/moe/config.py b/t/moe/config.py index f24e1ef..bcef93b 100644 --- a/t/moe/config.py +++ b/t/moe/config.py @@ -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). diff --git a/t/moe/config_parser.py b/t/moe/config_parser.py index 217cd91..ce723ba 100644 --- a/t/moe/config_parser.py +++ b/t/moe/config_parser.py @@ -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. diff --git a/t/moe/log.py b/t/moe/log.py index 19b475c..9a7f9d8 100644 --- a/t/moe/log.py +++ b/t/moe/log.py @@ -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: