codeplain 0.4.1__py3-none-any.whl → 0.4.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: codeplain
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Transform plain language specifications into working code
5
5
  License-File: LICENSE
6
6
  Classifier: Environment :: Console
@@ -25,7 +25,7 @@ Requires-Dist: black==26.10.1; extra == 'dev'
25
25
  Requires-Dist: flake8==7.4.1; extra == 'dev'
26
26
  Requires-Dist: isort==9.0.2; extra == 'dev'
27
27
  Requires-Dist: mypy==2.4.0; extra == 'dev'
28
- Requires-Dist: pytest==9.1.1; extra == 'dev'
28
+ Requires-Dist: pytest==9.2.0; extra == 'dev'
29
29
  Description-Content-Type: text/markdown
30
30
 
31
31
  # *codeplain renderer
@@ -10,19 +10,19 @@ git_utils.py,sha256=gCUA6_9zg19f6k_0aVcRnIVlAJSBD0Vt6takx-0pKME,16547
10
10
  memory_management.py,sha256=CwIOQqF7Xo1sNfvP69zQRK_CpjinQD9dbolhRPl6lTk,2446
11
11
  metadata_utils.py,sha256=YO17o7IAma5TT1ZN0pTwrLVr_KxFQ8APv02KqKPpI5k,1641
12
12
  module_renderer.py,sha256=OvIgAorSxGwrdTZcKy4hdmNgkdJGh6z6-VzzqrTlRHs,6966
13
- partial_rendering.py,sha256=7LbLE2XoQVkR2L0TQX0iOr8-GsTy2okWsYRd3P49pqU,15205
13
+ partial_rendering.py,sha256=7rQu0EE1H8JND-uePovdKfiQHGfdQncDyepwup7QBSY,15742
14
14
  path_resolution.py,sha256=0tMqU0a1g4DYhTOp7QjLVSEkv_cgasb4NI1mK809dUM,2233
15
- plain2code.py,sha256=HYhUaZK37kMUHRX2LnuJfBDDLgTZWo0t7lOXzu5Yui4,23814
16
- plain2code_arguments.py,sha256=3PvJg1otzH5GtQGkaP4LQD6xzsCAFtq2-Ohv82hOz3Q,20515
15
+ plain2code.py,sha256=FgQNaT12xhyoojJfLcyzigJtwPQfX6PZEOSQWYsAInE,24026
16
+ plain2code_arguments.py,sha256=tP7OQK0JhccZC7d6PWLmIeXctp-FO48e0tGuJUDq8es,21133
17
17
  plain2code_console.py,sha256=YGBONkQtwZUkrjxTKhqcBoRzW0EmSfYHPH8P4_FM60I,6040
18
- plain2code_events.py,sha256=rgDF5PDtNr_lEPvJmd1tIQXZrzwgzZW5b-_pykugqe4,1587
18
+ plain2code_events.py,sha256=QnugBgO1baTe4kj2V3LUnkMDzhmksKwPDFuOKfH9g5o,1738
19
19
  plain2code_exceptions.py,sha256=zlszHIhaPWPN4fvYQibMIDM7f1xsW5J8sEWTOosIUGc,2068
20
20
  plain2code_logger.py,sha256=YQ-ENYBHKXROVv6Q52xh7eXrFkj_3Lex__N9zfxlw9Y,5729
21
21
  plain2code_nodes.py,sha256=QCC9RYBBfHycahvYovcN414sRlGL-dqRV3Baeu7KPkw,140
22
22
  plain2code_read_config.py,sha256=D5CxnmTRjddupecWvstcUm0kIJWWzq5-Zmk6sU0wbIg,2235
23
- plain2code_state.py,sha256=jIo4knKI99C1xkX1E_OaD3pdS9pczI2h9wofDjifMvE,3348
23
+ plain2code_state.py,sha256=Qai9kfsvQ2IYSQ31EyITkqCwlFm_rhO-sO12Y1CCOeA,3615
24
24
  plain2code_telemetry.py,sha256=NO8zw1i3ucM6Z9xQoSCeWqC5Hr-9Oql58YtgEOhBnaQ,4683
25
- plain2code_utils.py,sha256=GKAUA0sGfYsMAge81hJotPLsfB2akCVN70Bpw_0qrH0,1615
25
+ plain2code_utils.py,sha256=luhiWaE0bXPQvjNDj-VYwxcGBq9vhvuqQCL_xgpq814,2093
26
26
  plain_file.py,sha256=50CevjRihjddXbc3WzKKJF_kaVcMHUJ1FH2HJUZawT8,138
27
27
  plain_modules.py,sha256=3xc6tYbWB17YWIG9SfZ_SKYX3hnoC5y_n5RyaN9Lec0,28903
28
28
  plain_spec.py,sha256=AhDbw4GSQ95wC8fkFSPG66MsCu-37Kcz8Skcj66fQhA,1262
@@ -41,7 +41,7 @@ render_machine/agent_tools.py,sha256=Kp2g9GphV7oA9MbOHctKp0UJJJUOgcfCz2SeW9NL6jg
41
41
  render_machine/code_renderer.py,sha256=ZmisVQHVtI1rBN1qdywW-H_hNeUzVELkHUdApGReYjY,3795
42
42
  render_machine/conformance_tests.py,sha256=PNTCnJNd_xNIhpTPPS8vlx8qws3cTgQSTLdADRab2YM,9617
43
43
  render_machine/implementation_code_helpers.py,sha256=Fxm-IInoZjAIZn41_-WXWj7VIYczpW4yH44Gt8CYMAQ,2378
44
- render_machine/render_context.py,sha256=lDhDb7trL8_WeWXznxpNr2SFxAzfk9oo9f_AE7Get10,28690
44
+ render_machine/render_context.py,sha256=-0Ma2DtBQRe4OwsoKi67ERfa_75fexI__vAnUy3_s2g,29133
45
45
  render_machine/render_types.py,sha256=JFROBuTxxDfoSzZpGbucJUYQWa_55HsaOoWIZuZSJ3k,11413
46
46
  render_machine/render_utils.py,sha256=yA3X15E_Lebk_-MxkSz9rM_qy-Pes8EQ9Ye-smkHCDw,9320
47
47
  render_machine/state_machine_config.py,sha256=0pL4PyrZ5F2UumvHLMRfhyh64M4pDvf-9zEs-5OAEU8,27866
