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


Python RoundEngine.sort_goals方法代码示例

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


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

示例1: _execute_engine

# 需要导入模块: from pants.engine.round_engine import RoundEngine [as 别名]
# 或者: from pants.engine.round_engine.RoundEngine import sort_goals [as 别名]
  def _execute_engine(self):
    engine = RoundEngine()
    sorted_goal_infos = engine.sort_goals(self._context, self._goals)
    RunTracker.global_instance().set_sorted_goal_infos(sorted_goal_infos)
    result = engine.execute(self._context, self._goals)

    if self._context.invalidation_report:
      self._context.invalidation_report.report()

    return result
开发者ID:jsirois,项目名称:pants,代码行数:12,代码来源:goal_runner.py

示例2: _execute_engine

# 需要导入模块: from pants.engine.round_engine import RoundEngine [as 别名]
# 或者: from pants.engine.round_engine.RoundEngine import sort_goals [as 别名]
  def _execute_engine(self):
    workdir = self._context.options.for_global_scope().pants_workdir
    if not workdir.endswith('.pants.d'):
      self._context.log.error('Pants working directory should end with \'.pants.d\', currently it is {}\n'
                              .format(workdir))
      return 1

    unknown_goals = [goal.name for goal in self._goals if not goal.ordered_task_names()]
    if unknown_goals:
      self._context.log.error('Unknown goal(s): {}\n'.format(' '.join(unknown_goals)))
      return 1

    engine = RoundEngine()

    sorted_goal_infos = engine.sort_goals(self._context, self._goals)
    RunTracker.global_instance().set_sorted_goal_infos(sorted_goal_infos)

    result = engine.execute(self._context, self._goals)

    if self._context.invalidation_report:
      self._context.invalidation_report.report()

    return result
开发者ID:traviscrawford,项目名称:pants,代码行数:25,代码来源:goal_runner.py


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