Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(563)

Side by Side Diff: recipe_modules/step/config.py

Issue 2245113002: Track step nesting in StreamEngine. (Closed) Base URL: https://github.com/luci/recipes-py@emit-initial-properties
Patch Set: Rebase, comments. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « recipe_modules/step/api.py ('k') | recipes.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The LUCI Authors. All rights reserved. 1 # Copyright 2013 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed under the Apache License, Version 2.0 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # that can be found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 import collections 5 import collections
6 6
7 from recipe_engine.config import List
8 from recipe_engine.config import (config_item_context, ConfigGroup, ConfigList, 7 from recipe_engine.config import (config_item_context, ConfigGroup, ConfigList,
9 Dict, Single, Set) 8 Dict, Single, Set, List)
10 from recipe_engine.config_types import Path 9 from recipe_engine.config_types import Path
11 from recipe_engine.util import Placeholder 10 from recipe_engine.util import Placeholder
12 11
13 12
14 def BaseConfig(**_kwargs): 13 def BaseConfig(**_kwargs):
15 def render_cmd(lst): 14 def render_cmd(lst):
16 return [(x if isinstance(x, Placeholder) else str(x)) for x in lst] 15 return [(x if isinstance(x, Placeholder) else str(x)) for x in lst]
17 16
18 return ConfigGroup( 17 return ConfigGroup(
19 # For compatibility with buildbot, the step name must be ascii, which is why 18 # For compatibility with buildbot, the step name must be ascii, which is why
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 step_nest_level = Single(int, required=False), 50 step_nest_level = Single(int, required=False),
52 ) 51 )
53 52
54 53
55 config_ctx = config_item_context(BaseConfig) 54 config_ctx = config_item_context(BaseConfig)
56 55
57 @config_ctx() 56 @config_ctx()
58 def test(c): # pragma: no cover 57 def test(c): # pragma: no cover
59 c.name = 'test' 58 c.name = 'test'
60 c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')] 59 c.cmd = [Path('[CHECKOUT]', 'build', 'tools', 'cool_script.py')]
OLDNEW
« no previous file with comments | « recipe_modules/step/api.py ('k') | recipes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698