codeplain 0.4.3.dev64__py3-none-any.whl → 0.4.3.dev66__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.
- {codeplain-0.4.3.dev64.dist-info → codeplain-0.4.3.dev66.dist-info}/METADATA +1 -1
- {codeplain-0.4.3.dev64.dist-info → codeplain-0.4.3.dev66.dist-info}/RECORD +37 -33
- codeplain_REST_api.py +12 -0
- git_utils.py +66 -0
- module_renderer.py +23 -5
- partial_rendering.py +34 -10
- plain2code.py +18 -4
- plain2code_arguments.py +6 -0
- plain_modules.py +95 -13
- render_machine/actions/commit_conformance_tests_changes.py +7 -3
- render_machine/actions/exit_with_error.py +7 -6
- render_machine/actions/finish_functional_requirement.py +16 -4
- render_machine/actions/fix_unit_tests.py +19 -0
- render_machine/actions/prepare_repositories.py +68 -0
- render_machine/actions/render_conformance_tests.py +20 -2
- render_machine/actions/render_functional_requirement.py +3 -0
- render_machine/render_context.py +63 -17
- render_machine/render_types.py +4 -1
- render_machine/render_utils.py +6 -0
- render_machine/state_machine_config.py +2 -4
- tests/test_conformance_fix_conversation.py +1 -0
- tests/test_conformance_tests_json_order.py +37 -0
- tests/test_fix_unit_tests_action.py +35 -0
- tests/test_fix_unit_tests_conformance_context.py +1 -0
- tests/test_git_utils.py +26 -0
- tests/test_partial_rendering.py +3 -0
- tests/test_plain_modules.py +240 -0
- tests/test_prepare_repositories_layout.py +2 -1
- tests/test_regenerate_checks.py +173 -0
- tests/test_regenerate_reset.py +167 -0
- tests/test_render_context_conformance_regression.py +198 -0
- tests/test_render_stop_reason.py +27 -2
- tests/test_terminal_attachment.py +1 -0
- tui/plain_module_render_choice_tui.py +7 -0
- {codeplain-0.4.3.dev64.dist-info → codeplain-0.4.3.dev66.dist-info}/WHEEL +0 -0
- {codeplain-0.4.3.dev64.dist-info → codeplain-0.4.3.dev66.dist-info}/entry_points.txt +0 -0
- {codeplain-0.4.3.dev64.dist-info → codeplain-0.4.3.dev66.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
change_detection.py,sha256=Fy1qsfX13NMUFAQEWFhi4OGfswb0a-WDPIBoY1wnArA,5914
|
|
2
|
-
codeplain_REST_api.py,sha256=
|
|
2
|
+
codeplain_REST_api.py,sha256=NrTdcxe0iWU9edglHjXKNvWom-4DxW5Z0X4zfSwfzG4,26204
|
|
3
3
|
concept_utils.py,sha256=vzwC0_0HOZtPerDs7qPmjtyPleQNiuQ4CcmCKoIy7EM,141
|
|
4
4
|
conformance_fix_journal.py,sha256=7wL3UOc3BWaUo5MCmiFbb3kIwOQ6iEpdQSyEmedo8Vk,9488
|
|
5
5
|
diff_utils.py,sha256=AjiQlqo5pRos_8hVXZo5yBurl5BzSrTMGrQv4dCtRCg,1198
|
|
6
6
|
event_bus.py,sha256=g5XLwRfjrvTIcB6urjREuCJzZj5TA93hy8lKXLGXuCE,650
|
|
7
7
|
file_utils.py,sha256=d46BFIKM97nPTwkiYFoEfTmxAngEajkSKxJbX3orErY,8885
|
|
8
8
|
git_preflight.py,sha256=vB2A8GyYz_iWr8jOE4POFLBHr3qihmedWuidspGdsrw,1509
|
|
9
|
-
git_utils.py,sha256=
|
|
9
|
+
git_utils.py,sha256=JJ-sZgKez-57rCoytD78-NsF1rqpLTb43G2cDKog_aE,19941
|
|
10
10
|
memory_management.py,sha256=CwIOQqF7Xo1sNfvP69zQRK_CpjinQD9dbolhRPl6lTk,2446
|
|
11
11
|
metadata_utils.py,sha256=YO17o7IAma5TT1ZN0pTwrLVr_KxFQ8APv02KqKPpI5k,1641
|
|
12
|
-
module_renderer.py,sha256=
|
|
13
|
-
partial_rendering.py,sha256=
|
|
12
|
+
module_renderer.py,sha256=V9v1lmTRBil-y-VlYKwQePvG8yI3McKAAsHpZH0bORM,8066
|
|
13
|
+
partial_rendering.py,sha256=tTS27wooDcrtjSa1PXnzJ5Obvkg_h6Qq6w1zAqPkqxY,16867
|
|
14
14
|
path_resolution.py,sha256=0tMqU0a1g4DYhTOp7QjLVSEkv_cgasb4NI1mK809dUM,2233
|
|
15
|
-
plain2code.py,sha256=
|
|
16
|
-
plain2code_arguments.py,sha256=
|
|
15
|
+
plain2code.py,sha256=q5tRPDjaYeuvxX6LnQZVFi5UlkR3XxkwwP5WjCOsyRw,24925
|
|
16
|
+
plain2code_arguments.py,sha256=t1puBsuhVjLcslyA9mlIq4aQUvCHAN8naohIrC7jLVk,21402
|
|
17
17
|
plain2code_console.py,sha256=YGBONkQtwZUkrjxTKhqcBoRzW0EmSfYHPH8P4_FM60I,6040
|
|
18
18
|
plain2code_events.py,sha256=QnugBgO1baTe4kj2V3LUnkMDzhmksKwPDFuOKfH9g5o,1738
|
|
19
19
|
plain2code_exceptions.py,sha256=zlszHIhaPWPN4fvYQibMIDM7f1xsW5J8sEWTOosIUGc,2068
|
|
@@ -24,7 +24,7 @@ plain2code_state.py,sha256=Qai9kfsvQ2IYSQ31EyITkqCwlFm_rhO-sO12Y1CCOeA,3615
|
|
|
24
24
|
plain2code_telemetry.py,sha256=NO8zw1i3ucM6Z9xQoSCeWqC5Hr-9Oql58YtgEOhBnaQ,4683
|
|
25
25
|
plain2code_utils.py,sha256=lGrnGavNXjUCQoVLjNYKgLiSTVazJv2o7WByB30M2Nk,2316
|
|
26
26
|
plain_file.py,sha256=50CevjRihjddXbc3WzKKJF_kaVcMHUJ1FH2HJUZawT8,138
|
|
27
|
-
plain_modules.py,sha256=
|
|
27
|
+
plain_modules.py,sha256=N10ROyOrsCdC-ev-J51REplxs2FSNPsT2_fhK9Q1YK4,34017
|
|
28
28
|
plain_spec.py,sha256=AhDbw4GSQ95wC8fkFSPG66MsCu-37Kcz8Skcj66fQhA,1262
|
|
29
29
|
system_config.py,sha256=sA8wiPmBMtRsLwSQ40U5pVdLazAafbV-1Z19Yp0HiSQ,5314
|
|
30
30
|
usage_summary.py,sha256=MA4WcVaAwz6IWCN4k_rgxVcwO4I157wN7BZlFi3h0R4,1282
|
|
@@ -42,27 +42,27 @@ render_machine/code_renderer.py,sha256=ZmisVQHVtI1rBN1qdywW-H_hNeUzVELkHUdApGReY
|
|
|
42
42
|
render_machine/conformance_fix_conversation.py,sha256=IVRnf4nPSGLG8GjFLDYvLpeuBKhJtntTL_hX2nLnbnk,21329
|
|
43
43
|
render_machine/conformance_tests.py,sha256=PNTCnJNd_xNIhpTPPS8vlx8qws3cTgQSTLdADRab2YM,9617
|
|
44
44
|
render_machine/implementation_code_helpers.py,sha256=Fxm-IInoZjAIZn41_-WXWj7VIYczpW4yH44Gt8CYMAQ,2378
|
|
45
|
-
render_machine/render_context.py,sha256
|
|
46
|
-
render_machine/render_types.py,sha256=
|
|
47
|
-
render_machine/render_utils.py,sha256=
|
|
48
|
-
render_machine/state_machine_config.py,sha256=
|
|
45
|
+
render_machine/render_context.py,sha256=d1qQeoHj3jPhMu18wrbqdd87P2iNZByLbmrz8Rj1tw8,33100
|
|
46
|
+
render_machine/render_types.py,sha256=vvS4GTTuaMOScg8qdSuNR8JCg9qP_E4Q2xBTUKO3Ewo,15844
|
|
47
|
+
render_machine/render_utils.py,sha256=ZZZtxsZfEE6rXdPd7sVqoIiQ35URNYx1msJ2rwbhijQ,10561
|
|
48
|
+
render_machine/state_machine_config.py,sha256=di8wrjBFKqMQJjWhPxQcjcqw01Jsliw5XZim536HHh4,27794
|
|
49
49
|
render_machine/states.py,sha256=Lu-7upbs9_bjJsy0P738qx5IiN0DzVcFdhF2-m6YjnQ,2067
|
|
50
50
|
render_machine/triggers.py,sha256=VekNhHGR-u5JXIboqc_Eyqf73LNH7wezLK7r3WWtodk,1269
|
|
51
51
|
render_machine/actions/analyze_specification_ambiguity.py,sha256=6-s2s6DUt-qyr682_5hS-URg4pyPfsnRZnM00uly770,2890
|
|
52
52
|
render_machine/actions/base_action.py,sha256=vVzMp-LanrZyq-jamHyWaQxpRl-pLqtTdtiEzUBhfyE,534
|
|
53
|
-
render_machine/actions/commit_conformance_tests_changes.py,sha256=
|
|
53
|
+
render_machine/actions/commit_conformance_tests_changes.py,sha256=C-R53VhYD8yfwIAlSImc-aaDHPIKLxK5SmotsiMVFvI,2709
|
|
54
54
|
render_machine/actions/commit_implementation_code_changes.py,sha256=yi51oAArLCgWcmFbynes-BK2IGnZwA7wygrTJGoL8dY,826
|
|
55
55
|
render_machine/actions/create_dist.py,sha256=ykER7i2OvWAXjrlAZnkQHpiNl00vSMF8WDxNhlWKfsA,1088
|
|
56
56
|
render_machine/actions/distill_conformance_test_memory.py,sha256=54ooMdAc79OrKfWCPsczGNx1zhUng4UNPZLo6j4eMEw,2681
|
|
57
|
-
render_machine/actions/exit_with_error.py,sha256=
|
|
58
|
-
render_machine/actions/finish_functional_requirement.py,sha256=
|
|
57
|
+
render_machine/actions/exit_with_error.py,sha256=ADzRR2z389z5y3oW9Xx1o4pH_dCdNou_DZB8jWjen7g,1765
|
|
58
|
+
render_machine/actions/finish_functional_requirement.py,sha256=xuYGRAqA4PWGDrJqpU5tdYhLa0AXCHL7Rfr7KrlUI2c,1254
|
|
59
59
|
render_machine/actions/fix_conformance_test.py,sha256=JP4ejH4Z-VfpLwYN6bkHGIN-1G8hF8bpLpPOkNvHSNk,23723
|
|
60
|
-
render_machine/actions/fix_unit_tests.py,sha256=
|
|
61
|
-
render_machine/actions/prepare_repositories.py,sha256=
|
|
60
|
+
render_machine/actions/fix_unit_tests.py,sha256=eN8G-sdju8oiwN3dfh1ZPir5pLMInbEhCy4yHeSjDwA,14842
|
|
61
|
+
render_machine/actions/prepare_repositories.py,sha256=7mocV7JMw9lgTGZ57LQjqFKUzOyMV8bzT8UP8Qr76Iw,7660
|
|
62
62
|
render_machine/actions/prepare_testing_environment.py,sha256=gfijfe825rGBGZZKSQ8PU0Gdx3sIXyuxhSJy4Bwav74,5431
|
|
63
63
|
render_machine/actions/refactor_code.py,sha256=dlS0iam9bzEeUr2NFuft6TcOv6IOtzdSb1tDQ85vmII,2708
|
|
64
|
-
render_machine/actions/render_conformance_tests.py,sha256=
|
|
65
|
-
render_machine/actions/render_functional_requirement.py,sha256=
|
|
64
|
+
render_machine/actions/render_conformance_tests.py,sha256=Y-Om3MXmrsETBH630H61yE0U2Rr1HACtChSvpvCHURA,11865
|
|
65
|
+
render_machine/actions/render_functional_requirement.py,sha256=07-hMpm6IPXzDQUQTmers2cruc-7oiKxKPVoO73HhK4,5766
|
|
66
66
|
render_machine/actions/run_conformance_tests.py,sha256=uNZ8fyBjTxtCpjdKu3KKH84ecefvM5_J05raJdKGIHk,4112
|
|
67
67
|
render_machine/actions/run_unit_tests.py,sha256=j0qsHMLy49I_DX5QLlH0OdPT6bPMc0icmVg2N5MYm9U,2711
|
|
68
68
|
render_machine/actions/summarize_conformance_tests.py,sha256=5TdhZ9Mt96WAlFtJAju3iQ9fXFwHcR48Wwe9XyddTIU,1681
|
|
@@ -80,41 +80,45 @@ tests/test_arg_provenance.py,sha256=kUqTcaCxMgbwY0-k_aHf40X1TN-5p7DhLHYrfcgX9N0,
|
|
|
80
80
|
tests/test_background_preparation.py,sha256=xZgYy2KFzNJJo48qsI5PufJQ51_avC15kkOWZoUElJA,3126
|
|
81
81
|
tests/test_change_detection.py,sha256=jGSBuMFHFiZxe14kB6PucH3Aw0dh5RsKpvQgxhmUdEo,14413
|
|
82
82
|
tests/test_cli_output.py,sha256=9yTk0pD2w6vkiSdSkYwneUmEtNqX4x64F6PzYShUEcw,19331
|
|
83
|
-
tests/test_conformance_fix_conversation.py,sha256=
|
|
83
|
+
tests/test_conformance_fix_conversation.py,sha256=GRSkbQG0x90oaqjJOarT1c-qHti6XD4cih_YcZhLmC0,32599
|
|
84
84
|
tests/test_conformance_fix_journal.py,sha256=6IDSMKTSRLB-iWb6jzGvG3TwJomzg0S0SlyG4IbAZdg,10729
|
|
85
|
+
tests/test_conformance_tests_json_order.py,sha256=xqtyj0EmEd4YF9-PA0BJ_eEviniDumzCuDdjuKM1PmU,1545
|
|
85
86
|
tests/test_console_log_styles.py,sha256=sxlhynMAP-kmqhBn1-pKvZXdCnlKSyCGJqwYKrh6sQ0,6468
|
|
86
87
|
tests/test_dependency_pins.py,sha256=D_c5sb7ikwuV4zy8trB0DDzwNLkhAX221X67atLA-ec,1864
|
|
87
88
|
tests/test_distill_conformance_test_memory.py,sha256=6hmrzbL-1Yf7O2JgEFWi6GR-43MvFYWLLYjIYr2kN9M,5526
|
|
88
89
|
tests/test_dry_run_link_validation.py,sha256=0Ca7v4DHMPBVmmBLWr2AHk4xVHzdOS2PHiPdumgpWkM,2154
|
|
89
90
|
tests/test_exit_when_done.py,sha256=eQeAjZaScqw93liajuYZ1XAIhZX-NpjWMeBXKSazedU,5594
|
|
90
91
|
tests/test_file_utils.py,sha256=RPab1wBsbE7XAPGync56WveFVnRvafFVRia1a2mMQhk,4490
|
|
91
|
-
tests/test_fix_unit_tests_action.py,sha256=
|
|
92
|
-
tests/test_fix_unit_tests_conformance_context.py,sha256=
|
|
92
|
+
tests/test_fix_unit_tests_action.py,sha256=0wdOdT6o3Vl8VL5YiKp4_p_UftxOcOXOZeuMG1iMGLQ,13391
|
|
93
|
+
tests/test_fix_unit_tests_conformance_context.py,sha256=c_hAyktfkvNmYo9kvaKNIzw5pXftpgQzl2P4U5kJJDc,9383
|
|
93
94
|
tests/test_folder_path_resolution.py,sha256=K9v684xkPE0HOAsovg8uDixpZmaIk7ho-Wd3rTjKLF0,6560
|
|
94
95
|
tests/test_frid_arguments.py,sha256=zIEU2HGgJU4YOY2DXkjO9MmTlIUk4Iu5dfEU9OwKbak,1264
|
|
95
96
|
tests/test_functionality_position.py,sha256=QQdhIqZhRC8-30xKZPyOye6dm8kSkJnja4PB53iZkeE,3540
|
|
96
97
|
tests/test_functionality_without_scenarios.py,sha256=kFBqu9UQ7JdIJCs6z5Hu0xsv9YskBXhkEKBKcdN0tvI,2832
|
|
97
98
|
tests/test_git_preflight.py,sha256=6aQqInDzpk03pS-6UfkGQWjErrIXTEdHs5oeq3ZYzTw,3186
|
|
98
|
-
tests/test_git_utils.py,sha256=
|
|
99
|
+
tests/test_git_utils.py,sha256=N0kMWLuo7fLclgsOGb880X4a2ixuNrhmZZwO8HuAHdE,20516
|
|
99
100
|
tests/test_headless_logging.py,sha256=soNESeotKQaU-SQyxtjpq35l-dLVsauZ_lJ-wk9i2mI,6419
|
|
100
101
|
tests/test_log_file_name_resolution.py,sha256=99g9NgPF-BZ98CvNyqDcltBAx4sLBE8gpQPAAieKiPc,3619
|
|
101
102
|
tests/test_logging_config_path_resolution.py,sha256=avz_ehRd18INwIXvAy1AwVzNNUz0vS8eu1nRe0bra8g,2650
|
|
102
|
-
tests/test_partial_rendering.py,sha256=
|
|
103
|
+
tests/test_partial_rendering.py,sha256=Htk9cH8PPZ4DUv1h3wbXng_J89uk0Edd0DszyWEcNWk,25722
|
|
103
104
|
tests/test_path_resolution.py,sha256=yQpd-Unq1lwNv0wkRPwVs5pDT8JmyyDgbpiTQsyt--Y,2615
|
|
104
105
|
tests/test_plain2code.py,sha256=BKLIBOc3tON2fODm1ETdPZZkZMbSrvbIG54EWJcKcmE,3411
|
|
105
106
|
tests/test_plain2code_state.py,sha256=O-sDt4F_lF6XtanWKWfh5IsNmDdfuJP_JoGagujzdfM,1440
|
|
106
107
|
tests/test_plain2code_utils.py,sha256=MXAYsWMY_7Vb4im2ZJK46Gsq1ApIjuGkQAEmUz0ISOY,1665
|
|
107
|
-
tests/test_plain_modules.py,sha256=
|
|
108
|
-
tests/test_prepare_repositories_layout.py,sha256=
|
|
108
|
+
tests/test_plain_modules.py,sha256=LrECUjX34pjGReV_9Tonef3UPaiAHnSRQsP9DBZaTE8,45028
|
|
109
|
+
tests/test_prepare_repositories_layout.py,sha256=Nyx6V5dgilUeuRSd66GvxZHZ0LAbPcZawBQtRhkJaUc,14669
|
|
110
|
+
tests/test_regenerate_checks.py,sha256=cKc6kI7UPr0JYTHFWDPe1nrBo7yzDmw2yPoIrSDO8yI,7319
|
|
111
|
+
tests/test_regenerate_reset.py,sha256=RaI6fT7UESrbufxjOlCYwLPOPq_-hHLXIp1CYIhrq_4,6374
|
|
112
|
+
tests/test_render_context_conformance_regression.py,sha256=dkbt9n78fdujbuX-Pr1jPcXx2UgKiUJZfCOeFW4pWt4,9566
|
|
109
113
|
tests/test_render_finished_report.py,sha256=FmuntIaGGIebUZUnvMQ0nmRHiSVIG3n5WsXRAzEgo90,9944
|
|
110
114
|
tests/test_render_range.py,sha256=N4XS6zQbQmDlQmUvl6vhqLL7VcczET65GG1DWypP-k0,1832
|
|
111
|
-
tests/test_render_stop_reason.py,sha256=
|
|
115
|
+
tests/test_render_stop_reason.py,sha256=W4IMFgWVvibmbONB8cUd1-jJVeT4lmFdbJFnMYnhFw4,9792
|
|
112
116
|
tests/test_resolve_config_file.py,sha256=b87tDOvyzbsnE-QRWbZ97ou7NuyaAgskv-dbYBum31c,2830
|
|
113
117
|
tests/test_script_path_resolution.py,sha256=tiEqMevQRXr9YpfHN0xldOOQpLAUgnSqTzeZWkKHaUY,4156
|
|
114
118
|
tests/test_script_timeout_hint.py,sha256=RkSdzPM0tnTcScs5WXNa_vKbJPJF3-QAR0Y0AhUb-1g,905
|
|
115
119
|
tests/test_system_config.py,sha256=gH5qs9q4lh5CljAdz28HUrJzuKqCvkZherFuv7enMak,2787
|
|
116
120
|
tests/test_telemetry.py,sha256=lRm-Z7g2-33CFEkTJHLSUsOpltSnD47gyUoPCRD9SHQ,8153
|
|
117
|
-
tests/test_terminal_attachment.py,sha256
|
|
121
|
+
tests/test_terminal_attachment.py,sha256=7wLby4yT0SZeqjN_bdpKp-UuP_UB6HjV7HGyYIUeUI4,10558
|
|
118
122
|
tests/test_tests_folders.py,sha256=o_6GMObbqweEDi1cfx6V8UFOGCafbUQcEVu_DSfW1Ns,3249
|
|
119
123
|
tests/test_traceability_warnings.py,sha256=Z9WFLq99mW8LDwxfmmskX0d3wuELq8cjactRFDCD-_Y,2268
|
|
120
124
|
tests/test_tui_components.py,sha256=O_PB6z_Xt7YWebsD21b99PVgFtqq5c03lVtYytIT5Ps,6200
|
|
@@ -128,13 +132,13 @@ tui/__init__.py,sha256=_fy7FowY0RkWdn4kC7XV2jgvQPCj-2gE8fNUb-Mny0A,60
|
|
|
128
132
|
tui/components.py,sha256=w3_MTFRqX_ZSFbFWHZbUQE9yZYcAK2qed0QB5ZH5E7c,27697
|
|
129
133
|
tui/models.py,sha256=KMjlWubmPD41GA-BjgiqkaV9v7tLJ0fuWKBDPmZj4JA,1493
|
|
130
134
|
tui/plain2code_tui.py,sha256=vRHrB-9MWlttukvMCxv8UwrEjZJPLwD3FBcLMwhdFGY,18537
|
|
131
|
-
tui/plain_module_render_choice_tui.py,sha256=
|
|
135
|
+
tui/plain_module_render_choice_tui.py,sha256=VC54-dzLggYc7dp8HNuUJ7Mrx-mEs84HPqshyUgbni4,12508
|
|
132
136
|
tui/spinner.py,sha256=Ro6Gd9Przf-whuHqPRY6HwI0T57yJjyNPbhDbigZKZE,2471
|
|
133
137
|
tui/state_handlers.py,sha256=5FkF13mCLYAOgpYnzR932U3tYxSnMkCu5jybMFEBVe4,16264
|
|
134
138
|
tui/styles.css,sha256=kiC7Og_2G1E7owoiZgV95-3_dSeQnsNj3qzaY04xkDg,6727
|
|
135
139
|
tui/widget_helpers.py,sha256=jitm2WHiKj-NVFL-hULxWzckPreRbUTl9OIZLN31-ek,6997
|
|
136
|
-
codeplain-0.4.3.
|
|
137
|
-
codeplain-0.4.3.
|
|
138
|
-
codeplain-0.4.3.
|
|
139
|
-
codeplain-0.4.3.
|
|
140
|
-
codeplain-0.4.3.
|
|
140
|
+
codeplain-0.4.3.dev66.dist-info/METADATA,sha256=-p-c5lbD5tT4KwlZOxZAxZxcJF7-zEi66NNJHEcJ4M0,7260
|
|
141
|
+
codeplain-0.4.3.dev66.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
142
|
+
codeplain-0.4.3.dev66.dist-info/entry_points.txt,sha256=oDZkBqu9WhtZApb_K6ia8-fn9aojwmAsgnKELceX5T4,46
|
|
143
|
+
codeplain-0.4.3.dev66.dist-info/licenses/LICENSE,sha256=pCeKgQ1mXE5OmNUuKOfOZh1T1vqkeCUxghE7N8qgnzc,11345
|
|
144
|
+
codeplain-0.4.3.dev66.dist-info/RECORD,,
|
codeplain_REST_api.py
CHANGED
|
@@ -286,6 +286,9 @@ class CodeplainAPI:
|
|
|
286
286
|
required_modules: dict,
|
|
287
287
|
include_unittests: bool,
|
|
288
288
|
run_state: RunState,
|
|
289
|
+
is_regeneration: bool = False,
|
|
290
|
+
old_functional_requirement_text: Optional[str] = None,
|
|
291
|
+
code_functional_requirements: Optional[list] = None,
|
|
289
292
|
) -> dict[str, str]:
|
|
290
293
|
"""
|
|
291
294
|
Renders the content of a functionality based on the provided ID,
|
|
@@ -325,8 +328,15 @@ class CodeplainAPI:
|
|
|
325
328
|
"module_name": module_name,
|
|
326
329
|
"required_modules": required_modules,
|
|
327
330
|
"include_unittests": include_unittests,
|
|
331
|
+
"is_regeneration": is_regeneration,
|
|
328
332
|
}
|
|
329
333
|
|
|
334
|
+
if old_functional_requirement_text is not None:
|
|
335
|
+
payload["old_functional_requirement_text"] = old_functional_requirement_text
|
|
336
|
+
|
|
337
|
+
if code_functional_requirements is not None:
|
|
338
|
+
payload["code_functional_requirements"] = code_functional_requirements
|
|
339
|
+
|
|
330
340
|
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
331
341
|
|
|
332
342
|
def distill_conformance_test_memory(
|
|
@@ -385,6 +395,7 @@ class CodeplainAPI:
|
|
|
385
395
|
conformance_tests_folder_name,
|
|
386
396
|
conformance_tests_json,
|
|
387
397
|
run_state: RunState,
|
|
398
|
+
is_regeneration: bool = False,
|
|
388
399
|
):
|
|
389
400
|
endpoint_url = f"{self.api_url}/render_conformance_tests"
|
|
390
401
|
headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}
|
|
@@ -400,6 +411,7 @@ class CodeplainAPI:
|
|
|
400
411
|
"required_modules": required_modules,
|
|
401
412
|
"conformance_tests_folder_name": conformance_tests_folder_name,
|
|
402
413
|
"conformance_tests_json": conformance_tests_json,
|
|
414
|
+
"is_regeneration": is_regeneration,
|
|
403
415
|
}
|
|
404
416
|
|
|
405
417
|
response = self.post_request(endpoint_url, headers, payload, run_state)
|
git_utils.py
CHANGED
|
@@ -17,6 +17,7 @@ CONFORMANCE_TESTS_PASSED_COMMIT_MESSAGE = (
|
|
|
17
17
|
# Following messages are used as checkpoints in the git history
|
|
18
18
|
# Changing them will break backwards compatibility so change them with care
|
|
19
19
|
FUNCTIONAL_REQUIREMENT_FINISHED_COMMIT_MESSAGE = "[Codeplain] functionality ID (FRID):{} fully implemented"
|
|
20
|
+
FUNCTIONAL_REQUIREMENT_REGENERATED_COMMIT_MESSAGE = "[Codeplain] functionality ID (FRID):{} fully regenerated"
|
|
20
21
|
INITIAL_COMMIT_MESSAGE = "[Codeplain] Initial module commit"
|
|
21
22
|
BASE_FOLDER_COMMIT_MESSAGE = "[Codeplain] Initialize build with Base Folder content"
|
|
22
23
|
|
|
@@ -332,6 +333,67 @@ def has_commit_for_frid(repo_path: Union[str, os.PathLike], frid: str, module_na
|
|
|
332
333
|
return bool(_get_commit_with_frid(Repo(repo_path), frid, module_name))
|
|
333
334
|
|
|
334
335
|
|
|
336
|
+
def get_frids_regenerated_after_frid(repo_path: Union[str, os.PathLike], frid: str, module_name: str) -> list[str]:
|
|
337
|
+
"""The functionalities regenerated after the "fully implemented" commit of `frid`.
|
|
338
|
+
|
|
339
|
+
A reset to that commit removes these regenerations.
|
|
340
|
+
"""
|
|
341
|
+
repo = Repo(repo_path)
|
|
342
|
+
commit = _get_commit_with_frid(repo, frid, module_name)
|
|
343
|
+
if not commit:
|
|
344
|
+
return []
|
|
345
|
+
|
|
346
|
+
escaped_module_message = _escape_exact_grep_line(MODULE_NAME_MESSAGE.format(module_name))
|
|
347
|
+
subjects = repo.git.log(f"{commit}..HEAD", "--grep", escaped_module_message, "--format=%s").splitlines()
|
|
348
|
+
regenerated_pattern = re.compile(
|
|
349
|
+
re.escape(FUNCTIONAL_REQUIREMENT_REGENERATED_COMMIT_MESSAGE).replace(re.escape("{}"), "(.+)")
|
|
350
|
+
)
|
|
351
|
+
return [match.group(1) for subject in subjects if (match := regenerated_pattern.fullmatch(subject))]
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
def _get_last_commit_with_message(repo: Repo, message_template: str, module_name: str) -> str:
|
|
355
|
+
# The "{}" in the template matches any functionality ID.
|
|
356
|
+
escaped_message = _escape_exact_grep_line(message_template).replace("{}", ".*")
|
|
357
|
+
escaped_module_message = _escape_exact_grep_line(MODULE_NAME_MESSAGE.format(module_name))
|
|
358
|
+
return repo.git.rev_list(
|
|
359
|
+
repo.active_branch.name,
|
|
360
|
+
"--grep",
|
|
361
|
+
escaped_message,
|
|
362
|
+
"--grep",
|
|
363
|
+
escaped_module_message,
|
|
364
|
+
"--all-match",
|
|
365
|
+
"-n",
|
|
366
|
+
"1",
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
def revert_to_last_finished_commit(repo_path: Union[str, os.PathLike], module_name: str) -> Repo:
|
|
371
|
+
"""Reset the repo to the newest "fully implemented" or "fully regenerated" commit of `module_name`.
|
|
372
|
+
|
|
373
|
+
The commits and the changes after that commit come from a render that did not finish.
|
|
374
|
+
"""
|
|
375
|
+
repo = Repo(repo_path)
|
|
376
|
+
commits = [
|
|
377
|
+
commit
|
|
378
|
+
for commit in (
|
|
379
|
+
_get_last_commit_with_message(repo, FUNCTIONAL_REQUIREMENT_FINISHED_COMMIT_MESSAGE, module_name),
|
|
380
|
+
_get_last_commit_with_message(repo, FUNCTIONAL_REQUIREMENT_REGENERATED_COMMIT_MESSAGE, module_name),
|
|
381
|
+
)
|
|
382
|
+
if commit
|
|
383
|
+
]
|
|
384
|
+
if not commits:
|
|
385
|
+
raise InvalidGitRepositoryError("Git repository is in an invalid state. No finished functionality was found.")
|
|
386
|
+
|
|
387
|
+
commit = (
|
|
388
|
+
commits[-1]
|
|
389
|
+
if len(commits) == 2 and repo.is_ancestor(repo.commit(commits[0]), repo.commit(commits[1]))
|
|
390
|
+
else commits[0]
|
|
391
|
+
)
|
|
392
|
+
repo.git.reset("--hard", commit)
|
|
393
|
+
repo.git.clean("-xdf")
|
|
394
|
+
return repo
|
|
395
|
+
|
|
396
|
+
|
|
335
397
|
def _get_base_folder_commit(repo: Repo) -> str:
|
|
336
398
|
"""Finds commit related to copy of the base folder."""
|
|
337
399
|
return _get_commit_with_message(repo, BASE_FOLDER_COMMIT_MESSAGE)
|
|
@@ -448,6 +510,10 @@ def get_last_rendered_functionality(repo_path: Union[str, os.PathLike]) -> tuple
|
|
|
448
510
|
return None, None
|
|
449
511
|
|
|
450
512
|
repo = Repo(repo_path)
|
|
513
|
+
|
|
514
|
+
# Only a "fully implemented" commit marks how far the module is rendered. A "fully regenerated"
|
|
515
|
+
# commit sits on top of that frontier, because a single functionality was rendered again in place.
|
|
516
|
+
# Treating it as the frontier would report the regenerated frid as the last rendered one.
|
|
451
517
|
grep_pattern = FUNCTIONAL_REQUIREMENT_FINISHED_COMMIT_MESSAGE.format(".*")
|
|
452
518
|
grep_pattern = grep_pattern.replace("[", "\\[").replace("]", "\\]")
|
|
453
519
|
commit_sha = repo.git.rev_list(repo.active_branch.name, "--grep", grep_pattern, "-n", "1")
|
module_renderer.py
CHANGED
|
@@ -26,6 +26,7 @@ class ModuleRenderer:
|
|
|
26
26
|
event_bus: EventBus,
|
|
27
27
|
stop_event: threading.Event | None = None,
|
|
28
28
|
enter_pause_event: threading.Event | None = None,
|
|
29
|
+
is_regenerate: bool = False,
|
|
29
30
|
):
|
|
30
31
|
self.codeplainAPI = codeplainAPI
|
|
31
32
|
self.plain_module = plain_module
|
|
@@ -36,12 +37,14 @@ class ModuleRenderer:
|
|
|
36
37
|
self.event_bus = event_bus
|
|
37
38
|
self.stop_event = stop_event
|
|
38
39
|
self.enter_pause_event = enter_pause_event
|
|
40
|
+
self.is_regenerate = is_regenerate
|
|
39
41
|
|
|
40
42
|
def _build_render_context_for_module(
|
|
41
43
|
self,
|
|
42
44
|
plain_module: PlainModule,
|
|
43
45
|
memory_manager: MemoryManager,
|
|
44
46
|
render_range: list[str] | None,
|
|
47
|
+
is_regenerate: bool,
|
|
45
48
|
) -> RenderContext:
|
|
46
49
|
return RenderContext(
|
|
47
50
|
self.codeplainAPI,
|
|
@@ -63,6 +66,7 @@ class ModuleRenderer:
|
|
|
63
66
|
test_script_timeout=self.args.test_script_timeout,
|
|
64
67
|
stop_event=self.stop_event,
|
|
65
68
|
enter_pause_event=self.enter_pause_event,
|
|
69
|
+
is_regenerate=is_regenerate,
|
|
66
70
|
)
|
|
67
71
|
|
|
68
72
|
def _render_module(
|
|
@@ -73,6 +77,9 @@ class ModuleRenderer:
|
|
|
73
77
|
Returns:
|
|
74
78
|
tuple[bool, bool]: (Whether the module was rendered and whether the rendering failed)
|
|
75
79
|
"""
|
|
80
|
+
if any(module.module_name == plain_module.module_name for module in self.loaded_modules):
|
|
81
|
+
return True, False
|
|
82
|
+
|
|
76
83
|
is_render_choice_module = (
|
|
77
84
|
self.render_choice is not None
|
|
78
85
|
and self.render_choice.module is not None
|
|
@@ -83,7 +90,12 @@ class ModuleRenderer:
|
|
|
83
90
|
render_range = self.render_choice.render_range
|
|
84
91
|
|
|
85
92
|
if render_range is not None:
|
|
93
|
+
if self.is_regenerate:
|
|
94
|
+
plain_module.ensure_frid_can_be_regenerated(render_range[0], self.args.render_conformance_tests)
|
|
86
95
|
plain_module.ensure_previous_frid_commits_exist(render_range, self.args.render_conformance_tests)
|
|
96
|
+
# A regeneration does not reset the code, so only the other renders can remove one.
|
|
97
|
+
if not self.is_regenerate:
|
|
98
|
+
plain_module.ensure_render_from_keeps_regenerations(render_range[0])
|
|
87
99
|
|
|
88
100
|
has_any_required_module_changed = False
|
|
89
101
|
if not self.args.render_machine_graph and plain_module.required_modules and not is_render_choice_module:
|
|
@@ -99,10 +111,7 @@ class ModuleRenderer:
|
|
|
99
111
|
return False, True
|
|
100
112
|
|
|
101
113
|
if (
|
|
102
|
-
(
|
|
103
|
-
(not force_render)
|
|
104
|
-
or any(module.module_name == plain_module.module_name for module in self.loaded_modules)
|
|
105
|
-
)
|
|
114
|
+
(not force_render)
|
|
106
115
|
and plain_module.get_repo() is not None
|
|
107
116
|
and not has_any_required_module_changed
|
|
108
117
|
and not plain_module.has_plain_spec_changed()
|
|
@@ -121,10 +130,15 @@ class ModuleRenderer:
|
|
|
121
130
|
self.codeplainAPI,
|
|
122
131
|
plain_module.module_memory_folder,
|
|
123
132
|
)
|
|
133
|
+
# Only the module that owns the target functionality is being regenerated. Required modules
|
|
134
|
+
# are rendered in full, so they must not take the regenerate path.
|
|
135
|
+
is_regenerate = self.is_regenerate and render_range is not None
|
|
136
|
+
|
|
124
137
|
render_context = self._build_render_context_for_module(
|
|
125
138
|
plain_module,
|
|
126
139
|
memory_manager,
|
|
127
140
|
render_range,
|
|
141
|
+
is_regenerate,
|
|
128
142
|
)
|
|
129
143
|
|
|
130
144
|
code_renderer = CodeRenderer(render_context)
|
|
@@ -139,7 +153,11 @@ class ModuleRenderer:
|
|
|
139
153
|
code_renderer.render_context.event_bus.publish(RenderFailed(error_message=error_message))
|
|
140
154
|
return False, True
|
|
141
155
|
|
|
142
|
-
|
|
156
|
+
# save_module_metadata records "the whole module matches the current spec". After a
|
|
157
|
+
# regenerate only one functionality was rendered, and FinishFunctionalRequirement already
|
|
158
|
+
# updated its metadata entry, so writing the whole baseline would claim too much.
|
|
159
|
+
if not is_regenerate:
|
|
160
|
+
plain_module.save_module_metadata()
|
|
143
161
|
|
|
144
162
|
self.loaded_modules.append(plain_module)
|
|
145
163
|
|
partial_rendering.py
CHANGED
|
@@ -234,6 +234,26 @@ def change_is_only_future_work(
|
|
|
234
234
|
return frids.index(partial_start.frid) > frids.index(plain_module_render_state.last_render_frid)
|
|
235
235
|
|
|
236
236
|
|
|
237
|
+
def _keep_regenerations(choice: RenderChoice) -> RenderChoice:
|
|
238
|
+
"""Start the choice at an earlier regenerated functionality when its render would remove that regeneration.
|
|
239
|
+
|
|
240
|
+
The render resets the code to the functionality before its start. That reset removes a regeneration
|
|
241
|
+
made after it, so the render must start at the regenerated functionality. This renders again the
|
|
242
|
+
functionalities after it, so the user must confirm the choice.
|
|
243
|
+
"""
|
|
244
|
+
assert choice.module is not None and choice.render_range is not None
|
|
245
|
+
regenerated_frid = choice.module.get_regenerated_frid_removed_by_render_from(choice.render_range[0])
|
|
246
|
+
if regenerated_frid is None:
|
|
247
|
+
return choice
|
|
248
|
+
return RenderChoice(
|
|
249
|
+
module=choice.module,
|
|
250
|
+
render_range=plain_spec.get_render_range_from(regenerated_frid, choice.module.plain_source),
|
|
251
|
+
choice_type="render_from_regenerated",
|
|
252
|
+
wipe_later_modules=choice.wipe_later_modules,
|
|
253
|
+
is_destructive=True,
|
|
254
|
+
)
|
|
255
|
+
|
|
256
|
+
|
|
237
257
|
def _resume_render_choice(
|
|
238
258
|
plain_module: PlainModule,
|
|
239
259
|
plain_module_render_state: PlainModuleRenderState,
|
|
@@ -258,10 +278,12 @@ def _resume_render_choice(
|
|
|
258
278
|
|
|
259
279
|
next_frid, next_module = plain_module.get_next_frid(pr.last_render_frid, pr.last_render_module.module_name)
|
|
260
280
|
render_range = plain_spec.get_render_range_from(next_frid, next_module.plain_source)
|
|
261
|
-
return
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
281
|
+
return _keep_regenerations(
|
|
282
|
+
RenderChoice(
|
|
283
|
+
module=next_module,
|
|
284
|
+
render_range=render_range,
|
|
285
|
+
choice_type="continue_from_frid",
|
|
286
|
+
)
|
|
265
287
|
)
|
|
266
288
|
|
|
267
289
|
next_module = plain_module.get_next_module(pr.last_render_module.module_name) or pr.last_render_module
|
|
@@ -323,12 +345,14 @@ def get_render_choices(
|
|
|
323
345
|
# module's earlier (unchanged) functionalities.
|
|
324
346
|
render_range = plain_spec.get_render_range_from(partial_start.frid, partial_start.module.plain_source)
|
|
325
347
|
render_choices.append(
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
348
|
+
_keep_regenerations(
|
|
349
|
+
RenderChoice(
|
|
350
|
+
module=partial_start.module,
|
|
351
|
+
render_range=render_range,
|
|
352
|
+
choice_type="render_from_change",
|
|
353
|
+
wipe_later_modules=len(all_affected_modules) > 1,
|
|
354
|
+
is_destructive=True,
|
|
355
|
+
)
|
|
332
356
|
)
|
|
333
357
|
)
|
|
334
358
|
|
plain2code.py
CHANGED
|
@@ -339,10 +339,23 @@ def render( # noqa: C901
|
|
|
339
339
|
event_bus: EventBus,
|
|
340
340
|
default_log_level: str = "INFO",
|
|
341
341
|
):
|
|
342
|
-
# Compute render range from either --render-range
|
|
342
|
+
# Compute render range from either --render-range, --render-from, or --regenerate
|
|
343
343
|
render_range = None
|
|
344
|
-
|
|
345
|
-
|
|
344
|
+
is_regenerate = False
|
|
345
|
+
if args.render_range or args.render_from or args.regenerate:
|
|
346
|
+
if args.regenerate:
|
|
347
|
+
frids = list(plain_spec.get_frids(plain_module.plain_source))
|
|
348
|
+
if args.regenerate not in frids:
|
|
349
|
+
raise InvalidFridArgument(
|
|
350
|
+
f"Cannot regenerate functionality {args.regenerate} because module {plain_module.module_name} "
|
|
351
|
+
f"has no such functionality. Its functionalities are: {', '.join(frids)}."
|
|
352
|
+
)
|
|
353
|
+
render_range = plain_spec.get_render_range(
|
|
354
|
+
args.regenerate + "," + args.regenerate, plain_module.plain_source
|
|
355
|
+
)
|
|
356
|
+
is_regenerate = True
|
|
357
|
+
else:
|
|
358
|
+
render_range = plain_spec.compute_render_range(args, plain_module.plain_source)
|
|
346
359
|
|
|
347
360
|
run_state.user_email = _check_connection(codeplainAPI)
|
|
348
361
|
|
|
@@ -369,7 +382,7 @@ def render( # noqa: C901
|
|
|
369
382
|
module.reconcile_metadata_with_git()
|
|
370
383
|
|
|
371
384
|
render_choice = None
|
|
372
|
-
if render_range is None:
|
|
385
|
+
if render_range is None and not is_regenerate:
|
|
373
386
|
plain_module_render_state = get_plain_module_render_state(plain_module, args.render_conformance_tests)
|
|
374
387
|
if plain_module_render_state is not None:
|
|
375
388
|
render_choices = get_render_choices(plain_module, plain_module_render_state, args.force_render)
|
|
@@ -418,6 +431,7 @@ def render( # noqa: C901
|
|
|
418
431
|
event_bus,
|
|
419
432
|
stop_event=stop_event,
|
|
420
433
|
enter_pause_event=enter_pause_event,
|
|
434
|
+
is_regenerate=is_regenerate,
|
|
421
435
|
)
|
|
422
436
|
|
|
423
437
|
render_error: list[Exception] = []
|
plain2code_arguments.py
CHANGED
|
@@ -346,6 +346,12 @@ def create_parser():
|
|
|
346
346
|
help="Continue generation starting from this specific functionality (e.g. `add-task`). "
|
|
347
347
|
"The functionality with this ID will be included in the output. The functionality ID must match one of the functionalities in your plain file.",
|
|
348
348
|
)
|
|
349
|
+
render_range_group.add_argument(
|
|
350
|
+
"--regenerate",
|
|
351
|
+
type=frid_string,
|
|
352
|
+
help="Regenerate a single already-rendered functionality (e.g. `add-task`). "
|
|
353
|
+
"The functionality ID must match one of the functionalities in your plain file.",
|
|
354
|
+
)
|
|
349
355
|
|
|
350
356
|
_add_arg(
|
|
351
357
|
parser,
|