Commit af8dc52
committed
refactor(params): consolidate codegen, eliminate duplicate description/namelist systems
- Delete namelist_targets.py: NAMELIST_VARS moved to definitions.py (one file to
edit when adding a param); CASE_OPT_EXCLUDE was a duplicate of CASE_OPT_PARAMS
- Delete _FALLBACK_PARAMS (380 hardcoded lines) in namelist_parser.py: replaced
by _fallback_params() that derives the same data from NAMELIST_VARS at runtime
- Delete _SIMPLE_DESCS (145 lines) and _auto_describe in definitions.py: _r() now
populates ParamDef.description from descriptions.get_description() so callers
can read param.description directly; three callers (docs_gen, json_schema_gen,
params_cmd) migrated off the external get_description() import
- Delete _PREFIX_DESCS and _ATTR_DESCS (113 lines) in definitions.py: dead code
after _auto_describe was removed
- Add resolve_namelist_content() and TARGET_FROM_DIR to fortran_gen.py: single
canonical helper for the detect-generated-include pattern duplicated across
namelist_parser.py and lint_param_docs.py
- Consolidate NAMELIST_VARS to use _nv() helper: 200-line explicit dict replaced
by grouped calls (~75 lines); cmake_gen.py refactored to use get_generated_files()
- Switch test runner from hardcoded unittest module list to pytest discover; add
pytest to pyproject.toml; move three orphaned test files into params_tests/
- CMake: stamp-based caching so Fortran codegen only reruns when inputs change
- Extract _format_constraints_cell() in docs_gen.py: 5-line pattern duplicated
across pattern-view and full-table rendering paths
- Inline 4 single-use wrapper functions in case_dicts.py
Net vs master: -564 lines1 parent bdd386a commit af8dc52
18 files changed
Lines changed: 282 additions & 1381 deletions
File tree
- src/simulation
- toolchain
- bootstrap
- mfc
- params_tests
- params
- generators
- run
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
474 | 473 | | |
475 | | - | |
476 | | - | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
477 | 498 | | |
478 | 499 | | |
479 | 500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | 73 | | |
76 | 74 | | |
77 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 36 | + | |
41 | 37 | | |
42 | 38 | | |
43 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 83 | | |
127 | 84 | | |
128 | 85 | | |
| |||
185 | 142 | | |
186 | 143 | | |
187 | 144 | | |
| 145 | + | |
188 | 146 | | |
189 | 147 | | |
190 | 148 | | |
191 | 149 | | |
192 | 150 | | |
193 | 151 | | |
194 | | - | |
| 152 | + | |
195 | 153 | | |
196 | 154 | | |
197 | 155 | | |
| |||
0 commit comments