@@ -61,7 +61,7 @@ render_machine/actions/prepare_repositories.py,sha256=HyZ1R6E3H5V-G4WDSGfhxl_ars
61
61
  render_machine/actions/prepare_testing_environment.py,sha256=kIsXgV6-jOlqp-04cimPgTQoHPrVIu0zW-H_Jj-jowE,2106
62
62
  render_machine/actions/refactor_code.py,sha256=G2GSJ-xg8ducbcy2wlAKzxyJ-2vAq8rRftRQksjJLZY,2792
63
63
  render_machine/actions/render_conformance_tests.py,sha256=XHJLZrqU-mf2rbMCqHtBTnkcXLIkHJ6Eztnk1X3K7ws,10819
64
- render_machine/actions/render_functional_requirement.py,sha256=DXmwfelfQsq_AY5gudzm9T55wzneb1zP4nG40acmD_s,5304
64
+ render_machine/actions/render_functional_requirement.py,sha256=Kyi2CD7pp4Y7Albys5gFfXW3BGden8W3cvFyr-wHIBU,5660
65
65
  render_machine/actions/run_conformance_tests.py,sha256=hjIkqySveY50Xo3Kdb4zchyqxFdKyuMSHsEH9yLZj9E,3764
66
66
  render_machine/actions/run_unit_tests.py,sha256=j0qsHMLy49I_DX5QLlH0OdPT6bPMc0icmVg2N5MYm9U,2711
67
67
  render_machine/actions/summarize_conformance_tests.py,sha256=4ldc5JAjQXvxEVBshw07ZOboE3SIWb_DjPFKgfyzuZc,1765
@@ -82,32 +82,34 @@ tests/test_console_log_styles.py,sha256=sxlhynMAP-kmqhBn1-pKvZXdCnlKSyCGJqwYKrh6
82
82
  tests/test_dependency_pins.py,sha256=D_c5sb7ikwuV4zy8trB0DDzwNLkhAX221X67atLA-ec,1864
83
83
  tests/test_distill_conformance_test_memory.py,sha256=Tftw9l-gLVwIU6QttY03h2VedvuFxpIsCmZIzvWfxMA,5481
84
84
  tests/test_dry_run_link_validation.py,sha256=0Ca7v4DHMPBVmmBLWr2AHk4xVHzdOS2PHiPdumgpWkM,2154
85
+ tests/test_exit_when_done.py,sha256=eQeAjZaScqw93liajuYZ1XAIhZX-NpjWMeBXKSazedU,5594
85
86
  tests/test_file_utils.py,sha256=RPab1wBsbE7XAPGync56WveFVnRvafFVRia1a2mMQhk,4490
86
87
  tests/test_fix_unit_tests_action.py,sha256=sNLpg1T586TSPyvhjJcTe-4C9P8iHEkt8zx5z4MJ7po,11446
87
88
  tests/test_fix_unit_tests_conformance_context.py,sha256=G6-_YMhN5BY1sJ7cAx3BDnf_McgFcRpyP0iP6mwJ1eA,13154
88
89
  tests/test_folder_path_resolution.py,sha256=K9v684xkPE0HOAsovg8uDixpZmaIk7ho-Wd3rTjKLF0,6560
89
90
  tests/test_frid_arguments.py,sha256=zIEU2HGgJU4YOY2DXkjO9MmTlIUk4Iu5dfEU9OwKbak,1264
91
+ tests/test_functionality_position.py,sha256=QQdhIqZhRC8-30xKZPyOye6dm8kSkJnja4PB53iZkeE,3540
90
92
  tests/test_functionality_without_scenarios.py,sha256=kFBqu9UQ7JdIJCs6z5Hu0xsv9YskBXhkEKBKcdN0tvI,2832
91
93
  tests/test_git_preflight.py,sha256=6aQqInDzpk03pS-6UfkGQWjErrIXTEdHs5oeq3ZYzTw,3186
92
94
  tests/test_git_utils.py,sha256=hvNzIYNSFXF4nWpN6HIo4h21zLDCUx8ZmrFp1GR_S70,15721
93
95
  tests/test_headless_logging.py,sha256=soNESeotKQaU-SQyxtjpq35l-dLVsauZ_lJ-wk9i2mI,6419
94
96
  tests/test_log_file_name_resolution.py,sha256=99g9NgPF-BZ98CvNyqDcltBAx4sLBE8gpQPAAieKiPc,3619
95
97
  tests/test_logging_config_path_resolution.py,sha256=avz_ehRd18INwIXvAy1AwVzNNUz0vS8eu1nRe0bra8g,2650
96
- tests/test_partial_rendering.py,sha256=_dOWnedG8iUB-Kj9r8hqRIRSUux3PNsSNVA1ta2Ull0,23800
98
+ tests/test_partial_rendering.py,sha256=54rCzqRJqHgv6PtSS2C_yVebYurXyuJ7sVurNIIAKZ4,25630
97
99
  tests/test_path_resolution.py,sha256=yQpd-Unq1lwNv0wkRPwVs5pDT8JmyyDgbpiTQsyt--Y,2615
98
100
  tests/test_plain2code.py,sha256=BKLIBOc3tON2fODm1ETdPZZkZMbSrvbIG54EWJcKcmE,3411
99
101
  tests/test_plain2code_state.py,sha256=O-sDt4F_lF6XtanWKWfh5IsNmDdfuJP_JoGagujzdfM,1440
100
102
  tests/test_plain2code_utils.py,sha256=MXAYsWMY_7Vb4im2ZJK46Gsq1ApIjuGkQAEmUz0ISOY,1665
101
103
  tests/test_plain_modules.py,sha256=fc7__5jSfr6CLh92IQDUdkOS9qkS1XRFmGXPj76v4Xs,33698
102
104
  tests/test_prepare_repositories_layout.py,sha256=PhJQLnHfjfjo6CTWoicyEKgL0_GtjwB2OKYAWSBVHtk,14638
103
- tests/test_render_finished_report.py,sha256=Z7FFQ1uiHkZubr4ElFq2KXEYT9niXVq1fSlehnJJwRE,7735
105
+ tests/test_render_finished_report.py,sha256=aL67ygPglfkOT3sbqlP9wOgG_sKgYdTBMOfVK7is5G8,9283
104
106
  tests/test_render_range.py,sha256=N4XS6zQbQmDlQmUvl6vhqLL7VcczET65GG1DWypP-k0,1832
