Commit b2f1c06
[WIP] Rewrite backends in Rust using Ruff's parser use parquet for storage and faster indexing (#238)
* start rust conversion
* Update CI
* simplify CI and reformat
* ignore artifacts
* further simplify
* rust function returns tuple collection
* use rich progress bars
* fix variable name reuse
* Simplify rust module
* working prototype before crate denormalization
* Use Ruff's API
* remove another radon dependency
* cyclomatic harvestor
* remove use of builtin exit
* halstead metrics
* use stdlib mode function
* Implement Halstead harvesters
* update assertions
* MI harvester
* Create a new file iterator and remove radon
* update lockfile
* Format tests
* happier syntax with 3.10
* tidy up
* cleanup deps
* better naming
* Use rust backend for processing
* ruff fixes
* Diff uses new parallel function
* remove unused import
* Update mocks in tests
* Improve halstead
* Enhance Maintainability Index calculation with improved Halstead and Cyclomatic complexity metrics
* align halstead
* update tests. update versions
* cleanup redundant code
* build wheels in CI
* rust cleanup
* simplify halstead cases
* add instructions for arch
* Use ujson for cache builds
* resort imports
* force arm on windows
* Use rich tables, don't archive shebang files by default (it's very slow)
* formatting
* don't assert on color
* remove redundant function
* formatting
* remove redundant tests
* baseline metrics
* BREAKING: Only store full metrics for the seed by default
* gen import lib
* build package as v2
* show commit/sec speed
* run metrics in parallel
* Render progress and speed together
* formatting
* iterate through git revisions in rust
* refactor the build process to call out the first pass as a separate step
* formatting updates
* Use rich logging
* run all tests on windows
* update test for new design
* include comma in loc stat
* use conversion traits
* cleaner conversions
* fix silly log assertions in tests
* cleanup
* Use traits for conversion
* Use unix-style paths across the index to remove a lot of the switching and make the index platform independent
* lint
* run aggregates in rust
* (temp) move the JSON serialization to rust before refactoring the whole thing into parquet
* parquet 1
* remove all the old json code
* Don't store the mega index
* use lz4 compression
* hold open the index as a context manager
* Don't look for indexes
* Start migrating the index and cache code to rust using the arrow libraries in rust
* move more of the index code out of Python
* Continue removing Python indexer
* linting
* we don't need ujson anymore
* move report command to new index format
* Update diff command
* cleanup old APIs
* lint updates
* ipynb support
* fix a bug with granular reports
* fix unit tests
* Compare each file against the last time it was indexed
* Move around imports
* fix argument
* we ended up reversing twice
* start refactor git
* Do all the filtering on Python files inside rust to minimise the data going back and forth. Use iterators in revisions to yield through them more efficiently
* Formatting
* fix import issues
* Simplify file indexer and work through broken tests
* remove noisy build debug logs
* Don't return details in index getitem, fix diff
* remove rank threshold
* format update
* remove the test for the deprecated flag
* rust linting
* Put sorting in the results for getitem
* Improve test
* Remove multi argument
* add diag
* add zstd compression
* drop diagnostic
* setup benchmarks
* Add extra timing stats
* why
* hashmap allocations
* big refactor to single parse
* update benchmarks
* Use compact strings for operand hashmaps
* Patch out diff for now
* Use some constr
* fix primitive sequence
* cleanup old test
* only add rank when needed in diff
* fix diff bug
* fully implement --no-detail flag
* allow diff against specific revision
* don't allow diff for non-indexed revisions
* refactor diff
* Add cognitive complexity metric and update related components
* Refactor CI workflow for release process and update versioning to 2.0.0-alpha.1; enhance cognitive complexity metrics and improve documentation in HISTORY.md
* Clean up code by removing unnecessary blank lines and optimizing list comprehensions for better readability
* Add before-script to install dependencies for Linux builds in CI
* Clean up crappy tests
* Update index tests to assert minimum occurrences of "An author" and clean up report test
* Enhance before-script for Linux builds to support multiple package managers
* Update CI before-script for Linux and add OpenSSL dependency in Cargo files
* Fix Linux wheel build by installing OpenSSL dev headers and missing Perl modules
The manylinux2014 container was missing openssl-devel and perl-Time-Piece,
causing openssl-sys to fail when building OpenSSL from source.
🐨 Generated with Crush
Assisted-by: Claude Opus 4.6 via Crush <crush@charm.land>
* Drop macos x64 since it doesnt' exist anymore
* Update to new sort command
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Anthony Shaw <anthonyshaw@microsoft.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 2d9685a commit b2f1c06
73 files changed
Lines changed: 11983 additions & 4910 deletions
File tree
- .github/workflows
- backend
- benches
- src
- docs/source/commands
- src/wily
- archivers
- commands
- config
- helper
- operators
- test
- integration
- unit
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
12 | 19 | | |
13 | 20 | | |
14 | 21 | | |
| |||
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| 55 | + | |
53 | 56 | | |
54 | 57 | | |
55 | 58 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 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 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
59 | 175 | | |
60 | | - | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
61 | 185 | | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
62 | 191 | | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | 115 | | |
113 | 116 | | |
114 | 117 | | |
115 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
0 commit comments