Beispiel #1
0
def cli(ctx, **options):
    """A tool for running parts of the update pipeline.

    This allows users run either the whole or parts of the update pipeline. It
    offers fine grained control over what gets run and how.
    """
    setup.logs(options)
    ctx.objs = options
    config = conf.load(options['config'])
    ctx.objs.update({
        'config_filename': options['config'],
        'config': config,
        'engine': create_engine(config['db']['uri'],
                                pool_size=config['db']['pool_size'],
                                max_overflow=config['db']['max_overflow'])
    })
def bootstrap(ctx, **kwargs):
    """Populate a testing database.

    To test this pipeline working copy of the database is needed. This command
    will populate a database with some default data for testing. This will not
    export interactions or loops, nor does it load the obsolete data. This will
    run 4 updates to create several nr and motif data sets to use.
    """

    kwargs.update(ctx.parent.objs)
    kwargs['config'] = conf.load('conf/bootstrap.json')
    kwargs['engine'] = create_engine(kwargs['config']['db']['uri'])
    kwargs['email'] = False
    for index, step in enumerate(BOOTSTRAPPING['steps']):
        logging.info("Running step %i", index)
        args = dict(kwargs)
        args.update(BOOTSTRAPPING['args'])
        args.update(step.get('args', {}))
        run(ctx, step['stage'], step['pdbs'], **args)
def cli(ctx, **options):
    """A tool for running parts of the update pipeline.

    This allows users run either the whole or parts of the update pipeline. It
    offers fine grained control over what gets run and how.
    """
    setup.logs(options)
    ctx.objs = options
    config = conf.load(options['config'])
    ctx.objs.update({
        'config_filename':
        options['config'],
        'config':
        config,
        'engine':
        create_engine(config['db']['uri'],
                      pool_size=config['db']['pool_size'],
                      max_overflow=config['db']['max_overflow'])
    })
Beispiel #4
0
def bootstrap(ctx, **kwargs):
    """Populate a testing database.

    To test this pipeline working copy of the database is needed. This command
    will populate a database with some default data for testing. This will not
    export interactions or loops, nor does it load the obsolete data. This will
    run 4 updates to create several nr and motif data sets to use.
    """

    kwargs.update(ctx.parent.objs)
    kwargs['config'] = conf.load('conf/bootstrap.json')
    kwargs['engine'] = create_engine(kwargs['config']['db']['uri'])
    kwargs['email'] = False
    for index, step in enumerate(BOOTSTRAPPING['steps']):
        logging.info("Running step %i", index)
        args = dict(kwargs)
        args.update(BOOTSTRAPPING['args'])
        args.update(step.get('args', {}))
        run(ctx, step['stage'], step['pdbs'], **args)
Beispiel #5
0
 def setUp(self):
     self.conf = config.load("conf/bootstrap.json.txt")