gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r209788 - in /gump/branches/Gump3/pygump/python/gump: config.py engine/__init__.py
Date Fri, 08 Jul 2005 14:27:40 GMT
Author: leosimons
Date: Fri Jul  8 07:27:40 2005
New Revision: 209788

URL: http://svn.apache.org/viewcvs?rev=209788&view=rev
Log:
Some refactoring and fixing a bug where config.paths_work does not exist

Modified:
    gump/branches/Gump3/pygump/python/gump/config.py
    gump/branches/Gump3/pygump/python/gump/engine/__init__.py

Modified: gump/branches/Gump3/pygump/python/gump/config.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/config.py?rev=209788&r1=209787&r2=209788&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/config.py (original)
+++ gump/branches/Gump3/pygump/python/gump/config.py Fri Jul  8 07:27:40 2005
@@ -177,9 +177,6 @@
     The config argument provided is an instance of the _Config class that is
     returned from the get_config method below.
     """
-
-    # TODO: implement an error handler that does actual recovery...
-    
     #from gump.plugins import LoggingErrorHandler
     from gump.engine.algorithm import OptimisticLoggingErrorHandler
     log = get_logger(config, "plugin.error-handler")
@@ -248,36 +245,36 @@
 
     cache_dir = os.path.join(config.paths_work, _VFS_CACHE_DIR_NAME)
     if not os.path.isdir(cache_dir):
-        os.mkdir(cache_dir);
+        os.makedirs(cache_dir);
     return VFS(config.paths_metadata, cache_dir)
 
 
-def get_modeller_loader(log, vfs=None):
+def get_engine_loader(log, vfs=None):
     """Provide a Loader implementation."""
     from gump.engine.loader import Loader
     return Loader(log, vfs)
 
 
-def get_modeller_normalizer(log):
+def get_engine_normalizer(log):
     """Provide a Normalizer implementation."""
     from gump.engine.normalizer import Normalizer
     return Normalizer(log)
 
 
-def get_modeller_objectifier(config, log):
+def get_engine_objectifier(config, log):
     """Provide a Objectifier implementation."""
     from gump.engine.objectifier import Objectifier
     return Objectifier(log, config.paths_work)
 
 
-def get_modeller_verifier(config, walker):
+def get_engine_verifier(config, walker):
     """Provide a Verifier implementation."""
     from gump.engine.verifier import Verifier, LoggingErrorHandler
     log = get_logger(config, "verifier")
     return Verifier(walker, LoggingErrorHandler(log))
 
 
-def get_walker(config):
+def get_engine_walker(config):
     """Provide a Walker implementation."""
     from gump.engine.walker import Walker
     

Modified: gump/branches/Gump3/pygump/python/gump/engine/__init__.py
URL: http://svn.apache.org/viewcvs/gump/branches/Gump3/pygump/python/gump/engine/__init__.py?rev=209788&r1=209787&r2=209788&view=diff
==============================================================================
--- gump/branches/Gump3/pygump/python/gump/engine/__init__.py (original)
+++ gump/branches/Gump3/pygump/python/gump/engine/__init__.py Fri Jul  8 07:27:40 2005
@@ -46,11 +46,11 @@
 from gump.config import get_config
 from gump.config import get_logger
 from gump.config import get_vfs
-from gump.config import get_walker
-from gump.config import get_modeller_loader
-from gump.config import get_modeller_normalizer
-from gump.config import get_modeller_objectifier
-from gump.config import get_modeller_verifier
+from gump.config import get_engine_walker
+from gump.config import get_engine_loader
+from gump.config import get_engine_normalizer
+from gump.config import get_engine_objectifier
+from gump.config import get_engine_verifier
 from gump.config import get_dom_implementation
 from gump.config import get_plugin
 from gump.config import shutdown_logging
@@ -59,7 +59,7 @@
 from gump.util import ansicolor
 
 _ENGINE_LOGGER_NAME = "engine"
-_MODELLER_LOGGER_NAME = "modeller"
+_ENGINE_HELPER_LOGGER_NAME = "modeller"
 _MERGE_FILE_NAME = "merge.xml"
 _DROPPED_FILE_NAME = "dropped.xml"
 
@@ -104,12 +104,12 @@
     log = get_logger(config, _ENGINE_LOGGER_NAME)
     
     vfs = get_vfs(config)
-    walker = get_walker(config)
-    modeller_log = get_logger(config, _MODELLER_LOGGER_NAME)
-    modeller_loader = get_modeller_loader(modeller_log, vfs)
-    modeller_normalizer = get_modeller_normalizer(modeller_log)
-    modeller_objectifier = get_modeller_objectifier(config, modeller_log)
-    modeller_verifier = get_modeller_verifier(config, walker)
+    engine_walker = get_engine_walker(config)
+    engine_log = get_logger(config, _ENGINE_HELPER_LOGGER_NAME)
+    engine_loader = get_engine_loader(engine_log, vfs)
+    engine_normalizer = get_engine_normalizer(engine_log)
+    engine_objectifier = get_engine_objectifier(config, engine_log)
+    engine_verifier = get_engine_verifier(config, engine_walker)
     
     mergefile = os.path.join(config.paths_work, _MERGE_FILE_NAME)
     dropfile = os.path.join(config.paths_work, _DROPPED_FILE_NAME)
@@ -118,8 +118,8 @@
     (pre_process_visitor, visitor, post_process_visitor) = get_plugin(config)
     
     # create engine
-    engine = _Engine(log, modeller_loader, modeller_normalizer,
-                     modeller_objectifier, modeller_verifier, walker,
+    engine = _Engine(log, engine_loader, engine_normalizer,
+                     engine_objectifier, engine_verifier, engine_walker,
                      dom_implementation,
                      pre_process_visitor, visitor, post_process_visitor,
                      config.paths_workspace, mergefile, dropfile)



Mime
View raw message