MCPcopy Create free account
hub / github.com/Codeplain-ai/codeplain / print_dry_run_output

Function print_dry_run_output

cli_output/dry_run.py:9–35  ·  view source on GitHub ↗

Print dry run output showing what would be rendered.

(plain_source_tree: dict, render_range: Optional[list[str]])

Source from the content-addressed store, hash-verified

7
8
9def print_dry_run_output(plain_source_tree: dict, render_range: Optional[list[str]]):
10 """Print dry run output showing what would be rendered."""
11 frid = plain_spec.get_first_frid(plain_source_tree)
12
13 while frid is not None:
14 is_inside_range = render_range is None or frid in render_range
15
16 if is_inside_range:
17 specifications, _ = plain_spec.get_specifications_for_frid(plain_source_tree, frid)
18 functional_requirement_text = specifications[plain_spec.FUNCTIONAL_REQUIREMENTS][-1]
19 console.info(
20 "-------------------------------------\n"
21 f"Rendering functionality {frid}:\n"
22 f"{functional_requirement_text}\n"
23 "-------------------------------------\n"
24 )
25 if plain_spec.ACCEPTANCE_TESTS in specifications:
26 for i, acceptance_test in enumerate(specifications[plain_spec.ACCEPTANCE_TESTS], 1):
27 console.info(f"Generating acceptance test #{i}:\n\n{acceptance_test}\n")
28 else:
29 console.info(
30 "-------------------------------------\n"
31 f"Skipping rendering iteration: {frid}\n"
32 "-------------------------------------"
33 )
34
35 frid = plain_spec.get_next_frid(plain_source_tree, frid)

Callers 1

mainFunction · 0.90

Calls 2

infoMethod · 0.80
get_next_fridMethod · 0.45

Tested by

no test coverage detected