Commit 30fc010
authored
fix: improve mrt init UX — fix db_url quoting bug, clearer prompts and next steps (#54)
* docs: update pre-commit section with args example, fix stale v1.3.0 refs
- pre-commit section: add args example for Alembic and Django, note on
pre-commit autoupdate, update rev from v1.3.0 to v1.2.0
- Remove (v1.3.0) version labels from section headers for unreleased features
- Update 'What's new' section to reflect v1.2.0 accurately
Closes #35
* fix: improve mrt init UX — fix db_url quoting bug, clearer prompts and next steps
Three issues fixed:
1. db_url quoting bug: when a user typed a literal URL (e.g. sqlite:///test.db),
it was written as db_url=sqlite:///test.db without quotes — invalid Python.
Now correctly written as db_url="sqlite:///test.db".
2. Confusing default prompt: the old default was the raw Python expression
os.environ.get("TEST_DATABASE_URL", "sqlite:///test.db") which is unclear
for first-time users. Default is now simply sqlite:///test.db with a tip
explaining the env var pattern for CI.
3. Weak next steps: the completion message now shows numbered steps, static
analysis command, and a docs link — so users know exactly what to do next.
Also removes unnecessary 'import os' from generated conftest when a literal
URL is used (os is only imported when the url expr references os.environ).1 parent aa59bff commit 30fc010
2 files changed
Lines changed: 83 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| 166 | + | |
166 | 167 | | |
167 | | - | |
| 168 | + | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
170 | 179 | | |
171 | 180 | | |
172 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
173 | 184 | | |
174 | 185 | | |
175 | 186 | | |
| |||
247 | 258 | | |
248 | 259 | | |
249 | 260 | | |
250 | | - | |
| 261 | + | |
251 | 262 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
256 | 268 | | |
257 | 269 | | |
258 | 270 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
21 | 40 | | |
22 | | - | |
23 | | - | |
| 41 | + | |
24 | 42 | | |
25 | 43 | | |
26 | 44 | | |
27 | | - | |
28 | | - | |
| 45 | + | |
| 46 | + | |
29 | 47 | | |
30 | 48 | | |
31 | 49 | | |
32 | 50 | | |
33 | 51 | | |
| 52 | + | |
34 | 53 | | |
35 | 54 | | |
36 | 55 | | |
37 | 56 | | |
38 | 57 | | |
39 | 58 | | |
40 | 59 | | |
41 | | - | |
| 60 | + | |
42 | 61 | | |
43 | 62 | | |
44 | 63 | | |
| |||
53 | 72 | | |
54 | 73 | | |
55 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
56 | 79 | | |
57 | 80 | | |
58 | | - | |
| 81 | + | |
59 | 82 | | |
60 | 83 | | |
61 | 84 | | |
62 | 85 | | |
63 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
64 | 94 | | |
65 | | - | |
66 | | - | |
| 95 | + | |
67 | 96 | | |
68 | 97 | | |
69 | | - | |
| 98 | + | |
70 | 99 | | |
71 | 100 | | |
72 | 101 | | |
| |||
97 | 126 | | |
98 | 127 | | |
99 | 128 | | |
100 | | - | |
101 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
102 | 133 | | |
103 | | - | |
104 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
105 | 139 | | |
106 | 140 | | |
107 | 141 | | |
| |||
124 | 158 | | |
125 | 159 | | |
126 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
127 | 165 | | |
128 | 166 | | |
129 | | - | |
| 167 | + | |
130 | 168 | | |
131 | 169 | | |
132 | 170 | | |
| |||
153 | 191 | | |
154 | 192 | | |
155 | 193 | | |
156 | | - | |
157 | | - | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
0 commit comments