Commit a078d9a
committed
refactor(generator): 6-step wizard, one decision per page
The old step 2 was a vertedero: major levels, minor levels, feature
counts, tree depth, relation distribution slider, feature-cardinality
block and group-cardinality block — all on a single scroll-heavy page.
Step 1 also mixed batch basics (num_models/seed/prefix) with
post-processing options (ensure_satisfiable, filename suffixes).
New layout — every step answers exactly one question:
1 Batch num_models, seed, name_prefix
2 Language levels major + minor toggles (pure expressivity)
3 Feature tree features/depth/relation dist + feat/group card
4 Constraints counts, vars/ctc, CTC_DIST + prob distributions
5 Attributes random/manual, DIST_BOOLEAN/INT/REAL/STRING
6 Output ensure_satisfiable, suffixes, download
Internals
- routes.py split into one validator per step (validate_step1..step6)
plus one _apply_stepN_xxx persistor each. Each step only writes the
fields it owns, so back-nav can't silently drop state from later
steps.
- _apply_step2_levels now normalises TYPE_LEVEL \u2192 ARITHMETIC_LEVEL so the
session always matches what Params.__post_init__ would produce.
- step2 UI script moved inside #stepper_generator so wizard-spa.js
re-executes it on every SPA swap; the change handlers survive
prev/next navigation.
Tests
- 367 generator tests green (13 engine + 22 validator + 140+ wizard
output + 12 wizard flow + assorted contract/unit).
- 454 uvlhub tests green overall, 0 flake8 errors.1 parent 7a58a6f commit a078d9a
12 files changed
Lines changed: 2782 additions & 2661 deletions
File tree
- app/modules/generator
- templates/generator
- tests
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | | - | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
| |||
18 | 25 | | |
19 | 26 | | |
20 | 27 | | |
21 | | - | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | 36 | | |
44 | 37 | | |
45 | 38 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
0 commit comments