OLD | NEW |
1 <!--- AUTOGENERATED BY `./recipes.py test train` --> | 1 <!--- AUTOGENERATED BY `./recipes.py test train` --> |
2 # Package documentation for [recipe\_engine](https://github.com/luci/recipes-py) | 2 # Package documentation for [recipe\_engine](https://github.com/luci/recipes-py) |
3 ## Table of Contents | 3 ## Table of Contents |
4 | 4 |
5 **[Recipe Modules](#recipe-modules)** | 5 **[Recipe Modules](#recipe-modules)** |
6 * [context](#recipe_modules--context) — The context module provides APIs
for manipulating a few pieces of 'ambient' data that affect how steps are run. | 6 * [context](#recipe_modules--context) — The context module provides APIs
for manipulating a few pieces of 'ambient' data that affect how steps are run. |
7 * [file](#recipe_modules--file) — File manipulation (read/write/delete/g
lob) methods. | 7 * [file](#recipe_modules--file) — File manipulation (read/write/delete/g
lob) methods. |
8 * [generator_script](#recipe_modules--generator_script) — A simplistic m
ethod for running steps generated by an external script. | 8 * [generator_script](#recipe_modules--generator_script) — A simplistic m
ethod for running steps generated by an external script. |
9 * [json](#recipe_modules--json) — Methods for producing and consuming JS
ON. | 9 * [json](#recipe_modules--json) — Methods for producing and consuming JS
ON. |
10 * [path](#recipe_modules--path) — All functions related to manipulating
paths in recipes. | 10 * [path](#recipe_modules--path) — All functions related to manipulating
paths in recipes. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 * [engine_tests/step_stack_exhaustion](#recipes--engine_testsstep_stack_exhaus
tion) — Tests that placeholders can't wreck the world by exhausting the st
ep stack. | 42 * [engine_tests/step_stack_exhaustion](#recipes--engine_testsstep_stack_exhaus
tion) — Tests that placeholders can't wreck the world by exhausting the st
ep stack. |
43 * [engine_tests/undeclared_method](#recipes--engine_testsundeclared_method) | 43 * [engine_tests/undeclared_method](#recipes--engine_testsundeclared_method) |
44 * [engine_tests/unicode](#recipes--engine_testsunicode) | 44 * [engine_tests/unicode](#recipes--engine_testsunicode) |
45 * [engine_tests/whitelist_steps](#recipes--engine_testswhitelist_steps) &mdash
; Tests that step_data can accept multiple specs at once. | 45 * [engine_tests/whitelist_steps](#recipes--engine_testswhitelist_steps) &mdash
; Tests that step_data can accept multiple specs at once. |
46 * [file:examples/copy](#recipes--fileexamplescopy) | 46 * [file:examples/copy](#recipes--fileexamplescopy) |
47 * [file:examples/copytree](#recipes--fileexamplescopytree) | 47 * [file:examples/copytree](#recipes--fileexamplescopytree) |
48 * [file:examples/error](#recipes--fileexampleserror) | 48 * [file:examples/error](#recipes--fileexampleserror) |
49 * [file:examples/glob](#recipes--fileexamplesglob) | 49 * [file:examples/glob](#recipes--fileexamplesglob) |
50 * [generator_script:examples/full](#recipes--generator_scriptexamplesfull) | 50 * [generator_script:examples/full](#recipes--generator_scriptexamplesfull) |
51 * [json:examples/full](#recipes--jsonexamplesfull) | 51 * [json:examples/full](#recipes--jsonexamplesfull) |
| 52 * [json:tests/add_json_log](#recipes--jsontestsadd_json_log) |
52 * [path:examples/full](#recipes--pathexamplesfull) | 53 * [path:examples/full](#recipes--pathexamplesfull) |
53 * [platform:examples/full](#recipes--platformexamplesfull) | 54 * [platform:examples/full](#recipes--platformexamplesfull) |
54 * [properties:examples/full](#recipes--propertiesexamplesfull) | 55 * [properties:examples/full](#recipes--propertiesexamplesfull) |
55 * [python:examples/full](#recipes--pythonexamplesfull) — Launches the re
po bundler. | 56 * [python:examples/full](#recipes--pythonexamplesfull) — Launches the re
po bundler. |
56 * [raw_io:examples/full](#recipes--raw_ioexamplesfull) | 57 * [raw_io:examples/full](#recipes--raw_ioexamplesfull) |
57 * [step:examples/full](#recipes--stepexamplesfull) | 58 * [step:examples/full](#recipes--stepexamplesfull) |
58 * [step:tests/active_result](#recipes--steptestsactive_result) | 59 * [step:tests/active_result](#recipes--steptestsactive_result) |
59 * [step:tests/defer](#recipes--steptestsdefer) | 60 * [step:tests/defer](#recipes--steptestsdefer) |
60 * [step:tests/inject_paths](#recipes--steptestsinject_paths) | 61 * [step:tests/inject_paths](#recipes--steptestsinject_paths) |
61 * [step:tests/nested](#recipes--steptestsnested) | 62 * [step:tests/nested](#recipes--steptestsnested) |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 read them back from inside of the recipes. | 440 read them back from inside of the recipes. |
440 * allow_subannotations: allow this step to emit legacy buildbot | 441 * allow_subannotations: allow this step to emit legacy buildbot |
441 subannotations. If you don't know what this is, you shouldn't use it. If | 442 subannotations. If you don't know what this is, you shouldn't use it. If |
442 you know what it is, you also shouldn't use it. | 443 you know what it is, you also shouldn't use it. |
443 ### *recipe_modules* / [json](/recipe_modules/json) | 444 ### *recipe_modules* / [json](/recipe_modules/json) |
444 | 445 |
445 [DEPS](/recipe_modules/json/__init__.py#L5): [properties](#recipe_modules--prope
rties), [python](#recipe_modules--python), [raw\_io](#recipe_modules--raw_io) | 446 [DEPS](/recipe_modules/json/__init__.py#L5): [properties](#recipe_modules--prope
rties), [python](#recipe_modules--python), [raw\_io](#recipe_modules--raw_io) |
446 | 447 |
447 Methods for producing and consuming JSON. | 448 Methods for producing and consuming JSON. |
448 | 449 |
449 #### **class [JsonApi](/recipe_modules/json/api.py#L80)([RecipeApi](/recipe_engi
ne/recipe_api.py#L884)):** | 450 #### **class [JsonApi](/recipe_modules/json/api.py#L83)([RecipeApi](/recipe_engi
ne/recipe_api.py#L884)):** |
450 | 451 |
451   **@[returns\_placeholder](/recipe_engine/util.py#L119)**<br>— **def
[input](/recipe_modules/json/api.py#L99)(self, data):** | 452   **@[returns\_placeholder](/recipe_engine/util.py#L119)**<br>— **def
[input](/recipe_modules/json/api.py#L102)(self, data):** |
452 | 453 |
453 A placeholder which will expand to a file path containing <data>. | 454 A placeholder which will expand to a file path containing <data>. |
454 | 455 |
455 — **def [is\_serializable](/recipe_modules/json/api.py#L91)(self, obj):** | 456 — **def [is\_serializable](/recipe_modules/json/api.py#L94)(self, obj):** |
456 | 457 |
457 Returns True if the object is JSON-serializable. | 458 Returns True if the object is JSON-serializable. |
458 | 459 |
459   **@staticmethod**<br>— **def [loads](/recipe_modules/json/api.py#L8
5)(data, \*\*kwargs):** | 460   **@staticmethod**<br>— **def [loads](/recipe_modules/json/api.py#L8
8)(data, \*\*kwargs):** |
460 | 461 |
461 Works like `json.loads`, but strips out unicode objects (replacing them | 462 Works like `json.loads`, but strips out unicode objects (replacing them |
462 with utf8-encoded str objects). | 463 with utf8-encoded str objects). |
463 | 464 |
464   **@[returns\_placeholder](/recipe_engine/util.py#L119)**<br>— **def
[output](/recipe_modules/json/api.py#L104)(self, add_json_log=True, name=None,
leak_to=None):** | 465   **@[returns\_placeholder](/recipe_engine/util.py#L119)**<br>— **def
[output](/recipe_modules/json/api.py#L107)(self, add_json_log=True, name=None,
leak_to=None):** |
465 | 466 |
466 A placeholder which will expand to '/tmp/file'. | 467 A placeholder which will expand to '/tmp/file'. |
467 | 468 |
468 If leak_to is provided, it must be a Path object. This path will be used in | 469 If leak_to is provided, it must be a Path object. This path will be used in |
469 place of a random temporary file, and the file will not be deleted at the | 470 place of a random temporary file, and the file will not be deleted at the |
470 end of the step. | 471 end of the step. |
471 | 472 |
472 — **def [read](/recipe_modules/json/api.py#L115)(self, name, path, add_jso
n_log=True, output_name=None, \*\*kwargs):** | 473 Args: |
| 474 * add_json_log (True|False|'on_failure') - Log a copy of the output json |
| 475 to a step link named `name`. If this is 'on_failure', only create this |
| 476 log when the step has a non-SUCCESS status. |
| 477 |
| 478 — **def [read](/recipe_modules/json/api.py#L123)(self, name, path, add_jso
n_log=True, output_name=None, \*\*kwargs):** |
473 | 479 |
474 Returns a step that reads a JSON file. | 480 Returns a step that reads a JSON file. |
475 ### *recipe_modules* / [path](/recipe_modules/path) | 481 ### *recipe_modules* / [path](/recipe_modules/path) |
476 | 482 |
477 [DEPS](/recipe_modules/path/__init__.py#L5): [platform](#recipe_modules--platfor
m), [properties](#recipe_modules--properties) | 483 [DEPS](/recipe_modules/path/__init__.py#L5): [platform](#recipe_modules--platfor
m), [properties](#recipe_modules--properties) |
478 | 484 |
479 All functions related to manipulating paths in recipes. | 485 All functions related to manipulating paths in recipes. |
480 | 486 |
481 Recipes handle paths a bit differently than python does. All path manipulation | 487 Recipes handle paths a bit differently than python does. All path manipulation |
482 in recipes revolves around Path objects. These objects store a base path (always | 488 in recipes revolves around Path objects. These objects store a base path (always |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1229 ### *recipes* / [generator\_script:examples/full](/recipe_modules/generator_scri
pt/examples/full.py) | 1235 ### *recipes* / [generator\_script:examples/full](/recipe_modules/generator_scri
pt/examples/full.py) |
1230 | 1236 |
1231 [DEPS](/recipe_modules/generator_script/examples/full.py#L7): [generator\_script
](#recipe_modules--generator_script), [json](#recipe_modules--json), [path](#rec
ipe_modules--path), [properties](#recipe_modules--properties), [step](#recipe_mo
dules--step) | 1237 [DEPS](/recipe_modules/generator_script/examples/full.py#L7): [generator\_script
](#recipe_modules--generator_script), [json](#recipe_modules--json), [path](#rec
ipe_modules--path), [properties](#recipe_modules--properties), [step](#recipe_mo
dules--step) |
1232 | 1238 |
1233 — **def [RunSteps](/recipe_modules/generator_script/examples/full.py#L19)(
api, script_name):** | 1239 — **def [RunSteps](/recipe_modules/generator_script/examples/full.py#L19)(
api, script_name):** |
1234 ### *recipes* / [json:examples/full](/recipe_modules/json/examples/full.py) | 1240 ### *recipes* / [json:examples/full](/recipe_modules/json/examples/full.py) |
1235 | 1241 |
1236 [DEPS](/recipe_modules/json/examples/full.py#L5): [json](#recipe_modules--json),
[path](#recipe_modules--path), [properties](#recipe_modules--properties), [pyth
on](#recipe_modules--python), [raw\_io](#recipe_modules--raw_io), [step](#recipe
_modules--step) | 1242 [DEPS](/recipe_modules/json/examples/full.py#L5): [json](#recipe_modules--json),
[path](#recipe_modules--path), [properties](#recipe_modules--properties), [pyth
on](#recipe_modules--python), [raw\_io](#recipe_modules--raw_io), [step](#recipe
_modules--step) |
1237 | 1243 |
1238 — **def [RunSteps](/recipe_modules/json/examples/full.py#L16)(api):** | 1244 — **def [RunSteps](/recipe_modules/json/examples/full.py#L16)(api):** |
| 1245 ### *recipes* / [json:tests/add\_json\_log](/recipe_modules/json/tests/add_json_
log.py) |
| 1246 |
| 1247 [DEPS](/recipe_modules/json/tests/add_json_log.py#L5): [json](#recipe_modules--j
son), [step](#recipe_modules--step) |
| 1248 |
| 1249 — **def [RunSteps](/recipe_modules/json/tests/add_json_log.py#L10)(api):** |
1239 ### *recipes* / [path:examples/full](/recipe_modules/path/examples/full.py) | 1250 ### *recipes* / [path:examples/full](/recipe_modules/path/examples/full.py) |
1240 | 1251 |
1241 [DEPS](/recipe_modules/path/examples/full.py#L5): [path](#recipe_modules--path),
[platform](#recipe_modules--platform), [properties](#recipe_modules--properties
), [step](#recipe_modules--step) | 1252 [DEPS](/recipe_modules/path/examples/full.py#L5): [path](#recipe_modules--path),
[platform](#recipe_modules--platform), [properties](#recipe_modules--properties
), [step](#recipe_modules--step) |
1242 | 1253 |
1243 — **def [RunSteps](/recipe_modules/path/examples/full.py#L14)(api):** | 1254 — **def [RunSteps](/recipe_modules/path/examples/full.py#L14)(api):** |
1244 ### *recipes* / [platform:examples/full](/recipe_modules/platform/examples/full.
py) | 1255 ### *recipes* / [platform:examples/full](/recipe_modules/platform/examples/full.
py) |
1245 | 1256 |
1246 [DEPS](/recipe_modules/platform/examples/full.py#L5): [platform](#recipe_modules
--platform), [step](#recipe_modules--step) | 1257 [DEPS](/recipe_modules/platform/examples/full.py#L5): [platform](#recipe_modules
--platform), [step](#recipe_modules--step) |
1247 | 1258 |
1248 — **def [RunSteps](/recipe_modules/platform/examples/full.py#L10)(api):** | 1259 — **def [RunSteps](/recipe_modules/platform/examples/full.py#L10)(api):** |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 | 1338 |
1328 [DEPS](/recipe_modules/url/tests/join.py#L5): [step](#recipe_modules--step), [ur
l](#recipe_modules--url) | 1339 [DEPS](/recipe_modules/url/tests/join.py#L5): [step](#recipe_modules--step), [ur
l](#recipe_modules--url) |
1329 | 1340 |
1330 — **def [RunSteps](/recipe_modules/url/tests/join.py#L11)(api):** | 1341 — **def [RunSteps](/recipe_modules/url/tests/join.py#L11)(api):** |
1331 ### *recipes* / [url:tests/validate\_url](/recipe_modules/url/tests/validate_url
.py) | 1342 ### *recipes* / [url:tests/validate\_url](/recipe_modules/url/tests/validate_url
.py) |
1332 | 1343 |
1333 [DEPS](/recipe_modules/url/tests/validate_url.py#L5): [properties](#recipe_modul
es--properties), [step](#recipe_modules--step), [url](#recipe_modules--url) | 1344 [DEPS](/recipe_modules/url/tests/validate_url.py#L5): [properties](#recipe_modul
es--properties), [step](#recipe_modules--step), [url](#recipe_modules--url) |
1334 | 1345 |
1335 — **def [RunSteps](/recipe_modules/url/tests/validate_url.py#L12)(api):** | 1346 — **def [RunSteps](/recipe_modules/url/tests/validate_url.py#L12)(api):** |
1336 | 1347 |
OLD | NEW |