本文整理汇总了Python中schema.setup_schema函数的典型用法代码示例。如果您正苦于以下问题:Python setup_schema函数的具体用法?Python setup_schema怎么用?Python setup_schema使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setup_schema函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setup_app
def setup_app(command, conf, vars):
"""Place any commands to setup biorepo here"""
print 'load environment'
load_environment(conf.global_conf, conf.local_conf)
print 'setup schema'
setup_schema(command, conf, vars)
print 'bootstrap'
bootstrap.bootstrap(command, conf, vars)
示例2: setup_app
def setup_app(command, conf, vars):
"""Place any commands to setup SAUCE here"""
load_environment(conf.global_conf, conf.local_conf)
setup_schema(command, conf, vars)
loader = YamlLoader(model)
for filename in sorted(os.listdir(os.path.dirname(__file__) + '/data')):
if filename.endswith('.yaml'):
name = filename.lstrip('01234567890').replace('.yaml', '')
log.info('Inserting %s data...', name)
loader.loadf(model.DBSession, '%s/data/%s' % (os.path.dirname(__file__), filename))
transaction.commit()
run_tests = asbool(conf.get('websetup.run_tests', True))
if run_tests: # pragma: no cover
log.info('Running test cases for half the submissions...')
q = model.DBSession.query(model.Submission)
for submission in sample(q.all(), q.count() / 2):
submission.run_tests()
transaction.commit()
示例3: setup_app
def setup_app(command, conf, vars):
"""Place any commands to setup ebetl here"""
load_environment(conf.global_conf, conf.local_conf)
setup_schema(command, conf, vars)
bootstrap.bootstrap(command, conf, vars)