105
107
  tests/test_render_stop_reason.py,sha256=jBofHzbEQFZlPcczT_7azsCnzh9hnEsLmxbB1IGhGxQ,8602
106
108
  tests/test_resolve_config_file.py,sha256=b87tDOvyzbsnE-QRWbZ97ou7NuyaAgskv-dbYBum31c,2830
107
109
  tests/test_script_path_resolution.py,sha256=tiEqMevQRXr9YpfHN0xldOOQpLAUgnSqTzeZWkKHaUY,4156
108
110
  tests/test_system_config.py,sha256=gH5qs9q4lh5CljAdz28HUrJzuKqCvkZherFuv7enMak,2787
109
111
  tests/test_telemetry.py,sha256=lRm-Z7g2-33CFEkTJHLSUsOpltSnD47gyUoPCRD9SHQ,8153
110
- tests/test_terminal_attachment.py,sha256=AnQzBI3IcxL3f7z_V4XzrzeihVJ1qWKj43Wh7Mue_pk,10503
112
+ tests/test_terminal_attachment.py,sha256=-yssQKLfE-PcOnBIoNJjjXISqjjZvePb74ZwW_TvJJ4,10533
111
113
  tests/test_tests_folders.py,sha256=o_6GMObbqweEDi1cfx6V8UFOGCafbUQcEVu_DSfW1Ns,3249
112
114
  tests/test_traceability_warnings.py,sha256=dqaDrzEaGgYFYdxkcJvdTjaLdP5qkl2YdIgTby7Uq9I,2304
113
115
  tests/test_tui_components.py,sha256=O_PB6z_Xt7YWebsD21b99PVgFtqq5c03lVtYytIT5Ps,6200
@@ -118,16 +120,16 @@ tests/e2e/conftest.py,sha256=5Dm67UTOE-M6hMb-mqZvwa6Ek_wmZgsR7fUv9ZEqCwY,4164
118
120
  tests/e2e/test_hello_world_python.py,sha256=2Cgs3-79dtQh5gVab257tFDHXTznefZeYqbTjlM4Nng,1632
119
121
  tests/e2e/test_hello_world_python_windows.py,sha256=ggynH_Wm4011M500zoPNNgvD-s4vZ3hvlorf1yARgQQ,2019
120
122
  tui/__init__.py,sha256=_fy7FowY0RkWdn4kC7XV2jgvQPCj-2gE8fNUb-Mny0A,60
121
- tui/components.py,sha256=tAgP7paI8bR6XAWOWyiUsKexRurEx1CNz_4z81Ty0G4,27195
123
+ tui/components.py,sha256=w3_MTFRqX_ZSFbFWHZbUQE9yZYcAK2qed0QB5ZH5E7c,27697
122
124
  tui/models.py,sha256=KMjlWubmPD41GA-BjgiqkaV9v7tLJ0fuWKBDPmZj4JA,1493
123
- tui/plain2code_tui.py,sha256=b6FOEXt_dcVhpfOrAHvg-Rvn0bSH18moy5zmUaz3NS4,17552
125
+ tui/plain2code_tui.py,sha256=vRHrB-9MWlttukvMCxv8UwrEjZJPLwD3FBcLMwhdFGY,18537
124
126
  tui/plain_module_render_choice_tui.py,sha256=dWmgpEEKlKijTDK-WQ3ks4EgZqICyQ73_BWDTASzEBk,12116
125
127
  tui/spinner.py,sha256=Ro6Gd9Przf-whuHqPRY6HwI0T57yJjyNPbhDbigZKZE,2471
126
- tui/state_handlers.py,sha256=SCAcBXLgGhpVFBLrTL76g7Z507q4fLgSwYkGiwAMLRc,16067
128
+ tui/state_handlers.py,sha256=5FkF13mCLYAOgpYnzR932U3tYxSnMkCu5jybMFEBVe4,16264
127
129
  tui/styles.css,sha256=kiC7Og_2G1E7owoiZgV95-3_dSeQnsNj3qzaY04xkDg,6727
128
130
  tui/widget_helpers.py,sha256=jitm2WHiKj-NVFL-hULxWzckPreRbUTl9OIZLN31-ek,6997
