本文整理匯總了Python中scripts.core.base.Paths.artifact_yaml方法的典型用法代碼示例。如果您正苦於以下問題:Python Paths.artifact_yaml方法的具體用法?Python Paths.artifact_yaml怎麽用?Python Paths.artifact_yaml使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類scripts.core.base.Paths
的用法示例。
在下文中一共展示了Paths.artifact_yaml方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: do_work
# 需要導入模塊: from scripts.core.base import Paths [as 別名]
# 或者: from scripts.core.base.Paths import artifact_yaml [as 別名]
from scripts.core.base import Printer
parser.on_parse += Printer.setup_printer
# import os
# Paths.init(os.getcwd())
# run work
with Timer.app_timer:
BinExecutor.register_sigint()
returncode = do_work(parser)
# collect artifact if not set otherwise
# parser.parse()
if parser.simple_options.artifacts:
if parser.simple_options.artifacts is True:
artifact_yml = Paths.artifact_yaml()
else:
artifact_yml = parser.simple_options.artifacts
try:
ap = ArtifactProcessor(artifact_yml)
ap.run()
except Exception as e:
# we catch all error coming from artifact system
# so it does not affect regular tests
pass
if type(returncode) is int:
sys.exit(returncode)
else:
sys.exit(returncode.returncode)