Skip to content

Commit

Permalink
Added support for config files and pluggable kernels
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Ruths committed Mar 15, 2017
1 parent 8d88ea9 commit 2ad1504
Show file tree
Hide file tree
Showing 14 changed files with 709 additions and 338 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@
* Support for making unmarkable tasks
* Added support for task-level properties
* Added support for simple tasks (tasks with a language suffix and a single block)
* Added support for a configuration file
* Added support for pluggable kernels

### Changed

* Modularized the handling of code block implementations.
* Reimplemented entire backend execution system using class-based Kernels.

### Depricated

### Removed

* CodeImpl class and all related code is gone (replaced by xp.kernels.base et al.)

### Fixed

* A simple example analyzing world population (examples/world_pop) (Issue #10)
Expand Down
6 changes: 6 additions & 0 deletions xp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

from xp.blocks import registered_code_blocks

from xp.config import config_info, initialize_config_info

logger = logging.getLogger(os.path.basename(__file__))

LOG_LEVELS = ['DEBUG','INFO','WARN','ERROR','CRITICAL']
Expand Down Expand Up @@ -235,6 +237,7 @@ def do_run(args):
def main():
parser = argparse.ArgumentParser('xp')
parser.add_argument('-l','--log_level',choices=LOG_LEVELS,default='WARN')
parser.add_argument('-C','--config_file',default=None,help='specify a configuration file to use')
parser.add_argument('command',choices=COMMANDS)
parser.add_argument('cmd_args',nargs=argparse.REMAINDER)

Expand All @@ -244,6 +247,9 @@ def main():
log_level = eval('logging.%s' % args.log_level)
logging.basicConfig(level=log_level,format='%(levelname)s: %(message)s')

# load the configuration
initialize_config_info(args.config_file)

# run the command
logger.debug('running command: %s' % args.command)
try:
Expand Down
327 changes: 0 additions & 327 deletions xp/blocks.py

This file was deleted.

0 comments on commit 2ad1504

Please sign in to comment.