129
- codeplain-0.4.1.dist-info/METADATA,sha256=p_6ntZcJ6AqM_j3nuFPZnYSPud1HXtTydMCvoly-_QA,7254
130
- codeplain-0.4.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
131
- codeplain-0.4.1.dist-info/entry_points.txt,sha256=oDZkBqu9WhtZApb_K6ia8-fn9aojwmAsgnKELceX5T4,46
132
- codeplain-0.4.1.dist-info/licenses/LICENSE,sha256=pCeKgQ1mXE5OmNUuKOfOZh1T1vqkeCUxghE7N8qgnzc,11345
133
- codeplain-0.4.1.dist-info/RECORD,,
131
+ codeplain-0.4.2.dist-info/METADATA,sha256=zFPJ8VpWYFvBqgHWD5XQ-wQ6w-2vbY5i46JVu9Kr5e0,7254
132
+ codeplain-0.4.2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
133
+ codeplain-0.4.2.dist-info/entry_points.txt,sha256=oDZkBqu9WhtZApb_K6ia8-fn9aojwmAsgnKELceX5T4,46
134
+ codeplain-0.4.2.dist-info/licenses/LICENSE,sha256=pCeKgQ1mXE5OmNUuKOfOZh1T1vqkeCUxghE7N8qgnzc,11345
135
+ codeplain-0.4.2.dist-info/RECORD,,
partial_rendering.py CHANGED
@@ -237,7 +237,6 @@ def change_is_only_future_work(
237
237
  def _resume_render_choice(
238
238
  plain_module: PlainModule,
239
239
  plain_module_render_state: PlainModuleRenderState,
240
- force_render: bool,
241
240
  ) -> RenderChoice:
242
241
  """The natural next step from the last-rendered position when no decision is needed:
243
242
  start an unrendered module, continue a partially-rendered one, or advance to the next.
@@ -261,8 +260,7 @@ def _resume_render_choice(
261
260
  render_range = plain_spec.get_render_range_from(next_frid, next_module.plain_source)
262
261
  return RenderChoice(
263
262
  module=next_module,
264
- render_range=None if force_render else render_range,
265
- wipe_later_modules=force_render,
263
+ render_range=render_range,
266
264
  choice_type="continue_from_frid",
267
265
  )
268
266
 
@@ -280,6 +278,21 @@ def get_render_choices(
280
278
  plain_module_render_state: PlainModuleRenderState,
281
279
  force_render: bool = False,
282
280
  ) -> dict[str, RenderChoice]:
281
+ if force_render:
282
+ # --force-render re-renders the whole chain from the first module, whatever changed and
283
+ # wherever the last render stopped. There is nothing to decide, so a single choice is
284
+ # returned and the user is not asked.
285
+ first_module = plain_module.all_required_modules[0] if plain_module.all_required_modules else plain_module
286
+ return {
287
+ "1": RenderChoice(
288
+ module=first_module,
289
+ render_range=None,
290
+ choice_type="rerender_from_first",
291
+ wipe_later_modules=True,
292
+ is_destructive=True,
293
+ )
294
+ }
295
+
283
296
  render_choices = list[RenderChoice]()
284
297
  module_start_points = list[str]()
285
298
 
@@ -298,7 +311,7 @@ def get_render_choices(
298
311
  # Continue / resume from the last-rendered position. The change-driven blocks below decide
299
312
  # the start otherwise — once a change touches already-rendered work, resuming from the old
300
313
  # position would build on stale code.
301
- render_choices.append(_resume_render_choice(plain_module, plain_module_render_state, force_render))
314
+ render_choices.append(_resume_render_choice(plain_module, plain_module_render_state))
302
315
 
303
316
  else:
304
317
  # change is set here (otherwise treat_as_continue would be True), so change_type is always
plain2code.py CHANGED
@@ -375,10 +375,11 @@ def render( # noqa: C901
375
375
  render_choices = get_render_choices(plain_module, plain_module_render_state, args.force_render)
376
376
  ask_user = True
377
377
  render_choice = None
378
- if len(render_choices) <= 2:
379
- # Last choice is Quit, first choice is the only other actionable choice
378
+ if args.force_render or len(render_choices) <= 2:
379
+ # With --force-render there is a single choice. Otherwise the last choice is Quit,
380
+ # so the first choice is the only other actionable one.
380
381
  render_choice = render_choices[list(render_choices.keys())[0]]
381
- ask_user = render_choice.is_destructive
382
+ ask_user = render_choice.is_destructive and not args.force_render
382
383
 
383
384
  if ask_user and not args.headless:
384
385
  app = PlainModuleRenderChoiceTUI(
@@ -452,6 +453,7 @@ def render( # noqa: C901
452
453
  enter_pause_event=enter_pause_event,
453
454
  on_cancel=run_state.set_render_cancelled,
454
455
  default_log_level=default_log_level,
456
+ exit_when_done=args.exit_when_done,
455
457
  css_path="styles.css",
456
458
  )
457
459
  app.run()
@@ -590,7 +592,7 @@ def main(): # noqa: C901
590
592
  print_exit_summary(
591
593
  run_state,
592
594
  args.filename,
593
- error_message=error_message,
595
+ error_message=error_message or run_state.render_error_message,
594
596
  )
595
597
  # Remove any scratch extractions created for archive-only ("<module>.module") modules.
596
598
  for module in plain_module.all_required_modules + [plain_module]:
plain2code_arguments.py CHANGED
@@ -352,7 +352,8 @@ def create_parser():
352
352
  "--force-render",
353
353
  action="store_true",
354
354
  default=False,
355
- help="Force re-render of all the required modules.",
355
+ help="Render every module of the project again, from the first one. "
356
+ "The client does not ask where to start and the code rendered before is replaced.",
356
357
  )
357
358
 
358
359
  _add_arg(
@@ -510,6 +511,17 @@ def create_parser():
510
511
  "Used automatically when stdin, stdout or stderr is not a terminal.",
511
512
  )
512
513
 
514
+ _add_arg(
515
+ parser,
516
+ "--exit-when-done",
517
+ action=argparse.BooleanOptionalAction,
518
+ default=False,
519
+ help="Close the terminal interface as soon as rendering stops, instead of keeping it open "
520
+ "until you press Enter. The render summary is printed to the terminal as usual. "
521
+ "Use --no-exit-when-done to keep the interface open when config.yaml turns this on. "
522
+ "Headless rendering always ends by itself, so the option changes nothing there.",
523
+ )
524
+
513
525
  parser.add_argument(
514
526
  "--status",
515
527
  action="store_true",
plain2code_events.py CHANGED
@@ -22,6 +22,8 @@ class RenderContextSnapshot:
22
22
  unit_tests_running_context: Optional[UnitTestsRunningContext]
23
23
  script_execution_history: Optional[ScriptExecutionHistory]
24
24
  module_name: str
25
+ # Where the functionality stands among those of its module, as "3/12". None before one is picked.
26
+ functionality_position: Optional[str] = None
25
27
 
26
28
 
27
29
  @dataclass
plain2code_state.py CHANGED
@@ -12,6 +12,8 @@ class RunState:
12
12
  self.replay: bool = replay_with is not None
13
13
  self.render_succeeded: bool = False
14
14
  self.render_cancelled: bool = False
15
+ # Why the render failed, as the TUI showed it; printed in the summary after the TUI closes.
16
+ self.render_error_message: Optional[str] = None
15
17
  self.render_generated_code_path: Optional[str] = None
16
18
  self.rendered_functionalities: int = 0
17
19
  if replay_with:
@@ -39,6 +41,9 @@ class RunState:
39
41
  def set_render_succeeded(self, succeeded: bool):
40
42
  self.render_succeeded = succeeded
41
43
 
44
+ def set_render_error_message(self, error_message: str):
45
+ self.render_error_message = error_message
46
+
42
47
  def set_render_cancelled(self):
43
48
  self.render_cancelled = True
44
49
 
plain2code_utils.py CHANGED
@@ -31,6 +31,18 @@ AMBIGUITY_CAUSES = {
31
31
  }
32
32
 
33
33
 
34
+ def functionality_position(frids: list[str], frid: Optional[str]) -> Optional[str]:
35
+ """Where a functionality stands among the functionalities of its module, as "3/12".
36
+
37
+ The count is over every functionality of the module, not over a render range, so the number
38
+ says where the render is in the specification whatever part of it was asked for.
39
+ """
40
+ if frid is None or frid not in frids:
41
+ return None
42
+
43
+ return f"{frids.index(frid) + 1}/{len(frids)}"
44
+
45
+
34
46
  def qualified_frid(module_name: Optional[str], frid: Optional[str]) -> Optional[str]:
35
47
  """A functionality named as `<module>:<func-id>`.
36
48
 
@@ -19,6 +19,21 @@ class RenderFunctionalRequirement(BaseAction):
19
19
  FUNCTIONAL_REQUIREMENT_TOO_COMPLEX_OUTCOME = "functional_requirement_too_complex"
20
20
  ITERATION_LIMIT_EXCEEDED_OUTCOME = "frid_iteration_limit_exceeded"
21
21
 
22
+ @staticmethod
23
+ def functionality_heading(render_context) -> str:
24
+ """The block logged when a functionality starts: its module, its ID, and where it stands."""
25
+ msg = "-------------------------------------\n"
26
+ msg += f"Module: {render_context.module_name}\n"
27
+ msg += f"Rendering functionality {render_context.frid_context.frid}"
28
+ position = render_context.current_functionality_position()
29
+ if position:
30
+ msg += f" ({position})"
31
+ if render_context.frid_context.functional_requirement_render_attempts > 1:
32
+ msg += f", attempt number {render_context.frid_context.functional_requirement_render_attempts}/{MAX_CODE_GENERATION_RETRIES}"
33
+ msg += f":\n{render_context.frid_context.functional_requirement_text}\n"
34
+ msg += "-------------------------------------"
35
+ return msg
36
+
22
37
  def execute(self, render_context: RenderContext, _previous_action_payload: Any | None):
23
38
  if render_context.frid_context.functional_requirement_render_attempts >= MAX_CODE_GENERATION_RETRIES:
24
39
  # A render attempt is only restarted once its unit tests used up every fix round.
@@ -49,14 +64,7 @@ class RenderFunctionalRequirement(BaseAction):
49
64
  )
