grimp 3.5__tar.gz → 3.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {grimp-3.5 → grimp-3.7}/PKG-INFO +3 -3
- {grimp-3.5 → grimp-3.7}/pyproject.toml +1 -1
- grimp-3.7/rust/Cargo.lock +543 -0
- grimp-3.7/rust/Cargo.toml +35 -0
- grimp-3.7/rust/src/errors.rs +35 -0
- grimp-3.7/rust/src/exceptions.rs +9 -0
- grimp-3.7/rust/src/graph/direct_import_queries.rs +126 -0
- grimp-3.7/rust/src/graph/graph_manipulation.rs +201 -0
- grimp-3.7/rust/src/graph/hierarchy_queries.rs +105 -0
- grimp-3.7/rust/src/graph/higher_order_queries.rs +210 -0
- grimp-3.7/rust/src/graph/import_chain_queries.rs +123 -0
- grimp-3.7/rust/src/graph/mod.rs +148 -0
- grimp-3.7/rust/src/graph/pathfinding.rs +126 -0
- grimp-3.7/rust/src/lib.rs +617 -0
- grimp-3.7/rust/src/module_expressions.rs +196 -0
- grimp-3.7/rust/tests/large.rs +52 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/__init__.py +3 -2
- grimp-3.7/src/grimp/adaptors/graph.py +229 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/graph.py +77 -2
- {grimp-3.5 → grimp-3.7}/src/grimp/exceptions.py +8 -0
- grimp-3.5/rust/Cargo.lock +0 -292
- grimp-3.5/rust/Cargo.toml +0 -21
- grimp-3.5/rust/src/containers.rs +0 -14
- grimp-3.5/rust/src/dependencies.rs +0 -13
- grimp-3.5/rust/src/importgraph.rs +0 -435
- grimp-3.5/rust/src/layers.rs +0 -699
- grimp-3.5/rust/src/lib.rs +0 -261
- grimp-3.5/rust/tests/large.rs +0 -47
- grimp-3.5/src/grimp/adaptors/_layers.py +0 -172
- grimp-3.5/src/grimp/adaptors/graph.py +0 -472
- {grimp-3.5 → grimp-3.7}/README.rst +0 -0
- /grimp-3.5/rust/.cargo/config → /grimp-3.7/rust/.cargo/config.toml +0 -0
- {grimp-3.5 → grimp-3.7}/rust/tests/large_graph.json +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/__init__.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/caching.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/filesystem.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/importscanner.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/modulefinder.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/packagefinder.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/adaptors/timing.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/algorithms/__init__.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/algorithms/shortest_path.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/__init__.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/config.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/__init__.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/caching.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/filesystem.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/importscanner.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/modulefinder.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/packagefinder.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/ports/timing.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/application/usecases.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/domain/__init__.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/domain/analysis.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/domain/valueobjects.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/helpers.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/main.py +0 -0
- {grimp-3.5 → grimp-3.7}/src/grimp/py.typed +0 -0
{grimp-3.5 → grimp-3.7}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: grimp
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.7
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: BSD License
|
|
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
16
16
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
17
17
|
Classifier: Programming Language :: Rust
|
|
18
18
|
Classifier: Topic :: Utilities
|
|
19
|
-
Requires-Dist: typing-extensions
|
|
19
|
+
Requires-Dist: typing-extensions>=3.10.0.0
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
License-File: AUTHORS.rst
|
|
22
22
|
Summary: Builds a queryable graph of the imports within one or more Python packages.
|
|
@@ -0,0 +1,543 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "_rustgrimp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
dependencies = [
|
|
9
|
+
"bimap",
|
|
10
|
+
"const_format",
|
|
11
|
+
"derive-new",
|
|
12
|
+
"getset",
|
|
13
|
+
"indexmap 2.7.1",
|
|
14
|
+
"itertools",
|
|
15
|
+
"lazy_static",
|
|
16
|
+
"parameterized",
|
|
17
|
+
"pyo3",
|
|
18
|
+
"rayon",
|
|
19
|
+
"regex",
|
|
20
|
+
"rustc-hash",
|
|
21
|
+
"serde_json",
|
|
22
|
+
"slotmap",
|
|
23
|
+
"string-interner",
|
|
24
|
+
"tap",
|
|
25
|
+
"thiserror",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[[package]]
|
|
29
|
+
name = "aho-corasick"
|
|
30
|
+
version = "1.1.3"
|
|
31
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
32
|
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
|
33
|
+
dependencies = [
|
|
34
|
+
"memchr",
|
|
35
|
+
]
|
|
36
|
+
|
|
37
|
+
[[package]]
|
|
38
|
+
name = "autocfg"
|
|
39
|
+
version = "1.4.0"
|
|
40
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
41
|
+
checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
|
|
42
|
+
|
|
43
|
+
[[package]]
|
|
44
|
+
name = "bimap"
|
|
45
|
+
version = "0.6.3"
|
|
46
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
47
|
+
checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7"
|
|
48
|
+
|
|
49
|
+
[[package]]
|
|
50
|
+
name = "cfg-if"
|
|
51
|
+
version = "1.0.0"
|
|
52
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
53
|
+
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
54
|
+
|
|
55
|
+
[[package]]
|
|
56
|
+
name = "const_format"
|
|
57
|
+
version = "0.2.34"
|
|
58
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
+
checksum = "126f97965c8ad46d6d9163268ff28432e8f6a1196a55578867832e3049df63dd"
|
|
60
|
+
dependencies = [
|
|
61
|
+
"const_format_proc_macros",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[[package]]
|
|
65
|
+
name = "const_format_proc_macros"
|
|
66
|
+
version = "0.2.34"
|
|
67
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
|
+
checksum = "1d57c2eccfb16dbac1f4e61e206105db5820c9d26c3c472bc17c774259ef7744"
|
|
69
|
+
dependencies = [
|
|
70
|
+
"proc-macro2",
|
|
71
|
+
"quote",
|
|
72
|
+
"unicode-xid",
|
|
73
|
+
]
|
|
74
|
+
|
|
75
|
+
[[package]]
|
|
76
|
+
name = "crossbeam-deque"
|
|
77
|
+
version = "0.8.6"
|
|
78
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
79
|
+
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
|
|
80
|
+
dependencies = [
|
|
81
|
+
"crossbeam-epoch",
|
|
82
|
+
"crossbeam-utils",
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
[[package]]
|
|
86
|
+
name = "crossbeam-epoch"
|
|
87
|
+
version = "0.9.18"
|
|
88
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
+
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
|
90
|
+
dependencies = [
|
|
91
|
+
"crossbeam-utils",
|
|
92
|
+
]
|
|
93
|
+
|
|
94
|
+
[[package]]
|
|
95
|
+
name = "crossbeam-utils"
|
|
96
|
+
version = "0.8.21"
|
|
97
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
98
|
+
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "derive-new"
|
|
102
|
+
version = "0.7.0"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "2cdc8d50f426189eef89dac62fabfa0abb27d5cc008f25bf4156a0203325becc"
|
|
105
|
+
dependencies = [
|
|
106
|
+
"proc-macro2",
|
|
107
|
+
"quote",
|
|
108
|
+
"syn",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "either"
|
|
113
|
+
version = "1.13.0"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
|
116
|
+
|
|
117
|
+
[[package]]
|
|
118
|
+
name = "equivalent"
|
|
119
|
+
version = "1.0.1"
|
|
120
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
121
|
+
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
|
122
|
+
|
|
123
|
+
[[package]]
|
|
124
|
+
name = "foldhash"
|
|
125
|
+
version = "0.1.4"
|
|
126
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
127
|
+
checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f"
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "getset"
|
|
131
|
+
version = "0.1.3"
|
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
+
checksum = "f636605b743120a8d32ed92fc27b6cde1a769f8f936c065151eb66f88ded513c"
|
|
134
|
+
dependencies = [
|
|
135
|
+
"proc-macro-error2",
|
|
136
|
+
"proc-macro2",
|
|
137
|
+
"quote",
|
|
138
|
+
"syn",
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
[[package]]
|
|
142
|
+
name = "hashbrown"
|
|
143
|
+
version = "0.12.3"
|
|
144
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
+
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
|
146
|
+
|
|
147
|
+
[[package]]
|
|
148
|
+
name = "hashbrown"
|
|
149
|
+
version = "0.15.2"
|
|
150
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
151
|
+
checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289"
|
|
152
|
+
dependencies = [
|
|
153
|
+
"foldhash",
|
|
154
|
+
]
|
|
155
|
+
|
|
156
|
+
[[package]]
|
|
157
|
+
name = "heck"
|
|
158
|
+
version = "0.5.0"
|
|
159
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
160
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "indexmap"
|
|
164
|
+
version = "1.9.3"
|
|
165
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
166
|
+
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
|
167
|
+
dependencies = [
|
|
168
|
+
"autocfg",
|
|
169
|
+
"hashbrown 0.12.3",
|
|
170
|
+
]
|
|
171
|
+
|
|
172
|
+
[[package]]
|
|
173
|
+
name = "indexmap"
|
|
174
|
+
version = "2.7.1"
|
|
175
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
176
|
+
checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652"
|
|
177
|
+
dependencies = [
|
|
178
|
+
"equivalent",
|
|
179
|
+
"hashbrown 0.15.2",
|
|
180
|
+
]
|
|
181
|
+
|
|
182
|
+
[[package]]
|
|
183
|
+
name = "indoc"
|
|
184
|
+
version = "2.0.5"
|
|
185
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
186
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
187
|
+
|
|
188
|
+
[[package]]
|
|
189
|
+
name = "itertools"
|
|
190
|
+
version = "0.14.0"
|
|
191
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
192
|
+
checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285"
|
|
193
|
+
dependencies = [
|
|
194
|
+
"either",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "itoa"
|
|
199
|
+
version = "1.0.14"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674"
|
|
202
|
+
|
|
203
|
+
[[package]]
|
|
204
|
+
name = "lazy_static"
|
|
205
|
+
version = "1.5.0"
|
|
206
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
207
|
+
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
208
|
+
|
|
209
|
+
[[package]]
|
|
210
|
+
name = "libc"
|
|
211
|
+
version = "0.2.169"
|
|
212
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
|
+
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
|
|
214
|
+
|
|
215
|
+
[[package]]
|
|
216
|
+
name = "memchr"
|
|
217
|
+
version = "2.7.4"
|
|
218
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
219
|
+
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
|
220
|
+
|
|
221
|
+
[[package]]
|
|
222
|
+
name = "memoffset"
|
|
223
|
+
version = "0.9.1"
|
|
224
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
226
|
+
dependencies = [
|
|
227
|
+
"autocfg",
|
|
228
|
+
]
|
|
229
|
+
|
|
230
|
+
[[package]]
|
|
231
|
+
name = "once_cell"
|
|
232
|
+
version = "1.20.2"
|
|
233
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
234
|
+
checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
|
|
235
|
+
|
|
236
|
+
[[package]]
|
|
237
|
+
name = "parameterized"
|
|
238
|
+
version = "2.0.0"
|
|
239
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
240
|
+
checksum = "194bf497674dda552d4f1bd24d325f828f425876c9d522fcb1810cd527e0bd4e"
|
|
241
|
+
dependencies = [
|
|
242
|
+
"parameterized-macro",
|
|
243
|
+
]
|
|
244
|
+
|
|
245
|
+
[[package]]
|
|
246
|
+
name = "parameterized-macro"
|
|
247
|
+
version = "2.0.0"
|
|
248
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
249
|
+
checksum = "1374bca5edab7a317c4ffbc9df1e239ceb7dcf5426b6b403474408442a9777ac"
|
|
250
|
+
dependencies = [
|
|
251
|
+
"indexmap 1.9.3",
|
|
252
|
+
"proc-macro2",
|
|
253
|
+
"quote",
|
|
254
|
+
"syn",
|
|
255
|
+
]
|
|
256
|
+
|
|
257
|
+
[[package]]
|
|
258
|
+
name = "portable-atomic"
|
|
259
|
+
version = "1.10.0"
|
|
260
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
261
|
+
checksum = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
|
|
262
|
+
|
|
263
|
+
[[package]]
|
|
264
|
+
name = "proc-macro-error-attr2"
|
|
265
|
+
version = "2.0.0"
|
|
266
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
267
|
+
checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5"
|
|
268
|
+
dependencies = [
|
|
269
|
+
"proc-macro2",
|
|
270
|
+
"quote",
|
|
271
|
+
]
|
|
272
|
+
|
|
273
|
+
[[package]]
|
|
274
|
+
name = "proc-macro-error2"
|
|
275
|
+
version = "2.0.1"
|
|
276
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
277
|
+
checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802"
|
|
278
|
+
dependencies = [
|
|
279
|
+
"proc-macro-error-attr2",
|
|
280
|
+
"proc-macro2",
|
|
281
|
+
"quote",
|
|
282
|
+
"syn",
|
|
283
|
+
]
|
|
284
|
+
|
|
285
|
+
[[package]]
|
|
286
|
+
name = "proc-macro2"
|
|
287
|
+
version = "1.0.93"
|
|
288
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
289
|
+
checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
|
|
290
|
+
dependencies = [
|
|
291
|
+
"unicode-ident",
|
|
292
|
+
]
|
|
293
|
+
|
|
294
|
+
[[package]]
|
|
295
|
+
name = "pyo3"
|
|
296
|
+
version = "0.23.4"
|
|
297
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
+
checksum = "57fe09249128b3173d092de9523eaa75136bf7ba85e0d69eca241c7939c933cc"
|
|
299
|
+
dependencies = [
|
|
300
|
+
"cfg-if",
|
|
301
|
+
"indoc",
|
|
302
|
+
"libc",
|
|
303
|
+
"memoffset",
|
|
304
|
+
"once_cell",
|
|
305
|
+
"portable-atomic",
|
|
306
|
+
"pyo3-build-config",
|
|
307
|
+
"pyo3-ffi",
|
|
308
|
+
"pyo3-macros",
|
|
309
|
+
"unindent",
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
[[package]]
|
|
313
|
+
name = "pyo3-build-config"
|
|
314
|
+
version = "0.23.4"
|
|
315
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
316
|
+
checksum = "1cd3927b5a78757a0d71aa9dff669f903b1eb64b54142a9bd9f757f8fde65fd7"
|
|
317
|
+
dependencies = [
|
|
318
|
+
"once_cell",
|
|
319
|
+
"target-lexicon",
|
|
320
|
+
]
|
|
321
|
+
|
|
322
|
+
[[package]]
|
|
323
|
+
name = "pyo3-ffi"
|
|
324
|
+
version = "0.23.4"
|
|
325
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
326
|
+
checksum = "dab6bb2102bd8f991e7749f130a70d05dd557613e39ed2deeee8e9ca0c4d548d"
|
|
327
|
+
dependencies = [
|
|
328
|
+
"libc",
|
|
329
|
+
"pyo3-build-config",
|
|
330
|
+
]
|
|
331
|
+
|
|
332
|
+
[[package]]
|
|
333
|
+
name = "pyo3-macros"
|
|
334
|
+
version = "0.23.4"
|
|
335
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
336
|
+
checksum = "91871864b353fd5ffcb3f91f2f703a22a9797c91b9ab497b1acac7b07ae509c7"
|
|
337
|
+
dependencies = [
|
|
338
|
+
"proc-macro2",
|
|
339
|
+
"pyo3-macros-backend",
|
|
340
|
+
"quote",
|
|
341
|
+
"syn",
|
|
342
|
+
]
|
|
343
|
+
|
|
344
|
+
[[package]]
|
|
345
|
+
name = "pyo3-macros-backend"
|
|
346
|
+
version = "0.23.4"
|
|
347
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
348
|
+
checksum = "43abc3b80bc20f3facd86cd3c60beed58c3e2aa26213f3cda368de39c60a27e4"
|
|
349
|
+
dependencies = [
|
|
350
|
+
"heck",
|
|
351
|
+
"proc-macro2",
|
|
352
|
+
"pyo3-build-config",
|
|
353
|
+
"quote",
|
|
354
|
+
"syn",
|
|
355
|
+
]
|
|
356
|
+
|
|
357
|
+
[[package]]
|
|
358
|
+
name = "quote"
|
|
359
|
+
version = "1.0.38"
|
|
360
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
361
|
+
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
|
|
362
|
+
dependencies = [
|
|
363
|
+
"proc-macro2",
|
|
364
|
+
]
|
|
365
|
+
|
|
366
|
+
[[package]]
|
|
367
|
+
name = "rayon"
|
|
368
|
+
version = "1.10.0"
|
|
369
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
370
|
+
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
|
371
|
+
dependencies = [
|
|
372
|
+
"either",
|
|
373
|
+
"rayon-core",
|
|
374
|
+
]
|
|
375
|
+
|
|
376
|
+
[[package]]
|
|
377
|
+
name = "rayon-core"
|
|
378
|
+
version = "1.12.1"
|
|
379
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
+
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
|
381
|
+
dependencies = [
|
|
382
|
+
"crossbeam-deque",
|
|
383
|
+
"crossbeam-utils",
|
|
384
|
+
]
|
|
385
|
+
|
|
386
|
+
[[package]]
|
|
387
|
+
name = "regex"
|
|
388
|
+
version = "1.11.1"
|
|
389
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
390
|
+
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
|
|
391
|
+
dependencies = [
|
|
392
|
+
"aho-corasick",
|
|
393
|
+
"memchr",
|
|
394
|
+
"regex-automata",
|
|
395
|
+
"regex-syntax",
|
|
396
|
+
]
|
|
397
|
+
|
|
398
|
+
[[package]]
|
|
399
|
+
name = "regex-automata"
|
|
400
|
+
version = "0.4.9"
|
|
401
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
402
|
+
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
|
|
403
|
+
dependencies = [
|
|
404
|
+
"aho-corasick",
|
|
405
|
+
"memchr",
|
|
406
|
+
"regex-syntax",
|
|
407
|
+
]
|
|
408
|
+
|
|
409
|
+
[[package]]
|
|
410
|
+
name = "regex-syntax"
|
|
411
|
+
version = "0.8.5"
|
|
412
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
413
|
+
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
414
|
+
|
|
415
|
+
[[package]]
|
|
416
|
+
name = "rustc-hash"
|
|
417
|
+
version = "2.1.0"
|
|
418
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
419
|
+
checksum = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
|
|
420
|
+
|
|
421
|
+
[[package]]
|
|
422
|
+
name = "ryu"
|
|
423
|
+
version = "1.0.18"
|
|
424
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
425
|
+
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
|
426
|
+
|
|
427
|
+
[[package]]
|
|
428
|
+
name = "serde"
|
|
429
|
+
version = "1.0.217"
|
|
430
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
431
|
+
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
|
|
432
|
+
dependencies = [
|
|
433
|
+
"serde_derive",
|
|
434
|
+
]
|
|
435
|
+
|
|
436
|
+
[[package]]
|
|
437
|
+
name = "serde_derive"
|
|
438
|
+
version = "1.0.217"
|
|
439
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
440
|
+
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
|
|
441
|
+
dependencies = [
|
|
442
|
+
"proc-macro2",
|
|
443
|
+
"quote",
|
|
444
|
+
"syn",
|
|
445
|
+
]
|
|
446
|
+
|
|
447
|
+
[[package]]
|
|
448
|
+
name = "serde_json"
|
|
449
|
+
version = "1.0.137"
|
|
450
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
451
|
+
checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b"
|
|
452
|
+
dependencies = [
|
|
453
|
+
"itoa",
|
|
454
|
+
"memchr",
|
|
455
|
+
"ryu",
|
|
456
|
+
"serde",
|
|
457
|
+
]
|
|
458
|
+
|
|
459
|
+
[[package]]
|
|
460
|
+
name = "slotmap"
|
|
461
|
+
version = "1.0.7"
|
|
462
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
463
|
+
checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
|
|
464
|
+
dependencies = [
|
|
465
|
+
"version_check",
|
|
466
|
+
]
|
|
467
|
+
|
|
468
|
+
[[package]]
|
|
469
|
+
name = "string-interner"
|
|
470
|
+
version = "0.18.0"
|
|
471
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
472
|
+
checksum = "1a3275464d7a9f2d4cac57c89c2ef96a8524dba2864c8d6f82e3980baf136f9b"
|
|
473
|
+
dependencies = [
|
|
474
|
+
"hashbrown 0.15.2",
|
|
475
|
+
"serde",
|
|
476
|
+
]
|
|
477
|
+
|
|
478
|
+
[[package]]
|
|
479
|
+
name = "syn"
|
|
480
|
+
version = "2.0.96"
|
|
481
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
482
|
+
checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
|
|
483
|
+
dependencies = [
|
|
484
|
+
"proc-macro2",
|
|
485
|
+
"quote",
|
|
486
|
+
"unicode-ident",
|
|
487
|
+
]
|
|
488
|
+
|
|
489
|
+
[[package]]
|
|
490
|
+
name = "tap"
|
|
491
|
+
version = "1.0.1"
|
|
492
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
493
|
+
checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
|
|
494
|
+
|
|
495
|
+
[[package]]
|
|
496
|
+
name = "target-lexicon"
|
|
497
|
+
version = "0.12.16"
|
|
498
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
499
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
500
|
+
|
|
501
|
+
[[package]]
|
|
502
|
+
name = "thiserror"
|
|
503
|
+
version = "2.0.11"
|
|
504
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
505
|
+
checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc"
|
|
506
|
+
dependencies = [
|
|
507
|
+
"thiserror-impl",
|
|
508
|
+
]
|
|
509
|
+
|
|
510
|
+
[[package]]
|
|
511
|
+
name = "thiserror-impl"
|
|
512
|
+
version = "2.0.11"
|
|
513
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
514
|
+
checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2"
|
|
515
|
+
dependencies = [
|
|
516
|
+
"proc-macro2",
|
|
517
|
+
"quote",
|
|
518
|
+
"syn",
|
|
519
|
+
]
|
|
520
|
+
|
|
521
|
+
[[package]]
|
|
522
|
+
name = "unicode-ident"
|
|
523
|
+
version = "1.0.14"
|
|
524
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
525
|
+
checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
|
|
526
|
+
|
|
527
|
+
[[package]]
|
|
528
|
+
name = "unicode-xid"
|
|
529
|
+
version = "0.2.6"
|
|
530
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
531
|
+
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
|
|
532
|
+
|
|
533
|
+
[[package]]
|
|
534
|
+
name = "unindent"
|
|
535
|
+
version = "0.2.3"
|
|
536
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
537
|
+
checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce"
|
|
538
|
+
|
|
539
|
+
[[package]]
|
|
540
|
+
name = "version_check"
|
|
541
|
+
version = "0.9.5"
|
|
542
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
543
|
+
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "_rustgrimp"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
|
|
6
|
+
[lib]
|
|
7
|
+
name = "_rustgrimp"
|
|
8
|
+
crate-type = ["cdylib", "rlib"]
|
|
9
|
+
|
|
10
|
+
[dependencies]
|
|
11
|
+
rayon = "1.10"
|
|
12
|
+
bimap = "0.6.3"
|
|
13
|
+
slotmap = "1.0.7"
|
|
14
|
+
getset = "0.1.3"
|
|
15
|
+
derive-new = "0.7.0"
|
|
16
|
+
lazy_static = "1.5.0"
|
|
17
|
+
string-interner = "0.18.0"
|
|
18
|
+
thiserror = "2.0.11"
|
|
19
|
+
itertools = "0.14.0"
|
|
20
|
+
tap = "1.0.1"
|
|
21
|
+
rustc-hash = "2.1.0"
|
|
22
|
+
indexmap = "2.7.1"
|
|
23
|
+
regex = "1.11.1"
|
|
24
|
+
const_format = "0.2.34"
|
|
25
|
+
|
|
26
|
+
[dependencies.pyo3]
|
|
27
|
+
version = "0.23.4"
|
|
28
|
+
|
|
29
|
+
[features]
|
|
30
|
+
extension-module = ["pyo3/extension-module"]
|
|
31
|
+
default = ["extension-module"]
|
|
32
|
+
|
|
33
|
+
[dev-dependencies]
|
|
34
|
+
parameterized = "2.0.0"
|
|
35
|
+
serde_json = "1.0.137"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
use crate::exceptions::{InvalidModuleExpression, ModuleNotPresent, NoSuchContainer};
|
|
2
|
+
use pyo3::exceptions::PyValueError;
|
|
3
|
+
use pyo3::PyErr;
|
|
4
|
+
use thiserror::Error;
|
|
5
|
+
|
|
6
|
+
#[derive(Debug, Error)]
|
|
7
|
+
pub enum GrimpError {
|
|
8
|
+
#[error("Module {0} is not present in the graph.")]
|
|
9
|
+
ModuleNotPresent(String),
|
|
10
|
+
|
|
11
|
+
#[error("Container {0} does not exist.")]
|
|
12
|
+
NoSuchContainer(String),
|
|
13
|
+
|
|
14
|
+
#[error("Modules have shared descendants.")]
|
|
15
|
+
SharedDescendants,
|
|
16
|
+
|
|
17
|
+
#[error("{0} is not a valid module expression.")]
|
|
18
|
+
InvalidModuleExpression(String),
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
pub type GrimpResult<T> = Result<T, GrimpError>;
|
|
22
|
+
|
|
23
|
+
impl From<GrimpError> for PyErr {
|
|
24
|
+
fn from(value: GrimpError) -> Self {
|
|
25
|
+
// A default mapping from `GrimpError`s to python exceptions.
|
|
26
|
+
match value {
|
|
27
|
+
GrimpError::ModuleNotPresent(_) => ModuleNotPresent::new_err(value.to_string()),
|
|
28
|
+
GrimpError::NoSuchContainer(_) => NoSuchContainer::new_err(value.to_string()),
|
|
29
|
+
GrimpError::SharedDescendants => PyValueError::new_err(value.to_string()),
|
|
30
|
+
GrimpError::InvalidModuleExpression(_) => {
|
|
31
|
+
InvalidModuleExpression::new_err(value.to_string())
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
use pyo3::create_exception;
|
|
2
|
+
|
|
3
|
+
create_exception!(_rustgrimp, ModuleNotPresent, pyo3::exceptions::PyException);
|
|
4
|
+
create_exception!(_rustgrimp, NoSuchContainer, pyo3::exceptions::PyException);
|
|
5
|
+
create_exception!(
|
|
6
|
+
_rustgrimp,
|
|
7
|
+
InvalidModuleExpression,
|
|
8
|
+
pyo3::exceptions::PyException
|
|
9
|
+
);
|