From b6a35869aee6b2b228b89609c25e081f5761e0dd Mon Sep 17 00:00:00 2001 From: Tomas Gavenciak Date: Fri, 10 Sep 2010 22:37:37 +0200 Subject: [PATCH] Minor doc updates and fixes Fixed syntactic typo in eval.py --- t/doc/config.rst | 2 ++ t/doc/index.rst | 7 ++++--- t/doc/log.rst | 8 +++++--- t/doc/timeline.rst | 2 ++ t/moe/eval.py | 12 ++++++------ t/moe/log.py | 2 +- 6 files changed, 20 insertions(+), 13 deletions(-) diff --git a/t/doc/config.rst b/t/doc/config.rst index 57d58c1..5a12259 100644 --- a/t/doc/config.rst +++ b/t/doc/config.rst @@ -1,3 +1,5 @@ +.. _config: + Moe configuration ================= diff --git a/t/doc/index.rst b/t/doc/index.rst index c0ef801..ac343c9 100644 --- a/t/doc/index.rst +++ b/t/doc/index.rst @@ -7,9 +7,10 @@ Contents: .. toctree:: :maxdepth: 2 - timeline.rst - log.rst - config.rst + timeline + eval + log + config Indices and tables ================== diff --git a/t/doc/log.rst b/t/doc/log.rst index c25ded4..dca955a 100644 --- a/t/doc/log.rst +++ b/t/doc/log.rst @@ -1,11 +1,13 @@ +.. _log: + Moe Logging =========== -One `Loggers` object is created for Eval, initializing 4 subloggers (see class description). +`Loggers` is a collection of logggers for :class:`~moe.eval.Eval`, initializing 4 subloggers (see class description). -Use as `e.log.debug(...)` for both test and main log, `e.log.user.debug(...)` for `user` and other logs. +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: - :member-order: bysource diff --git a/t/doc/timeline.rst b/t/doc/timeline.rst index 37a2f5e..3c36ea7 100644 --- a/t/doc/timeline.rst +++ b/t/doc/timeline.rst @@ -1,3 +1,5 @@ +.. _timeline: + Evaluation timeline ==================== diff --git a/t/moe/eval.py b/t/moe/eval.py index c92ce8a..9a964ff 100644 --- a/t/moe/eval.py +++ b/t/moe/eval.py @@ -81,18 +81,18 @@ class Eval: raise moe.MoeError, "Cannot create %s: %s" % (test, err.strerror) def debug_dump_config(self): - "Dumps at level DDEBUG and only compiles the dump if main level low enough." + "Dumps config at level DDEBUG (only compiles the dump if main level is low enough)." if self.log.level <= 5: - self.log.ddebug('****** Config dump: ******')) + self.log.ddebug('****** Config dump: ******') self.log.ddebug(self.config.dump('**** ')) - self.log.ddebug('**************************')) + self.log.ddebug('**************************') def debug_dump_pipe(self, pipe): - "Dumps at level DDEBUG and only compiles the dump if main level low enough." + "Dumps pipeline `pipe` at level DDEBUG (only compiles the dump if main level low enough)." if self.log.level <= 5: - self.log.ddebug('****** Pipeline %r dump: ******'%pipe,name)) + self.log.ddebug('****** Pipeline %r dump: ******'%pipe,name) self.log.ddebug(pipe.dump(prefix='**** ')) - self.log.ddebug('**************************')) + self.log.ddebug('**************************') #TODO ... def init_task(self): diff --git a/t/moe/log.py b/t/moe/log.py index 1660a02..19b475c 100644 --- a/t/moe/log.py +++ b/t/moe/log.py @@ -18,7 +18,7 @@ class Loggers(Logger): per-test log, initially no handler, to be directed to file like `{TEST}.log` .. note:: Currently, the logs and fd's get never closed. - .. note:: Currently, the `Loggers.open_eval_log` changes fd's 1 and 2 by default, this is a global change. + .. warning:: `Loggers.open_eval_log` changes global fd's 1 and 2 by default. """ def __init__(self): "Initialize loggers as described in class description." -- 2.39.5