50
65
  _, memory_files_content = MemoryManager.fetch_memory_files(render_context.memory_manager.memory_folder)
51
66
 
52
- msg = "-------------------------------------\n"
53
- msg += f"Module: {render_context.module_name}\n"
54
- msg += f"Rendering functionality {render_context.frid_context.frid}"
55
- if render_context.frid_context.functional_requirement_render_attempts > 1:
56
- msg += f", attempt number {render_context.frid_context.functional_requirement_render_attempts}/{MAX_CODE_GENERATION_RETRIES}"
57
- msg += f":\n{render_context.frid_context.functional_requirement_text}\n"
58
- msg += "-------------------------------------"
59
- console.info(msg)
67
+ console.info(self.functionality_heading(render_context))
60
68
 
61
69
  try:
62
70
  render_utils.print_inputs(render_context, existing_files_content, "Files sent as input to code generation:")
@@ -10,7 +10,7 @@ from event_bus import EventBus
10
10
  from plain2code_console import RETRY_COLOR, console
11
11
  from plain2code_events import RenderContextSnapshot
12
12
  from plain2code_state import RunState
13
- from plain2code_utils import qualified_frid
13
+ from plain2code_utils import functionality_position, qualified_frid
14
14
  from plain_modules import PlainModule
15
15
  from render_machine import triggers
16
16
  from render_machine.conformance_tests import CONFORMANCE_TESTS_DEFINITION_FILE_NAME, ConformanceTests
@@ -122,6 +122,13 @@ class RenderContext:
122
122
  self.last_error_message = error_message
123
123
  self.machine.dispatch(triggers.HANDLE_ERROR)
124
124
 
125
+ def current_functionality_position(self) -> Optional[str]:
126
+ """Where the functionality being implemented stands among those of its module, as "3/12"."""
127
+ return functionality_position(
128
+ list(plain_spec.get_frids(self.plain_source_tree)),
129
+ self.frid_context.frid if self.frid_context else None,
130
+ )
131
+
125
132
  def create_snapshot(self) -> RenderContextSnapshot:
126
133
  return RenderContextSnapshot(
127
134
  frid_context=deepcopy(self.frid_context) if self.frid_context else None,
@@ -133,6 +140,7 @@ class RenderContext:
133
140
  ),
134
141
  script_execution_history=deepcopy(self.script_execution_history),
135
142
  module_name=self.module_name,
143
+ functionality_position=self.current_functionality_position(),
136
144
  )
137
145
 
138
146
  def get_required_modules_functionalities(self):
