コード例 #1
0
ファイル: commands.py プロジェクト: BGSU-RNA/RNA-3D-Hub-core
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'])
    })
コード例 #2
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)
コード例 #3
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'])
    })
コード例 #4
0
ファイル: commands.py プロジェクト: BGSU-RNA/RNA-3D-Hub-core
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)
コード例 #5
0
 def setUp(self):
     self.conf = config.load("conf/bootstrap.json.txt")