Commit 1f09150
authored
* feat(status): redesign status command; add validate command; add export sqlite
- status: four verbosity levels (compact/normal/verbose/extra-verbose, default normal)
- compact: one-line CI summary
- normal: verdict list grouped COMPLETE-first then INCOMPLETE with per-req reason
- verbose: today's per-req table without %-breakdown blocks
- extra-verbose: verdict list with per-req SVC/MVR/test drill-down
- status: --incomplete flag to narrow to incomplete requirements only
- status: --req-ids/--svc-ids filtering for --format json
- status: --verbosity is console-only; warns+ignores when --format json
- status: --group-by/--sort-by removed from status subparsers (not applicable)
- export: add --format sqlite via SQLite backup API (requires -o <file>)
- validate: new command surfacing SemanticValidator + coverage checks
- reports requirements without SVCs and manual SVCs without MVRs
- referential errors = fail; coverage gaps = warning (--strict to fail)
- remove deprecated generate-json command
- export_service: add resolve_filter_scope() public helper
- database: add backup_to(path) method (clears authorizer for backup API)
Closes #311
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* fix(status): address code review findings
- _filtered_status_dict: use `is not None` instead of truthiness check so
--req-ids with a nonexistent ID correctly returns zero requirements (empty
set is falsy and was treated as "no filter applied")
- backup_to: restore authorizer in finally block so any post-backup queries
on the same connection still run under the security policy
- StatisticsService: add public `initial_urn` property; remove direct `_repo`
access from status rendering functions
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* refactor(status): apply full-pr-review findings
- Extract VerbosityLevel enum; use in command.py choices and status.py match
- Rename incomplete → incomplete_only consistently in Python code (CLI --incomplete unchanged)
- Extract _status_verdict(), _build_sections() to eliminate duplication between
_status_normal and _status_extra_verbose
- Add type annotations to _incomplete_reasons, _build_drill_down_block, _render_mvrs,
_render_test_results (_build_drill_down_block imports UrnId, SVCData, MVRData)
- getattr(export_args, "no_filters", False) for defensive access consistency
- Clarify backup_to() docstring (always restores authorizer, even on error)
- Help text on --req-ids / --svc-ids: note they follow the location subcommand
- Tests: strict-no-warnings exits 0; referential errors exit 1; non-IN_CODE
_incomplete_reasons; --verbosity warning logged for --format json; VerbosityLevel enum
- Fix sqlite conn leak in test (close() in finally block)
- Restore removed explanatory comments in _summarize_statistics
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* style: apply black formatting
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* fix(tests): rename ambiguous variable l → line (E741)
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* fix: commit before sqlite backup; update test_command for removed generate-json
- database.py: commit open transaction before backup_to() so Connection.backup()
does not block waiting for write lock (populator leaves transaction uncommitted)
- test_command.py: replace generate-json tests (removed command) with validate
routing test
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* fix(e2e): update generate-json e2e test to verify command was removed
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* docs(usage): update for status redesign, new validate command, export sqlite
- status: replace stale table example with new verbosity-level reference
(compact/normal/verbose/extra-verbose), document --incomplete flag, note
that --verbosity is console-only
- validate: add new command section (spec completeness, --strict, example output)
- export: document --format sqlite option; remove generate-json section (command removed)
- synopsis: add validate to command list
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* docs: update index and how_it_works for status/validate changes
- index.adoc: expand feature list to mention spec validation and sqlite export
- how_it_works.adoc: add validate to command component label;
update sequence diagram end label from "status table" to "status verdict"
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
* refactor(status): remove dead _summarize_statistics and its tests
The %-breakdown tables (In Code / Config / Platform / Framework / N/A +
test & SVC totals) were removed from default status output in the #311
redesign. No CLI command calls _summarize_statistics; its only callers
were the unit tests themselves. Remove function + private helpers
(__numbers_as_percentage, __colorize_headers) + 9 test cases.
Also drop now-unused Columns and TotalStats imports.
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
---------
Signed-off-by: Jimisola Laursen <jimisola@jimisola.com>
1 parent 17543ba commit 1f09150
16 files changed
Lines changed: 1043 additions & 440 deletions
File tree
- docs/modules/ROOT/pages
- src/reqstool
- commands
- status
- validate
- services
- storage
- tests
- e2e
- unit/reqstool
- commands
- status
- validate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
| 112 | + | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 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 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
72 | 146 | | |
73 | 147 | | |
74 | 148 | | |
75 | 149 | | |
76 | 150 | | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
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 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
123 | 160 | | |
124 | 161 | | |
125 | 162 | | |
| |||
153 | 190 | | |
154 | 191 | | |
155 | 192 | | |
| 193 | + | |
156 | 194 | | |
157 | 195 | | |
158 | 196 | | |
| |||
183 | 221 | | |
184 | 222 | | |
185 | 223 | | |
186 | | - | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
187 | 229 | | |
188 | 230 | | |
189 | 231 | | |
190 | 232 | | |
191 | 233 | | |
| 234 | + | |
192 | 235 | | |
193 | 236 | | |
194 | 237 | | |
195 | 238 | | |
196 | 239 | | |
197 | 240 | | |
198 | | - | |
199 | | - | |
200 | | - | |
| 241 | + | |
| 242 | + | |
201 | 243 | | |
202 | 244 | | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 245 | | |
219 | 246 | | |
220 | 247 | | |
| |||
0 commit comments