@@ -0,0 +1,151 @@
1
+ """Tests for --exit-when-done: the TUI closes by itself once rendering has stopped."""
2
+
3
+ import asyncio
4
+ import threading
5
+
6
+ import pytest
7
+
8
+ from event_bus import EventBus
9
+ from plain2code_arguments import create_parser, parse_arguments
10
+ from plain2code_events import LogMessageEmitted, RenderCompleted, RenderFailed
11
+ from plain2code_state import RunState
12
+ from tui.plain2code_tui import Plain2CodeTUI
13
+
14
+
15
+ def _make_app(run_state: RunState, event_bus: EventBus, exit_when_done: bool, on_ready=lambda: None) -> Plain2CodeTUI:
16
+ return Plain2CodeTUI(
17
+ event_bus=event_bus,
18
+ run_state=run_state,
19
+ on_ready=on_ready,
20
+ render_id="test-render-id",
21
+ unittests_script=None,
22
+ conformance_tests_script=None,
23
+ prepare_environment_script=None,
24
+ state_machine_version="0.0.0",
25
+ exit_when_done=exit_when_done,
26
+ css_path="styles.css",
27
+ )
28
+
29
+
30
+ def _run(exit_when_done: bool, event) -> bool:
31
+ """Publish ``event`` to a mounted TUI and report whether the TUI closed itself."""
32
+
33
+ async def scenario() -> bool:
34
+ event_bus = EventBus()
35
+ run_state = RunState(spec_filename="x.plain")
36
+ app = _make_app(run_state, event_bus, exit_when_done)
37
+ async with app.run_test() as pilot:
38
+ event_bus.publish(event)
39
+ await pilot.pause()
40
+ return app._exit
41
+
42
+ return asyncio.run(scenario())
43
+
44
+
45
+ def test_tui_closes_itself_when_rendering_completes():
46
+ assert _run(True, RenderCompleted(rendered_code_path="plain_modules/x/")) is True
47
+
48
+
49
+ def test_tui_closes_itself_when_rendering_fails():
50
+ assert _run(True, RenderFailed(error_message="Conformance tests failed")) is True
51
+
52
+
53
+ def test_tui_keeps_the_failure_reason_for_the_summary():
54
+ """The TUI closes right away, so the reason it showed must survive on the run state."""
55
+
56
+ async def scenario() -> RunState:
57
+ event_bus = EventBus()
58
+ run_state = RunState(spec_filename="x.plain")
59
+ app = _make_app(run_state, event_bus, True)
60
+ async with app.run_test() as pilot:
61
+ event_bus.publish(RenderFailed(error_message="Conformance tests failed"))
62
+ await pilot.pause()
63
+ return run_state
64
+
65
+ assert asyncio.run(scenario()).render_error_message == "Conformance tests failed"
66
+
67
+
68
+ def test_tui_waits_for_the_user_without_the_option():
69
+ assert _run(False, RenderCompleted(rendered_code_path="plain_modules/x/")) is False
70
+ assert _run(False, RenderFailed(error_message="Conformance tests failed")) is False
71
+
72
+
73
+ def test_tui_closes_itself_when_the_render_thread_reports_completion():
74
+ """The render runs in its own thread, so the completion event reaches the TUI from there."""
75
+
76
+ async def scenario() -> bool:
77
+ event_bus = EventBus()
78
+ run_state = RunState(spec_filename="x.plain")
79
+ app = _make_app(run_state, event_bus, True)
80
+ async with app.run_test() as pilot:
81
+ thread = threading.Thread(
82
+ target=lambda: event_bus.publish(RenderCompleted(rendered_code_path="plain_modules/x/"))
83
+ )
84
+ thread.start()
85
+ thread.join()
86
+ await pilot.pause()
87
+ return app._exit
88
+
89
+ assert asyncio.run(scenario()) is True
90
+
91
+
92
+ def _log(message: str) -> LogMessageEmitted:
93
+ return LogMessageEmitted(logger_name="codeplain", level="INFO", message=message, timestamp="00:00:01")
94
+
95
+
96
+ @pytest.mark.parametrize(
97
+ "event", [RenderCompleted(rendered_code_path="plain_modules/x/"), RenderFailed(error_message="x")]
98
+ )
99
+ def test_tui_closes_cleanly_while_log_lines_are_still_arriving(event):
100
+ """Log lines reach the TUI from the render thread right up to (and past) the final event.
101
+
102
+ Entries still waiting to be drawn when the TUI closes must not crash it: before the fix,
103
+ mounting them into the torn-down log view raised MountError, which run_test re-raises.
104
+ """
105
+
106
+ async def scenario() -> bool:
107
+ event_bus = EventBus()
108
+ run_state = RunState(spec_filename="x.plain")
109
+
110
+ def render():
111
+ for i in range(20):
112
+ event_bus.publish(_log(f"step {i}"))
113
+ event_bus.publish(event)
114
+ for i in range(20):
115
+ event_bus.publish(_log(f"after {i}"))
116
+
117
+ # Started from on_ready, exactly as plain2code.render() starts the render thread.
118
+ render_thread = threading.Thread(target=render, daemon=True)
119
+ app = _make_app(run_state, event_bus, True, on_ready=render_thread.start)
120
+ async with app.run_test() as pilot:
121
+ for _ in range(100):
122
+ if app._exit and not render_thread.is_alive():
123
+ break
124
+ await pilot.pause(0.01)
125
+ return app._exit
126
+
127
+ assert asyncio.run(scenario()) is True
128
+
129
+
130
+ def test_option_is_off_by_default():
131
+ args = create_parser().parse_args(["x.plain"])
132
+ assert args.exit_when_done is False
133
+
134
+
135
+ def test_option_turns_on_from_the_command_line():
136
+ args = create_parser().parse_args(["x.plain", "--exit-when-done"])
137
+ assert args.exit_when_done is True
138
+
139
+
140
+ def test_option_turns_off_from_the_command_line():
141
+ args = create_parser().parse_args(["x.plain", "--no-exit-when-done"])
142
+ assert args.exit_when_done is False
143
+
144
+
145
+ def test_command_line_turns_off_an_exit_configured_in_config_yaml(tmp_path, monkeypatch):
146
+ (tmp_path / "x.plain").write_text("")
147
+ (tmp_path / "config.yaml").write_text("exit-when-done: true\n")
148
+ monkeypatch.chdir(tmp_path)
149
+
150
+ assert parse_arguments([str(tmp_path / "x.plain")]).exit_when_done is True
151
+ assert parse_arguments([str(tmp_path / "x.plain"), "--no-exit-when-done"]).exit_when_done is False
@@ -0,0 +1,90 @@
1
+ """The TUI names the functionality being implemented and where it stands in its module.
2
+
3
+ The func-id says which functionality it is. It does not say how far the module has come, which the
4
+ number before the renderer took func-ids used to say.
5
+ """
6
+
7
+ from types import SimpleNamespace
8
+ from unittest.mock import MagicMock, patch
9
+
10
+ import pytest
11
+
12
+ import file_utils # noqa: F401 # imported before plain_modules, which it imports back from
13
+ from plain2code_events import RenderContextSnapshot
14
+ from plain2code_utils import functionality_position
15
+ from render_machine.actions.render_functional_requirement import RenderFunctionalRequirement
16
+ from tui.state_handlers import FridReadyHandler
17
+
18
+ FRIDS = ["add-login-button", "add-logout-button", "remember-the-session"]
19
+
20
+
21
+ class TestFunctionalityPosition:
22
+ def test_the_first_functionality(self):
23
+ assert functionality_position(FRIDS, "add-login-button") == "1/3"
24
+
25
+ def test_the_last_functionality(self):
26
+ assert functionality_position(FRIDS, "remember-the-session") == "3/3"
27
+
28
+ @pytest.mark.parametrize("frid", [None, "no-such-functionality"], ids=["none", "unknown"])
29
+ def test_nothing_to_place(self, frid):
30
+ assert functionality_position(FRIDS, frid) is None
31
+
32
+ def test_a_module_with_one_functionality(self):
33
+ assert functionality_position(["only-one"], "only-one") == "1/1"
34
+
35
+
36
+ def _snapshot(position):
37
+ return RenderContextSnapshot(
38
+ frid_context=SimpleNamespace(frid="add-login-button", functional_requirement_text="Add a login button."),
39
+ conformance_tests_running_context=None,
40
+ unit_tests_running_context=None,
41
+ script_execution_history=None,
42
+ module_name="",
43
+ functionality_position=position,
44
+ )
45
+
46
+
47
+ def _functionality_line(position):
48
+ handler = FridReadyHandler(MagicMock(), unittests_script=None, conformance_tests_script=None)
49
+ with (
50
+ patch("tui.state_handlers.get_frid_progress") as get_progress,
51
+ patch("tui.state_handlers.update_progress_item_status"),
52
+ ):
53
+ handler.handle([], _snapshot(position), [])
54
+ return get_progress.return_value.update_functionality_text.call_args.args[0]
55
+
56
+
57
+ def test_the_tui_line_carries_the_position():
58
+ assert _functionality_line("3/12") == "Functionality add-login-button (3/12): Add a login button."
59
+
60
+
61
+ def test_the_tui_line_without_a_position_reads_as_before():
62
+ assert _functionality_line(None) == "Functionality add-login-button: Add a login button."
63
+
64
+
65
+ def _log_heading(frids, frid, attempts=1):
66
+ """The heading the renderer logs when it starts a functionality."""
67
+ render_context = SimpleNamespace(
68
+ module_name="shop",
69
+ frid_context=SimpleNamespace(
70
+ frid=frid,
71
+ functional_requirement_text="Add a login button.",
72
+ functional_requirement_render_attempts=attempts,
73
+ ),
74
+ current_functionality_position=lambda: functionality_position(frids, frid),
75
+ )
76
+ return RenderFunctionalRequirement.functionality_heading(render_context)
77
+
78
+
79
+ def test_the_log_heading_carries_the_position():
80
+ assert "Rendering functionality add-login-button (1/3):" in _log_heading(FRIDS, "add-login-button")
81
+
82
+
83
+ def test_the_log_heading_keeps_the_attempt_after_the_position():
84
+ heading = _log_heading(FRIDS, "add-login-button", attempts=2)
85
+
86
+ assert "Rendering functionality add-login-button (1/3), attempt number 2/" in heading
87
+
88
+
89
+ def test_the_log_heading_without_a_position_reads_as_before():
90
+ assert "Rendering functionality add-login-button:" in _log_heading([], "add-login-button")
@@ -569,6 +569,50 @@ def test_render_choices_always_ends_with_quit():
569
569
  assert choices[last_key].module is None
