Tomas Gavenciak [Wed, 12 Jan 2011 13:47:46 +0000 (14:47 +0100)]
Refactor
Changed log to global module moe.logs
Use "from moe.logs import *" to get log, userlog, testlog and pipelog.
testlog (and possibly pipelog) are pointed to different places during
run. testlog is either separate, or main log.
Tomas Gavenciak [Sat, 27 Nov 2010 13:06:07 +0000 (14:06 +0100)]
Tests for status, status.py fixes, minor changes
Tests for Status (except for Status.update)
Add status_test.py to "make test"
Status.do_read(): input from iterator of lines, implement multiline vals
Status.read(): remove default sys.stdin, adapt to do_read()
Removed "Moe" prefix from status exception name
Tomas Gavenciak [Sat, 27 Nov 2010 11:54:30 +0000 (12:54 +0100)]
Several changes in status.py, wrote docs
Documented the new semantics of status file (unique keys, multiline
entries, merge/update)
Rewrite Status to reflect docs
Renamed Status exception to MoeInvalidStatusFile
Added Status.update according to docs
Tomas Gavenciak [Fri, 24 Sep 2010 14:13:12 +0000 (16:13 +0200)]
Moving things around, WIP batch tasktype via hooks
Trying to make testutils a collection of useful functions and hooks
and to make tasktypes/batch as minimalistic as possible
(and to make writing new task types easy as well)
Tomas Gavenciak [Wed, 22 Sep 2010 21:15:18 +0000 (23:15 +0200)]
Fixed variable-list returning functions and removing operations in config.py
ConfigExpression.variables returns set instead of a list
- multiple occurences of one variable broke removing
operation from variable
Adapted and simplified ConfigVar.variables
Tomas Gavenciak [Sat, 18 Sep 2010 16:12:21 +0000 (18:12 +0200)]
Many changes to pipeline.py
Rename MoePipeline -> Pipeline
Add Eval and skip_to to Pipeline properties
Asserts when inserting to pipeline
Rewrite dump to return strings instead of writing to file
Some docstrings, clenup
Tomas Gavenciak [Sat, 11 Sep 2010 15:59:38 +0000 (17:59 +0200)]
Timeline change, multiple changes in Eval
I am sorry for this giga-commit, but it would be too much
work to split it
Update (some) docs, small timeline change
(move loading tasktype from init to pipeline)
Eval.stat -> Eval.status (cosmetic)
Add basic (builtins) and testing configuration
Eval.init fills mainline with basic hooks
Eval.init loads and initializes extensions
Increase indentation (2 by gavento -> 4 by MJ)
Write all main hooks in Eval
Eval.hook_init_tasktype loads tasktype module
It may not seem so, but most of the important
code is reused :-)
Tomas Gavenciak [Sat, 11 Sep 2010 15:55:09 +0000 (17:55 +0200)]
Moved module loading, use __import__() now
General util.load_module returns module by name.
Hook adding in pipeline removed (and distributed to
tasktype module loading and extension module loading, both in Eval)
Hooks had some problems - the hook modules have to insert self
into the pipeline, but cannot decide into which (only main) and
cannot see Eval during init() (or use the logs)
Having HOOKS with explicit timing:
HOOKS="m:8:my_main_pipeline_hook t:79:cleanup_in_test_pipeline"
would be a possibility, but a little too complex.
Extension is almost the same thing as hook (sugary name change),
but can do anything during init, can insert multiple hooks
(to both main and test pipelines), read/change configuration
and use logs.
Good extension example is fetching tasks via RSYNC or GIT.
Tomas Gavenciak [Fri, 10 Sep 2010 19:14:40 +0000 (21:14 +0200)]
Rewriting eval.py with new log, config and timeline
Moving initializaton together, remaining init_* will be called from main pipeline
Most changes are moves and rewrites - the meaning did not change much
The actions are as listed in doc/timeline
Tomas Gavenciak [Tue, 25 May 2010 01:55:07 +0000 (21:55 -0400)]
Changes to config operations structure.
Changed config operaiton from triplets to a helper class,
added operation level (as priority) instead of index and
optional source. Changed dump format.
Removal now by operation instead of index.
Test updated and passed, but still not full coverage. WIP parser test.
Tomas Gavenciak [Sun, 9 May 2010 00:31:51 +0000 (20:31 -0400)]
Imporoved and shortened conf.py code
Removed subtrees, now only one namespace
Transparent variable creation upon lookup
Implemented general condition clauses (AND, OR, NOT, ==, !=)
Conditions now have 'parent' condition (containing condition block)
Variables refer to only one condition (and indirectly its parents)
Renamed get_value -> evaluate and evaluate -> value
Improved max-depth checking
Updated the test/example (still no conditions)
pprint replaced with dump (for consistency, but still returns an iterator)
Some dovumentation (with TODO's)
Tomas Gavenciak [Fri, 7 May 2010 00:15:19 +0000 (20:15 -0400)]
New module for config evaluation. Basic testing.
Implemented:
* Configuration tree,
* Variables,
* Variable-setting operations ('SET' and 'APPEND')
* Equality conditions (WIP, not tested yet),
* Substitution expressions with text and variables,
* Pretty-printing,
* Caching for variables and conditions with invalidation along reverse-dependencies,
* Add and remove operations from variables with correct reverse-dependency handling (add and remove)
TODO: smarter conditions, variable lookup (and maybe transparent creation),
possibly cleanup of unused variables and conditions