当前位置: 首页>>代码示例>>Python>>正文


Python Bank.remove方法代码示例

本文整理汇总了Python中biomaj.bank.Bank.remove方法的典型用法代码示例。如果您正苦于以下问题:Python Bank.remove方法的具体用法?Python Bank.remove怎么用?Python Bank.remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在biomaj.bank.Bank的用法示例。


在下文中一共展示了Bank.remove方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_remove

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [as 别名]
 def test_remove(self):
   '''
   test removal of a production dir
   '''
   b = Bank('local')
   b.update()
   self.assertTrue(os.path.exists(b.session.get_full_release_directory()))
   self.assertTrue(len(b.bank['production'])==1)
   b.remove(b.session.get('release'))
   self.assertFalse(os.path.exists(b.session.get_full_release_directory()))
   b = Bank('local')
   self.assertTrue(len(b.bank['production'])==0)
开发者ID:Nurtal,项目名称:TRASHEXCHANGE,代码行数:14,代码来源:biomaj_tests.py

示例2: test_remove

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [as 别名]
 def test_remove(self):
     """
 test removal of a production dir
 """
     b = Bank("local")
     b.update()
     self.assertTrue(os.path.exists(b.session.get_full_release_directory()))
     self.assertTrue(len(b.bank["production"]) == 1)
     b.remove(b.session.get("release"))
     self.assertFalse(os.path.exists(b.session.get_full_release_directory()))
     b = Bank("local")
     self.assertTrue(len(b.bank["production"]) == 0)
开发者ID:pfem-bioinfo,项目名称:biomaj,代码行数:14,代码来源:biomaj_tests.py

示例3: test_freeze

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [as 别名]
 def test_freeze(self):
   b = Bank('local')
   b.update()
   rel = b.session.get('release')
   b.freeze(rel)
   prod = b.get_production(rel)
   self.assertTrue(prod['freeze'] == True)
   res = b.remove(rel)
   self.assertTrue(res == False)
   b.unfreeze(rel)
   prod = b.get_production(rel)
   self.assertTrue(prod['freeze'] == False)
   res = b.remove(rel)
   self.assertTrue(res == True)
开发者ID:Nurtal,项目名称:TRASHEXCHANGE,代码行数:16,代码来源:biomaj_tests.py

示例4: test_freeze

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [as 别名]
 def test_freeze(self):
     b = Bank("local")
     b.update()
     rel = b.session.get("release")
     b.freeze(rel)
     prod = b.get_production(rel)
     self.assertTrue(prod["freeze"] == True)
     res = b.remove(rel)
     self.assertTrue(res == False)
     b.unfreeze(rel)
     prod = b.get_production(rel)
     self.assertTrue(prod["freeze"] == False)
     res = b.remove(rel)
     self.assertTrue(res == True)
开发者ID:pfem-bioinfo,项目名称:biomaj,代码行数:16,代码来源:biomaj_tests.py

示例5: main

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [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]
#.........这里部分代码省略.........
开发者ID:Nurtal,项目名称:TRASHEXCHANGE,代码行数:103,代码来源:biomaj-cli.py

示例6: remove

# 需要导入模块: from biomaj.bank import Bank [as 别名]
# 或者: from biomaj.bank.Bank import remove [as 别名]
def remove(name, release, global_properties="global.properties"):
    bank = Bank(name)
    res = bank.remove(release)
    return 1
开发者ID:horkko,项目名称:biomaj-watcher,代码行数:6,代码来源:background.py


注:本文中的biomaj.bank.Bank.remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。