570
570
 
571
571
 
572
+ # --- Block 3: --force-render leaves nothing to choose ---
573
+
574
+
575
+ def test_render_choices_force_render_rerenders_whole_chain_without_a_choice():
576
+ """--force-render renders the whole chain again from the first module, so a single,
577
+ non-interactive choice is returned (no Quit, because the user is never asked)."""
578
+ root, _, leaf = _build_choices_tree(fully_rendered=True)
579
+ pr = PlainModuleRenderState(last_render_module=root, last_render_frid="fr-e")
580
+
581
+ choices = get_render_choices(root, pr, force_render=True)
582
+
583
+ assert _choice_types(choices) == ["rerender_from_first"]
584
+ assert choices["1"].module is leaf
585
+ assert choices["1"].render_range is None
586
+ assert choices["1"].wipe_later_modules is True
587
+
588
+
589
+ def test_render_choices_force_render_ignores_a_detected_change(monkeypatch):
590
+ """A change that would otherwise be offered as a partial render is ignored: the chain is
591
+ rendered again from the first module."""
592
+ root, middle, leaf = _build_choices_tree(fully_rendered=True)
593
+ monkeypatch.setattr(
594
+ partial_rendering, "determine_partial_render_start", lambda pm: PartialRenderStart(module=middle, frid="fr-c")
595
+ )
596
+ pr = PlainModuleRenderState(
597
+ last_render_module=root, last_render_frid="fr-e", change=middle, change_type="spec_change"
598
+ )
599
+
600
+ choices = get_render_choices(root, pr, force_render=True)
601
+
602
+ assert _choice_types(choices) == ["rerender_from_first"]
603
+ assert choices["1"].module is leaf
604
+
605
+
606
+ def test_render_choices_force_render_on_a_module_without_required_modules():
607
+ root = FakeModule("root", fully_rendered=True)
608
+ pr = PlainModuleRenderState(last_render_module=root, last_render_frid="fr-e")
609
+
610
+ choices = get_render_choices(root, pr, force_render=True)
611
+
612
+ assert _choice_types(choices) == ["rerender_from_first"]
613
+ assert choices["1"].module is root
614
+
615
+
572
616
  # -------------------------
573
617
  # change_is_only_future_work
574
618
  # -------------------------
@@ -108,7 +108,7 @@ def make_args(api_key="test-key", headless=False):
108
108
  )
109
109
 
110
110
 
