本文整理汇总了Python中biomaj.bank.Bank.list方法的典型用法代码示例。如果您正苦于以下问题:Python Bank.list方法的具体用法?Python Bank.list怎么用?Python Bank.list使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类biomaj.bank.Bank
的用法示例。
在下文中一共展示了Bank.list方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: bank_list
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import list [as 别名]
def bank_list(request):
# load_config(request)
banks = Bank.list()
bank_list = []
for bank in banks:
if can_read_bank(request, bank) and bank.get('production', None):
bank_list.append(bank)
return bank_list
示例2: bank_list
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import list [as 别名]
def bank_list(request):
#load_config(request)
banks = Bank.list()
bank_list = []
for bank in banks:
if can_read_bank(request, bank):
bank_list.append(bank)
return bank_list
示例3: main
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import list [as 别名]
def main():
parser = argparse.ArgumentParser(add_help=False)
parser.add_argument('-c', '--config', dest="config",help="Configuration file")
parser.add_argument('--check', dest="check", help="Check bank property file", action="store_true", default=False)
parser.add_argument('-u', '--update', dest="update", help="Update action", action="store_true", default=False)
parser.add_argument('--fromscratch', dest="fromscratch", help="Force a new cycle update", action="store_true", default=False)
parser.add_argument('-z', '--from-scratch', dest="fromscratch", help="Force a new cycle update", action="store_true", default=False)
parser.add_argument('-p', '--publish', dest="publish", help="Publish", action="store_true", default=False)
parser.add_argument('--unpublish', dest="unpublish", help="Unpublish", action="store_true", default=False)
parser.add_argument('--release', dest="release", help="release of the bank")
parser.add_argument('--from-task', dest="from_task", help="Start cycle at a specific task (init always executed)")
parser.add_argument('--process', dest="process", help="Linked to from-task, optionally specify a block, meta or process name to start from")
parser.add_argument('-l', '--log', dest="log", help="log level")
parser.add_argument('-r', '--remove', dest="remove", help="Remove a bank release", action="store_true", default=False)
parser.add_argument('--remove-all', dest="removeall", help="Remove all bank releases and database records", action="store_true", default=False)
parser.add_argument('--remove-pending', dest="removepending", help="Remove pending release", action="store_true", default=False)
parser.add_argument('-s', '--status', dest="status", help="Get status", action="store_true", default=False)
parser.add_argument('-b', '--bank', dest="bank", help="bank name")
parser.add_argument('--owner', dest="owner", help="change owner of the bank")
parser.add_argument('--stop-before', dest="stop_before", help="Store workflow before task")
parser.add_argument('--stop-after', dest="stop_after", help="Store workflow after task")
parser.add_argument('--freeze', dest="freeze", help="Freeze a bank release", action="store_true", default=False)
parser.add_argument('--unfreeze', dest="unfreeze", help="Unfreeze a bank release", action="store_true", default=False)
parser.add_argument('-f', '--force', dest="force", help="Force action", action="store_true", default=False)
parser.add_argument('-h', '--help', dest="help", help="Show usage", action="store_true", default=False)
parser.add_argument('--search', dest="search", help="Search by format and types", action="store_true", default=False)
parser.add_argument('--formats', dest="formats", help="List of formats to search, comma separated")
parser.add_argument('--types', dest="types", help="List of types to search, comma separated")
parser.add_argument('--query', dest="query", help="Lucene query syntax to search in index")
parser.add_argument('--show', dest="show", help="Show format files for selected bank", action="store_true", default=False)
parser.add_argument('-n', '--change-dbname', dest="newbank", help="Change old bank name to this new bank name")
parser.add_argument('-e', '--move-production-directories', dest="newdir",help="Change bank production directories location to this new path, path must exists")
parser.add_argument('--visibility', dest="visibility", help="visibility status of the bank")
parser.add_argument('--maintenance', dest="maintenance", help="Maintenance mode (on/off/status)")
parser.add_argument('--version', dest="version", help="Show version", action="store_true", default=False)
parser.add_argument('--status-ko', dest="statusko", help="Get bank in KO status", action="store_true", default=False)
options = Options()
parser.parse_args(namespace=options)
options.no_log = False
if options.help:
print('''
--config: global.properties file path
--status: list of banks with published release
[OPTIONAL]
--bank xx / bank: Get status details of bank
--status-ko: list of banks in error status (last run)
--log DEBUG|INFO|WARN|ERR [OPTIONAL]: set log level in logs for this run, default is set in global.properties file
--check: Check bank property file
[MANDATORY]
--bank xx: name of the bank to check (will check xx.properties)
--owner yy: Change owner of the bank (user id)
[MANDATORY]
--bank xx: name of the bank
--visibility public|private: change visibility public/private of a bank
[MANDATORY]
--bank xx: name of the bank
--change-dbname yy: Change name of the bank to this new name
[MANDATORY]
--bank xx: current name of the bank
--move-production-directories yy: Change bank production directories location to this new path, path must exists
[MANDATORY]
--bank xx: current name of the bank
--update: Update bank
[MANDATORY]
--bank xx: name of the bank(s) to update, comma separated
[OPTIONAL]
--publish: after update set as *current* version
--from-scratch: force a new update cycle, even if release is identical, release will be incremented like (myrel_1)
--stop-before xx: stop update cycle before the start of step xx
--stop-after xx: stop update cycle after step xx has completed
--from-task xx --release yy: Force an re-update cycle for bank release *yy* or from current cycle (in production directories), skipping steps up to *xx*
--process xx: linked to from-task, optionally specify a block, meta or process name to start from
--release xx: release to update
--publish: Publish bank as current release to use
[MANDATORY]
--bank xx: name of the bank to update
--release xx: release of the bank to publish
--unpublish: Unpublish bank (remove current)
[MANDATORY]
#.........这里部分代码省略.........
示例4: test_bank_list
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import list [as 别名]
def test_bank_list(self):
b1 = Bank('alu')
b2 = Bank('local')
banks = Bank.list()
self.assertTrue(len(banks) == 2)
示例5: test_bank_list
# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import list [as 别名]
def test_bank_list(self):
b1 = Bank("alu")
b2 = Bank("local")
banks = Bank.list()
self.assertTrue(len(banks) == 2)