Skip to content

Commit 63fa54d

Browse files
chore: pyqual auto-fix iteration
1 parent 49c5ae9 commit 63fa54d

File tree

15 files changed

+142
-143
lines changed

15 files changed

+142
-143
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TODO
22

33
**Generated by:** prefact v0.1.30
4-
**Generated on:** 2026-03-31T16:24:24.128813
4+
**Generated on:** 2026-03-31T16:48:18.410478
55
**Total issues:** 53 active, 0 completed
66

77
---

docs/README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- code2docs:start --># regix
22

3-
![version](https://img.shields.io/badge/version-0.1.0-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![coverage](https://img.shields.io/badge/coverage-unknown-lightgrey) ![functions](https://img.shields.io/badge/functions-157-green)
4-
> **157** functions | **41** classes | **25** files | CC̄ = 4.9
3+
![version](https://img.shields.io/badge/version-0.1.0-blue) ![python](https://img.shields.io/badge/python-%3E%3D3.9-blue) ![coverage](https://img.shields.io/badge/coverage-unknown-lightgrey) ![functions](https://img.shields.io/badge/functions-166-green)
4+
> **166** functions | **41** classes | **25** files | CC̄ = 4.6
55
66
> Auto-generated project documentation from source code analysis.
77
@@ -153,7 +153,7 @@ Content outside the markers is preserved when regenerating. Enable this with `sy
153153

154154
```
155155
regix/
156-
├── project ├── check_regression ├── gates ├── exceptions ├── compare ├── config ├── history ├── cli ├── git ├── snapshot ├── report├── regix/ ├── cache ├── architecture_backend ├── smells ├── docstring_backend ├── vallm_backend ├── backends/ ├── radon_backend ├── coverage_backend ├── lizard_backend ├── integrations/ ├── models ├── structure_backend ├── benchmark```
156+
├── project ├── check_regression ├── gates ├── exceptions ├── compare├── regix/ ├── history ├── git ├── cli ├── snapshot ├── config ├── report ├── cache ├── smells ├── architecture_backend ├── docstring_backend ├── radon_backend ├── vallm_backend ├── backends/ ├── coverage_backend ├── models ├── integrations/ ├── lizard_backend ├── structure_backend ├── benchmark```
157157
158158
## API Overview
159159
@@ -164,18 +164,16 @@ regix/
164164
- **`GitDirtyError`** — Raised when the working tree is dirty and the operation requires a clean state.
165165
- **`BackendError`** — Raised when a backend fails to produce output.
166166
- **`ConfigError`** — Raised when the configuration file is invalid.
167+
- **`Regix`** — Main entry point — wraps snapshot, compare, and history.
168+
- **`CommitInfo`** — Lightweight commit metadata.
167169
- **`GateThresholds`** — Threshold set for a single tier (hard or target).
168170
- **`RegressionConfig`** — All user-configurable values for a Regix run.
169-
- **`CommitInfo`** — Lightweight commit metadata.
170-
- **`Regix`** — Main entry point — wraps snapshot, compare, and history.
171171
- **`ArchitectureBackend`** — Computes per-function structural metrics via AST for smell detection.
172-
- **`DocstringBackend`** — —
173-
- **`VallmBackend`** — —
172+
- **`DocstringBackend`** — Measure docstring coverage using the ``ast`` module.
173+
- **`RadonBackend`** — Maintainability index and cyclomatic complexity via ``radon``.
174+
- **`VallmBackend`** — LLM-based code quality scoring via the ``vallm`` CLI tool.
174175
- **`BackendBase`** — Interface that all analysis backends must implement.
175-
- **`RadonBackend`** — —
176176
- **`CoverageBackend`** — —
177-
- **`LizardBackend`** — —
178-
- **`RegixCollector`** — GateSet-compatible metric collector for pyqual.
179177
- **`SymbolMetrics`** — All tracked metrics for a single symbol (function, class, or module).
180178
- **`MetricDelta`** — Change in a single metric between two snapshots.
181179
- **`ArchSmell`** — An architectural regression smell detected by cross-symbol analysis.
@@ -189,7 +187,9 @@ regix/
189187
- **`HistoryReport`** — Multi-commit metric timeline.
190188
- **`GateCheck`** — Single gate threshold check.
191189
- **`GateResult`** — Aggregate gate evaluation result.
192-
- **`StructureBackend`** — —
190+
- **`RegixCollector`** — GateSet-compatible metric collector for pyqual.
191+
- **`LizardBackend`** — Cyclomatic complexity and function length via the ``lizard`` library.
192+
- **`StructureBackend`** — AST-based structural metrics: fan_out, call_count, symbol_count.
193193
- **`BenchmarkResult`** — —
194194
- **`BenchmarkProbe`** — Abstract benchmark probe.
195195
- **`ImportProbe`** — Measures import time of a Python module in a fresh process.
@@ -208,13 +208,6 @@ regix/
208208
- `check_gates(snapshot, config)` — Evaluate absolute quality gates against a single snapshot.
209209
- `compare(snap_before, snap_after, config)` — Compare two snapshots and produce a regression report.
210210
- `build_history(depth, ref, workdir, config)` — Walk ``depth`` commits and return a HistoryReport with metric timeline.
211-
- `compare(ref_a, ref_b, local, config)` — Compare metrics between two git refs or local state.
212-
- `history(depth, ref, metric, fmt)` — Show metric timeline across N historical commits.
213-
- `snapshot(ref, fmt, output, config)` — Capture and store a snapshot without comparing.
214-
- `diff(ref_a, ref_b, threshold, metric)` — Show symbol-by-symbol metric diff (like git diff for metrics).
215-
- `gates(ref, fail_on, config, workdir)` — Check current state against configured quality gates (absolute thresholds).
216-
- `status(config, workdir)` — Show Regix configuration and available backends.
217-
- `init(workdir)` — Create a default regix.yaml in the project root.
218211
- `resolve_ref(ref, workdir)` — Resolve a symbolic ref to a commit SHA.
219212
- `list_commits(ref, depth, workdir)` — Return commit history starting from *ref*, newest first.
220213
- `is_clean(workdir)` — Return True if there are no uncommitted changes.
@@ -223,6 +216,13 @@ regix/
223216
- `checkout_temporary(ref, workdir)` — Context manager: create a git worktree at *ref* in a temp directory.
224217
- `read_tree_sources(ref, workdir, suffix)` — Read all files matching *suffix* from a git ref entirely in RAM.
225218
- `read_local_sources(workdir, files)` — Read source code for *files* from the local working tree into RAM.
219+
- `compare(ref_a, ref_b, local, config)` — Compare metrics between two git refs or local state.
220+
- `history(depth, ref, metric, fmt)` — Show metric timeline across N historical commits.
221+
- `snapshot(ref, fmt, output, config)` — Capture and store a snapshot without comparing.
222+
- `diff(ref_a, ref_b, threshold, metric)` — Show symbol-by-symbol metric diff (like git diff for metrics).
223+
- `gates(ref, fail_on, config, workdir)` — Check current state against configured quality gates (absolute thresholds).
224+
- `status(config, workdir)` — Show Regix configuration and available backends.
225+
- `init(workdir)` — Create a default regix.yaml in the project root.
226226
- `capture(ref, workdir, config, backend_names)` — Capture a snapshot at a git ref or the local working tree.
227227
- `render(report, fmt, output)` — Render a regression report in the specified format.
228228
- `render_history(report, fmt)` — Render a history report.
@@ -254,7 +254,7 @@ regix/
254254
📄 `regix.cache` (5 functions)
255255
📄 `regix.cli` (8 functions)
256256
📄 `regix.compare` (4 functions)
257-
📄 `regix.config` (15 functions, 2 classes)
257+
📄 `regix.config` (24 functions, 2 classes)
258258
📄 `regix.exceptions` (4 functions, 5 classes)
259259
📄 `regix.gates` (2 functions)
260260
📄 `regix.git` (9 functions, 1 classes)

project/analysis.toon.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ HEALTH[8]:
77
🟡 CC compare CC=16 (limit:15)
88
🟡 CC diff CC=15 (limit:15)
99
🟡 CC capture CC=17 (limit:15)
10+
🟡 CC filter CC=15 (limit:15)
1011
🟡 CC collect CC=19 (limit:15)
1112
🟡 CC detect_smells CC=17 (limit:15)
12-
🟡 CC filter CC=15 (limit:15)
1313

1414
REFACTOR[3]:
1515
1. split regix/benchmark.py (god module)

project/calls.mmd

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
flowchart LR
22
subgraph regix__Regix
3-
regix__Regix__history["history"]
43
regix__Regix____init__["__init__"]
4+
regix__Regix__history["history"]
55
regix__Regix__snapshot["snapshot"]
66
end
77
subgraph regix__backends
8-
regix__backends__get_backend["get_backend"]
98
regix__backends__structure_backend__StructureBackend__collect["collect"]
109
regix__backends__structure_backend___analyse_function["_analyse_function"]
10+
regix__backends__get_backend["get_backend"]
1111
end
1212
subgraph regix__benchmark
13-
regix__benchmark___make_config_parse_probe["_make_config_parse_probe"]
14-
regix__benchmark__BackendProbe__run["run"]
15-
regix__benchmark__BenchmarkReporter__print_plain["print_plain"]
16-
regix__benchmark___make_gates_probe["_make_gates_probe"]
17-
regix__benchmark___make_snapshot_probe["_make_snapshot_probe"]
13+
regix__benchmark__BenchmarkReporter__print_json["print_json"]
1814
regix__benchmark___make_compare_probe["_make_compare_probe"]
15+
regix__benchmark___make_gates_probe["_make_gates_probe"]
1916
regix__benchmark__build_regix_suite["build_regix_suite"]
17+
regix__benchmark__BenchmarkReporter__print_plain["print_plain"]
2018
regix__benchmark__BenchmarkReporter__print["print"]
19+
regix__benchmark__BackendProbe__run["run"]
20+
regix__benchmark___make_snapshot_probe["_make_snapshot_probe"]
2121
regix__benchmark__main["main"]
22-
regix__benchmark__BenchmarkReporter__print_json["print_json"]
22+
regix__benchmark___make_config_parse_probe["_make_config_parse_probe"]
2323
end
2424
subgraph regix__cache
25+
regix__cache___cache_dir["_cache_dir"]
26+
regix__cache___cache_key["_cache_key"]
2527
regix__cache__lookup["lookup"]
2628
regix__cache__store["store"]
2729
regix__cache__clear["clear"]
28-
regix__cache___cache_dir["_cache_dir"]
29-
regix__cache___cache_key["_cache_key"]
3030
end
3131
subgraph regix__cli
32+
regix__cli__history["history"]
33+
regix__cli___load_config["_load_config"]
3234
regix__cli__snapshot["snapshot"]
35+
regix__cli__diff["diff"]
3336
regix__cli__gates["gates"]
34-
regix__cli___load_config["_load_config"]
3537
regix__cli__status["status"]
36-
regix__cli__history["history"]
37-
regix__cli__diff["diff"]
3838
end
3939
subgraph regix__compare
4040
regix__compare__compare["compare"]
@@ -49,15 +49,15 @@ flowchart LR
4949
regix__gates___passes["_passes"]
5050
end
5151
subgraph regix__git
52+
regix__git__get_dirty_files["get_dirty_files"]
53+
regix__git__read_tree_sources["read_tree_sources"]
5254
regix__git___run_git["_run_git"]
53-
regix__git__is_clean["is_clean"]
55+
regix__git__checkout_temporary["checkout_temporary"]
5456
regix__git__get_changed_files["get_changed_files"]
55-
regix__git__get_dirty_files["get_dirty_files"]
5657
regix__git__resolve_ref["resolve_ref"]
5758
regix__git__read_local_sources["read_local_sources"]
5859
regix__git__list_commits["list_commits"]
59-
regix__git__read_tree_sources["read_tree_sources"]
60-
regix__git__checkout_temporary["checkout_temporary"]
60+
regix__git__is_clean["is_clean"]
6161
end
6262
subgraph regix__history
6363
regix__history__build_history["build_history"]
@@ -66,28 +66,28 @@ flowchart LR
6666
regix__history___linear_slope["_linear_slope"]
6767
end
6868
subgraph regix__report
69-
regix__report__render["render"]
7069
regix__report___render_rich["_render_rich"]
70+
regix__report__render["render"]
7171
end
7272
subgraph regix__smells
73-
regix__smells___was_already_hollow["_was_already_hollow"]
73+
regix__smells___count_hollow_signals["_count_hollow_signals"]
74+
regix__smells___check_stub_regression["_check_stub_regression"]
75+
regix__smells___avg_func_length["_avg_func_length"]
76+
regix__smells___function_count_drop["_function_count_drop"]
7477
regix__smells___check_no_delegation["_check_no_delegation"]
75-
regix__smells___func_length["_func_length"]
7678
regix__smells___check_symbol_smells["_check_symbol_smells"]
79+
regix__smells___check_hallucination_proxy["_check_hallucination_proxy"]
80+
regix__smells___func_length["_func_length"]
81+
regix__smells___was_already_hollow["_was_already_hollow"]
7782
regix__smells___check_god_function["_check_god_function"]
78-
regix__smells___avg_func_length["_avg_func_length"]
79-
regix__smells___function_count_drop["_function_count_drop"]
80-
regix__smells___check_stub_regression["_check_stub_regression"]
81-
regix__smells__detect_smells["detect_smells"]
8283
regix__smells___largest_function["_largest_function"]
83-
regix__smells___count_hollow_signals["_count_hollow_signals"]
84-
regix__smells___check_hallucination_proxy["_check_hallucination_proxy"]
84+
regix__smells__detect_smells["detect_smells"]
8585
end
8686
subgraph regix__snapshot
87-
regix__snapshot___merge_symbols["_merge_symbols"]
88-
regix__snapshot___collect_files["_collect_files"]
8987
regix__snapshot__capture["capture"]
88+
regix__snapshot___merge_symbols["_merge_symbols"]
9089
regix__snapshot___filter_sources["_filter_sources"]
90+
regix__snapshot___collect_files["_collect_files"]
9191
end
9292
subgraph scripts__check_regression
9393
scripts__check_regression__check_regression["check_regression"]
@@ -98,21 +98,6 @@ flowchart LR
9898
scripts__check_regression__check_regression --> regix__benchmark__BenchmarkReporter__print
9999
regix__compare___compare_symbol_metrics --> regix__compare___compute_delta
100100
regix__compare__compare --> regix__smells__detect_smells
101-
regix__cli___load_config --> regix__config__RegressionConfig__from_file
102-
regix__cli__history --> regix__cli___load_config
103-
regix__cli__snapshot --> regix__cli___load_config
104-
regix__cli__snapshot --> regix__snapshot__capture
105-
regix__cli__diff --> regix__cli___load_config
106-
regix__cli__diff --> regix__snapshot__capture
107-
regix__cli__gates --> regix__cli___load_config
108-
regix__cli__gates --> regix__snapshot__capture
109-
regix__cli__gates --> regix__gates__check_gates
110-
regix__cli__status --> regix__cli___load_config
111-
regix__history___compute_trends --> regix__history___linear_slope
112-
regix__history__build_history --> regix__git__list_commits
113-
regix__history__build_history --> regix__snapshot__capture
114-
regix__history__build_history --> regix__history___compute_trends
115-
regix__history__build_history --> regix__history___aggregate_snapshot_metrics
116101
regix__git__resolve_ref --> regix__git___run_git
117102
regix__git__list_commits --> regix__git___run_git
118103
regix__git__is_clean --> regix__git___run_git
@@ -121,10 +106,24 @@ flowchart LR
121106
regix__git__checkout_temporary --> regix__git__resolve_ref
122107
regix__git__checkout_temporary --> regix__git___run_git
123108
regix__git__read_tree_sources --> regix__git__resolve_ref
109+
regix__history___compute_trends --> regix__history___linear_slope
110+
regix__history__build_history --> regix__git__list_commits
111+
regix__history__build_history --> regix__snapshot__capture
112+
regix__history__build_history --> regix__history___compute_trends
113+
regix__history__build_history --> regix__history___aggregate_snapshot_metrics
124114
regix__Regix____init__ --> regix__config__RegressionConfig__from_file
125115
regix__Regix__snapshot --> regix__snapshot__capture
126116
regix__Regix__history --> regix__history__build_history
127-
regix__report__render --> regix__report___render_rich
117+
regix__cli___load_config --> regix__config__RegressionConfig__from_file
118+
regix__cli__history --> regix__cli___load_config
119+
regix__cli__snapshot --> regix__cli___load_config
120+
regix__cli__snapshot --> regix__snapshot__capture
121+
regix__cli__diff --> regix__cli___load_config
122+
regix__cli__diff --> regix__snapshot__capture
123+
regix__cli__gates --> regix__cli___load_config
124+
regix__cli__gates --> regix__snapshot__capture
125+
regix__cli__gates --> regix__gates__check_gates
126+
regix__cli__status --> regix__cli___load_config
128127
regix__snapshot__capture --> regix__snapshot___merge_symbols
129128
regix__snapshot__capture --> regix__git__resolve_ref
130129
regix__snapshot__capture --> regix__backends__get_backend
@@ -137,6 +136,7 @@ flowchart LR
137136
regix__cache__store --> regix__cache___cache_dir
138137
regix__cache__store --> regix__cache___cache_key
139138
regix__cache__clear --> regix__cache___cache_dir
139+
regix__report__render --> regix__report___render_rich
140140
regix__smells__detect_smells --> regix__smells___check_god_function
141141
regix__smells__detect_smells --> regix__smells___check_symbol_smells
142142
regix__smells___check_symbol_smells --> regix__smells___check_hallucination_proxy

project/calls.png

-43.9 KB
Loading

project/compact_flow.mmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ flowchart TD
1717
scripts__check_regression -->|3| regix__benchmark
1818
regix__snapshot -->|3| regix__git
1919
regix__benchmark -->|3| regix__snapshot
20+
regix__Regix -->|2| regix__config
2021
regix__cli -->|2| regix__config
2122
regix__cli -->|2| regix__report
2223
regix__cli -->|2| regix__backends
23-
regix__Regix -->|2| regix__config
2424
regix__compare -->|1| regix__smells
25-
regix__cli -->|1| regix__history
26-
regix__cli -->|1| regix__gates
2725
regix__history -->|1| regix__git
2826
regix__history -->|1| regix__snapshot
2927
regix__Regix -->|1| regix__snapshot
3028
regix__Regix -->|1| regix__history
29+
regix__cli -->|1| regix__history
30+
regix__cli -->|1| regix__gates
3131
regix__snapshot -->|1| regix__backends
3232
regix__benchmark -->|1| regix__backends
3333
regix__benchmark -->|1| regix__gates

project/compact_flow.png

-5.06 KB
Loading

0 commit comments

Comments
 (0)