111
- def run_main(render_side_effect=None, api_key="test-key"):
111
+ def run_main(render_side_effect=None, api_key="test-key", print_exit_summary=None):
112
112
  """Drive main() with everything but the reporting path stubbed out.
113
113
 
114
114
  render() is replaced, so the stub is what decides how the render "ended" -
@@ -134,7 +134,7 @@ def run_main(render_side_effect=None, api_key="test-key"):
134
134
  patch("plain2code.setup_logging", return_value="INFO"),
135
135
  patch("plain2code.initialize_telemetry"),
136
136
  patch("plain2code.stop_narrating"),
137
- patch("plain2code.print_exit_summary"),
137
+ patch("plain2code.print_exit_summary", print_exit_summary or MagicMock()),
138
138
  patch("plain2code.dump_crash_logs"),
139
139
  patch("plain2code.capture_crash"),
140
140
  patch("plain2code.codeplain_api.CodeplainAPI", return_value=api),
@@ -204,3 +204,38 @@ class TestMainReportsEveryEnding:
204
204
  api = run_main(api_key=None)
205
205
 
206
206
  api.render_finished.assert_not_called()
207
+
208
+
209
+ class TestSummaryShowsWhyTheRenderFailed:
210
+ """A failure inside the render machine reaches main() only through the run state.
211
+
212
+ The state machine publishes RenderFailed without raising, so render() returns normally
213
+ and main() has no error of its own. The TUI keeps the reason on the run state; with
214
+ --exit-when-done the summary is the only place the user still sees it.
215
+ """
216
+
217
+ def test_the_reason_the_tui_kept_is_printed(self):
218
+ def fail_inside_the_render_machine(run_state):
219
+ run_state.set_render_succeeded(False)
220
+ run_state.set_render_error_message("Conformance tests still fail after 20 attempts.")
221
+
222
+ summary = MagicMock()
223
+ run_main(fail_inside_the_render_machine, print_exit_summary=summary)
224
+
225
+ assert summary.call_args.kwargs["error_message"] == "Conformance tests still fail after 20 attempts."
226
+
227
+ def test_a_raised_error_still_wins(self):
228
+ def fail(run_state):
229
+ run_state.set_render_error_message("reason the TUI kept")
230
+ raise Exception("rendering blew up")
231
+
232
+ summary = MagicMock()
233
+ run_main(fail, print_exit_summary=summary)
234
+
235
+ assert summary.call_args.kwargs["error_message"] == "rendering blew up"
236
+
237
+ def test_a_successful_render_has_no_error_message(self):
238
+ summary = MagicMock()
239
+ run_main(lambda run_state: run_state.set_render_succeeded(True), print_exit_summary=summary)
240
+
241
+ assert summary.call_args.kwargs["error_message"] is None
@@ -84,6 +84,7 @@ def make_args():
84
84
  render_from=None,
85
85
  force_render=False,
86
86
  headless=False,
87
+ exit_when_done=False,
87
88
  replay_with=None,
88
89
  job_tag=None,
89
90
  log_to_file=False,
tui/components.py CHANGED
@@ -624,12 +624,20 @@ class StructuredLogView(VerticalScroll):
624
624
  async def add_log(
625
625
  self, logger_name: str, level: str, message: str, timestamp: str = "", log_color: Optional[str] = None
626
626
  ):
627
- """Add a new log entry."""
627
+ """Add a new log entry.
628
+
629
+ Log entries are scheduled from the render thread, so one can still be pending when the
630
+ TUI closes (e.g. with --exit-when-done). Once the view is detached from the DOM the entry
631
+ is dropped instead of mounted, since mounting into a detached widget raises MountError.
632
+ The check runs right before each mount because the view can detach while awaiting.
633
+ """
628
634
  # Check if this is a success message that should have spacing before it
629
635
  is_success_message = any(keyword in message.lower() for keyword in LogEntry.SUCCESS_KEYWORDS)
630
636
 
631
637
  # Add empty line before success messages
632
638
  if is_success_message:
639
+ if not self.is_attached:
640
+ return
633
641
  spacer = Static("", classes="log-spacer")
634
642
  await self.mount(spacer)
635
643
 
@@ -639,6 +647,8 @@ class StructuredLogView(VerticalScroll):
639
647
  if not self._should_show_log(level):
640
648
  entry.display = False
641
649
 
650
+ if not self.is_attached:
651
+ return
642
652
  await self.mount(entry)
643
653
  # Auto-scroll to bottom to show latest logs
644
654
  self.scroll_end(animate=False)
tui/plain2code_tui.py CHANGED
@@ -84,6 +84,7 @@ class Plain2CodeTUI(App):
84
84
  enter_pause_event: threading.Event | None = None,
85
85
  on_cancel: Callable[[], None] | None = None,
86
86
  default_log_level: str = "INFO",
87
+ exit_when_done: bool = False,
87
88
  **kwargs,
88
89
  ):
89
90
  super().__init__(**kwargs)
@@ -104,6 +105,7 @@ class Plain2CodeTUI(App):
104
105
  self.enter_pause_event = enter_pause_event
105
106
  self._on_cancel = on_cancel
106
107
  self.default_log_level = default_log_level
108
+ self.exit_when_done = exit_when_done
107
109
  self._render_finished = False
108
110
 
109
111
  # Initialize state handlers
@@ -336,10 +338,14 @@ class Plain2CodeTUI(App):
336
338
  footer.update_footer_state("finished")
337
339
  except NoMatches:
338
340
  pass
341
+ self._exit_when_done()
339
342
 
340
343
  def on_render_failed(self, event: RenderFailed):
341
344
  """Handle render failure."""
342
345
  self._render_error_handler.handle(event.error_message)
346
+ # A failure inside the render machine is not raised, so main() has no error message of
347
+ # its own; keep the reason so the summary printed after the TUI closes can show it.
348
+ self.run_state.set_render_error_message(event.error_message)
343
349
  self._render_finished = True
344
350
  self._finalize_usage_summary()
345
351
  try:
@@ -347,6 +353,18 @@ class Plain2CodeTUI(App):
347
353
  footer.update_footer_state("finished")
348
354
  except NoMatches:
349
355
  pass
356
+ self._exit_when_done()
357
+
358
+ def _exit_when_done(self) -> None:
359
+ """Close the TUI once rendering has stopped, when --exit-when-done asked for it.
360
+
361
+ Both render outcomes are reported on the terminal after the TUI closes, so nothing
362
+ the user needs is lost. The events arrive on the render thread. The exit is queued
363
+ behind the log entries the render thread has already scheduled, so those are drawn
364
+ before the TUI starts shutting down; entries scheduled later are dropped by the log view.
365
+ """
366
+ if self.exit_when_done:
367
+ self.call_later(self.exit)
350
368
 
351
369
  async def action_copy_selection(self) -> None:
352
370
  """Handle ctrl+c: copy selected text if any.
tui/state_handlers.py CHANGED
@@ -62,8 +62,10 @@ class FridReadyHandler(StateHandler):
62
62
  # Update FRID text
63
63
 
64
64
  functionality = qualified_frid(snapshot.module_name, snapshot.frid_context.frid)
65
+ # The position says how far the module has come; the func-id alone does not.
66
+ position = f" ({snapshot.functionality_position})" if snapshot.functionality_position else ""
65
67
  rendering_functionality_text = (
66
- f"{tui_components.FRIDProgress.RENDERING_FUNCTIONALITY_TEXT}{functionality}: "
68
+ f"{tui_components.FRIDProgress.RENDERING_FUNCTIONALITY_TEXT}{functionality}{position}: "
67
69
  f"{snapshot.frid_context.functional_requirement_text}"
68
70
  )
69
71
  get_frid_progress(self.tui).update_functionality_text(rendering_functionality_text)