snowflake-code-unit-registry 0.0.1__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.
- snowflake_code_unit_registry-0.0.1/Cargo.lock +589 -0
- snowflake_code_unit_registry-0.0.1/Cargo.toml +17 -0
- snowflake_code_unit_registry-0.0.1/PKG-INFO +100 -0
- snowflake_code_unit_registry-0.0.1/README.md +78 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/Cargo.toml +20 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/build.rs +86 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/error.rs +79 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/filter.rs +675 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/generated/mod.rs +3 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/identity.rs +31 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/lib.rs +22 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-core/src/project.rs +714 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-python/Cargo.toml +17 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-python/README.md +78 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-python/python/snowflake_code_unit_registry/__init__.py +113 -0
- snowflake_code_unit_registry-0.0.1/crates/scai-state-python/src/lib.rs +201 -0
- snowflake_code_unit_registry-0.0.1/pyproject.toml +37 -0
- snowflake_code_unit_registry-0.0.1/python/snowflake_code_unit_registry/__init__.py +113 -0
|
@@ -0,0 +1,589 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "allocator-api2"
|
|
7
|
+
version = "0.2.21"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "autocfg"
|
|
13
|
+
version = "1.5.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "bumpalo"
|
|
19
|
+
version = "3.19.1"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "cfg-if"
|
|
25
|
+
version = "1.0.4"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "dyn-clone"
|
|
31
|
+
version = "1.0.20"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "equivalent"
|
|
37
|
+
version = "1.0.2"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "foldhash"
|
|
43
|
+
version = "0.2.0"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
|
|
46
|
+
|
|
47
|
+
[[package]]
|
|
48
|
+
name = "fs2"
|
|
49
|
+
version = "0.4.3"
|
|
50
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
51
|
+
checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213"
|
|
52
|
+
dependencies = [
|
|
53
|
+
"libc",
|
|
54
|
+
"winapi",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[[package]]
|
|
58
|
+
name = "getrandom"
|
|
59
|
+
version = "0.3.4"
|
|
60
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
61
|
+
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
|
|
62
|
+
dependencies = [
|
|
63
|
+
"cfg-if",
|
|
64
|
+
"libc",
|
|
65
|
+
"r-efi",
|
|
66
|
+
"wasip2",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[[package]]
|
|
70
|
+
name = "hashbrown"
|
|
71
|
+
version = "0.16.1"
|
|
72
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
73
|
+
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
|
74
|
+
dependencies = [
|
|
75
|
+
"allocator-api2",
|
|
76
|
+
"equivalent",
|
|
77
|
+
"foldhash",
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
[[package]]
|
|
81
|
+
name = "heck"
|
|
82
|
+
version = "0.5.0"
|
|
83
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
84
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "indoc"
|
|
88
|
+
version = "2.0.7"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"rustversion",
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "itoa"
|
|
97
|
+
version = "1.0.17"
|
|
98
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
99
|
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
100
|
+
|
|
101
|
+
[[package]]
|
|
102
|
+
name = "js-sys"
|
|
103
|
+
version = "0.3.85"
|
|
104
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
105
|
+
checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
|
|
106
|
+
dependencies = [
|
|
107
|
+
"once_cell",
|
|
108
|
+
"wasm-bindgen",
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "libc"
|
|
113
|
+
version = "0.2.181"
|
|
114
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
115
|
+
checksum = "459427e2af2b9c839b132acb702a1c654d95e10f8c326bfc2ad11310e458b1c5"
|
|
116
|
+
|
|
117
|
+
[[package]]
|
|
118
|
+
name = "log"
|
|
119
|
+
version = "0.4.29"
|
|
120
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
121
|
+
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|
122
|
+
|
|
123
|
+
[[package]]
|
|
124
|
+
name = "memchr"
|
|
125
|
+
version = "2.8.0"
|
|
126
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
127
|
+
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
|
|
128
|
+
|
|
129
|
+
[[package]]
|
|
130
|
+
name = "memoffset"
|
|
131
|
+
version = "0.9.1"
|
|
132
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
134
|
+
dependencies = [
|
|
135
|
+
"autocfg",
|
|
136
|
+
]
|
|
137
|
+
|
|
138
|
+
[[package]]
|
|
139
|
+
name = "once_cell"
|
|
140
|
+
version = "1.21.3"
|
|
141
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
142
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
143
|
+
|
|
144
|
+
[[package]]
|
|
145
|
+
name = "portable-atomic"
|
|
146
|
+
version = "1.13.1"
|
|
147
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
148
|
+
checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
|
|
149
|
+
|
|
150
|
+
[[package]]
|
|
151
|
+
name = "proc-macro2"
|
|
152
|
+
version = "1.0.106"
|
|
153
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
154
|
+
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
155
|
+
dependencies = [
|
|
156
|
+
"unicode-ident",
|
|
157
|
+
]
|
|
158
|
+
|
|
159
|
+
[[package]]
|
|
160
|
+
name = "pyo3"
|
|
161
|
+
version = "0.24.2"
|
|
162
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
163
|
+
checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219"
|
|
164
|
+
dependencies = [
|
|
165
|
+
"cfg-if",
|
|
166
|
+
"indoc",
|
|
167
|
+
"libc",
|
|
168
|
+
"memoffset",
|
|
169
|
+
"once_cell",
|
|
170
|
+
"portable-atomic",
|
|
171
|
+
"pyo3-build-config",
|
|
172
|
+
"pyo3-ffi",
|
|
173
|
+
"pyo3-macros",
|
|
174
|
+
"unindent",
|
|
175
|
+
]
|
|
176
|
+
|
|
177
|
+
[[package]]
|
|
178
|
+
name = "pyo3-build-config"
|
|
179
|
+
version = "0.24.2"
|
|
180
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
181
|
+
checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999"
|
|
182
|
+
dependencies = [
|
|
183
|
+
"once_cell",
|
|
184
|
+
"target-lexicon",
|
|
185
|
+
]
|
|
186
|
+
|
|
187
|
+
[[package]]
|
|
188
|
+
name = "pyo3-ffi"
|
|
189
|
+
version = "0.24.2"
|
|
190
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
191
|
+
checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33"
|
|
192
|
+
dependencies = [
|
|
193
|
+
"libc",
|
|
194
|
+
"pyo3-build-config",
|
|
195
|
+
]
|
|
196
|
+
|
|
197
|
+
[[package]]
|
|
198
|
+
name = "pyo3-macros"
|
|
199
|
+
version = "0.24.2"
|
|
200
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
201
|
+
checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9"
|
|
202
|
+
dependencies = [
|
|
203
|
+
"proc-macro2",
|
|
204
|
+
"pyo3-macros-backend",
|
|
205
|
+
"quote",
|
|
206
|
+
"syn",
|
|
207
|
+
]
|
|
208
|
+
|
|
209
|
+
[[package]]
|
|
210
|
+
name = "pyo3-macros-backend"
|
|
211
|
+
version = "0.24.2"
|
|
212
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
213
|
+
checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a"
|
|
214
|
+
dependencies = [
|
|
215
|
+
"heck",
|
|
216
|
+
"proc-macro2",
|
|
217
|
+
"pyo3-build-config",
|
|
218
|
+
"quote",
|
|
219
|
+
"syn",
|
|
220
|
+
]
|
|
221
|
+
|
|
222
|
+
[[package]]
|
|
223
|
+
name = "quote"
|
|
224
|
+
version = "1.0.44"
|
|
225
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
+
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
|
|
227
|
+
dependencies = [
|
|
228
|
+
"proc-macro2",
|
|
229
|
+
]
|
|
230
|
+
|
|
231
|
+
[[package]]
|
|
232
|
+
name = "r-efi"
|
|
233
|
+
version = "5.3.0"
|
|
234
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
235
|
+
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
|
|
236
|
+
|
|
237
|
+
[[package]]
|
|
238
|
+
name = "regress"
|
|
239
|
+
version = "0.10.5"
|
|
240
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
241
|
+
checksum = "2057b2325e68a893284d1538021ab90279adac1139957ca2a74426c6f118fb48"
|
|
242
|
+
dependencies = [
|
|
243
|
+
"hashbrown",
|
|
244
|
+
"memchr",
|
|
245
|
+
]
|
|
246
|
+
|
|
247
|
+
[[package]]
|
|
248
|
+
name = "rustversion"
|
|
249
|
+
version = "1.0.22"
|
|
250
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
251
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
252
|
+
|
|
253
|
+
[[package]]
|
|
254
|
+
name = "scai-state-core"
|
|
255
|
+
version = "0.0.1"
|
|
256
|
+
dependencies = [
|
|
257
|
+
"fs2",
|
|
258
|
+
"regress",
|
|
259
|
+
"schemars",
|
|
260
|
+
"serde",
|
|
261
|
+
"serde_json",
|
|
262
|
+
"sqlparser",
|
|
263
|
+
"thiserror",
|
|
264
|
+
"typify",
|
|
265
|
+
"uuid",
|
|
266
|
+
]
|
|
267
|
+
|
|
268
|
+
[[package]]
|
|
269
|
+
name = "scai-state-csharp"
|
|
270
|
+
version = "0.0.1"
|
|
271
|
+
dependencies = [
|
|
272
|
+
"scai-state-core",
|
|
273
|
+
"serde",
|
|
274
|
+
"serde_json",
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
[[package]]
|
|
278
|
+
name = "scai-state-python"
|
|
279
|
+
version = "0.0.1"
|
|
280
|
+
dependencies = [
|
|
281
|
+
"pyo3",
|
|
282
|
+
"scai-state-core",
|
|
283
|
+
"serde",
|
|
284
|
+
"serde_json",
|
|
285
|
+
]
|
|
286
|
+
|
|
287
|
+
[[package]]
|
|
288
|
+
name = "schemars"
|
|
289
|
+
version = "0.8.22"
|
|
290
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
291
|
+
checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"
|
|
292
|
+
dependencies = [
|
|
293
|
+
"dyn-clone",
|
|
294
|
+
"schemars_derive",
|
|
295
|
+
"serde",
|
|
296
|
+
"serde_json",
|
|
297
|
+
]
|
|
298
|
+
|
|
299
|
+
[[package]]
|
|
300
|
+
name = "schemars_derive"
|
|
301
|
+
version = "0.8.22"
|
|
302
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
303
|
+
checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"
|
|
304
|
+
dependencies = [
|
|
305
|
+
"proc-macro2",
|
|
306
|
+
"quote",
|
|
307
|
+
"serde_derive_internals",
|
|
308
|
+
"syn",
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
[[package]]
|
|
312
|
+
name = "semver"
|
|
313
|
+
version = "1.0.27"
|
|
314
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
315
|
+
checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
|
|
316
|
+
dependencies = [
|
|
317
|
+
"serde",
|
|
318
|
+
"serde_core",
|
|
319
|
+
]
|
|
320
|
+
|
|
321
|
+
[[package]]
|
|
322
|
+
name = "serde"
|
|
323
|
+
version = "1.0.228"
|
|
324
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
325
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
326
|
+
dependencies = [
|
|
327
|
+
"serde_core",
|
|
328
|
+
"serde_derive",
|
|
329
|
+
]
|
|
330
|
+
|
|
331
|
+
[[package]]
|
|
332
|
+
name = "serde_core"
|
|
333
|
+
version = "1.0.228"
|
|
334
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
335
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
336
|
+
dependencies = [
|
|
337
|
+
"serde_derive",
|
|
338
|
+
]
|
|
339
|
+
|
|
340
|
+
[[package]]
|
|
341
|
+
name = "serde_derive"
|
|
342
|
+
version = "1.0.228"
|
|
343
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
344
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
345
|
+
dependencies = [
|
|
346
|
+
"proc-macro2",
|
|
347
|
+
"quote",
|
|
348
|
+
"syn",
|
|
349
|
+
]
|
|
350
|
+
|
|
351
|
+
[[package]]
|
|
352
|
+
name = "serde_derive_internals"
|
|
353
|
+
version = "0.29.1"
|
|
354
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
355
|
+
checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
|
|
356
|
+
dependencies = [
|
|
357
|
+
"proc-macro2",
|
|
358
|
+
"quote",
|
|
359
|
+
"syn",
|
|
360
|
+
]
|
|
361
|
+
|
|
362
|
+
[[package]]
|
|
363
|
+
name = "serde_json"
|
|
364
|
+
version = "1.0.149"
|
|
365
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
366
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
367
|
+
dependencies = [
|
|
368
|
+
"itoa",
|
|
369
|
+
"memchr",
|
|
370
|
+
"serde",
|
|
371
|
+
"serde_core",
|
|
372
|
+
"zmij",
|
|
373
|
+
]
|
|
374
|
+
|
|
375
|
+
[[package]]
|
|
376
|
+
name = "serde_tokenstream"
|
|
377
|
+
version = "0.2.2"
|
|
378
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
379
|
+
checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1"
|
|
380
|
+
dependencies = [
|
|
381
|
+
"proc-macro2",
|
|
382
|
+
"quote",
|
|
383
|
+
"serde",
|
|
384
|
+
"syn",
|
|
385
|
+
]
|
|
386
|
+
|
|
387
|
+
[[package]]
|
|
388
|
+
name = "sqlparser"
|
|
389
|
+
version = "0.53.0"
|
|
390
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
391
|
+
checksum = "05a528114c392209b3264855ad491fcce534b94a38771b0a0b97a79379275ce8"
|
|
392
|
+
dependencies = [
|
|
393
|
+
"log",
|
|
394
|
+
]
|
|
395
|
+
|
|
396
|
+
[[package]]
|
|
397
|
+
name = "syn"
|
|
398
|
+
version = "2.0.114"
|
|
399
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
400
|
+
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
|
401
|
+
dependencies = [
|
|
402
|
+
"proc-macro2",
|
|
403
|
+
"quote",
|
|
404
|
+
"unicode-ident",
|
|
405
|
+
]
|
|
406
|
+
|
|
407
|
+
[[package]]
|
|
408
|
+
name = "target-lexicon"
|
|
409
|
+
version = "0.13.4"
|
|
410
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
411
|
+
checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
|
|
412
|
+
|
|
413
|
+
[[package]]
|
|
414
|
+
name = "thiserror"
|
|
415
|
+
version = "1.0.69"
|
|
416
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
417
|
+
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
|
|
418
|
+
dependencies = [
|
|
419
|
+
"thiserror-impl",
|
|
420
|
+
]
|
|
421
|
+
|
|
422
|
+
[[package]]
|
|
423
|
+
name = "thiserror-impl"
|
|
424
|
+
version = "1.0.69"
|
|
425
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
426
|
+
checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
|
|
427
|
+
dependencies = [
|
|
428
|
+
"proc-macro2",
|
|
429
|
+
"quote",
|
|
430
|
+
"syn",
|
|
431
|
+
]
|
|
432
|
+
|
|
433
|
+
[[package]]
|
|
434
|
+
name = "typify"
|
|
435
|
+
version = "0.2.0"
|
|
436
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
437
|
+
checksum = "b4c644dda9862f0fef3a570d8ddb3c2cfb1d5ac824a1f2ddfa7bc8f071a5ad8a"
|
|
438
|
+
dependencies = [
|
|
439
|
+
"typify-impl",
|
|
440
|
+
"typify-macro",
|
|
441
|
+
]
|
|
442
|
+
|
|
443
|
+
[[package]]
|
|
444
|
+
name = "typify-impl"
|
|
445
|
+
version = "0.2.0"
|
|
446
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
447
|
+
checksum = "d59ab345b6c0d8ae9500b9ff334a4c7c0d316c1c628dc55726b95887eb8dbd11"
|
|
448
|
+
dependencies = [
|
|
449
|
+
"heck",
|
|
450
|
+
"log",
|
|
451
|
+
"proc-macro2",
|
|
452
|
+
"quote",
|
|
453
|
+
"regress",
|
|
454
|
+
"schemars",
|
|
455
|
+
"semver",
|
|
456
|
+
"serde",
|
|
457
|
+
"serde_json",
|
|
458
|
+
"syn",
|
|
459
|
+
"thiserror",
|
|
460
|
+
"unicode-ident",
|
|
461
|
+
]
|
|
462
|
+
|
|
463
|
+
[[package]]
|
|
464
|
+
name = "typify-macro"
|
|
465
|
+
version = "0.2.0"
|
|
466
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
467
|
+
checksum = "785e2cdcef0df8160fdd762ed548a637aaec1e83704fdbc14da0df66013ee8d0"
|
|
468
|
+
dependencies = [
|
|
469
|
+
"proc-macro2",
|
|
470
|
+
"quote",
|
|
471
|
+
"schemars",
|
|
472
|
+
"semver",
|
|
473
|
+
"serde",
|
|
474
|
+
"serde_json",
|
|
475
|
+
"serde_tokenstream",
|
|
476
|
+
"syn",
|
|
477
|
+
"typify-impl",
|
|
478
|
+
]
|
|
479
|
+
|
|
480
|
+
[[package]]
|
|
481
|
+
name = "unicode-ident"
|
|
482
|
+
version = "1.0.23"
|
|
483
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
484
|
+
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
|
|
485
|
+
|
|
486
|
+
[[package]]
|
|
487
|
+
name = "unindent"
|
|
488
|
+
version = "0.2.4"
|
|
489
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
490
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
491
|
+
|
|
492
|
+
[[package]]
|
|
493
|
+
name = "uuid"
|
|
494
|
+
version = "1.20.0"
|
|
495
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
496
|
+
checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f"
|
|
497
|
+
dependencies = [
|
|
498
|
+
"getrandom",
|
|
499
|
+
"js-sys",
|
|
500
|
+
"wasm-bindgen",
|
|
501
|
+
]
|
|
502
|
+
|
|
503
|
+
[[package]]
|
|
504
|
+
name = "wasip2"
|
|
505
|
+
version = "1.0.2+wasi-0.2.9"
|
|
506
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
507
|
+
checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
|
|
508
|
+
dependencies = [
|
|
509
|
+
"wit-bindgen",
|
|
510
|
+
]
|
|
511
|
+
|
|
512
|
+
[[package]]
|
|
513
|
+
name = "wasm-bindgen"
|
|
514
|
+
version = "0.2.108"
|
|
515
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
516
|
+
checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
|
|
517
|
+
dependencies = [
|
|
518
|
+
"cfg-if",
|
|
519
|
+
"once_cell",
|
|
520
|
+
"rustversion",
|
|
521
|
+
"wasm-bindgen-macro",
|
|
522
|
+
"wasm-bindgen-shared",
|
|
523
|
+
]
|
|
524
|
+
|
|
525
|
+
[[package]]
|
|
526
|
+
name = "wasm-bindgen-macro"
|
|
527
|
+
version = "0.2.108"
|
|
528
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
529
|
+
checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
|
|
530
|
+
dependencies = [
|
|
531
|
+
"quote",
|
|
532
|
+
"wasm-bindgen-macro-support",
|
|
533
|
+
]
|
|
534
|
+
|
|
535
|
+
[[package]]
|
|
536
|
+
name = "wasm-bindgen-macro-support"
|
|
537
|
+
version = "0.2.108"
|
|
538
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
539
|
+
checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
|
|
540
|
+
dependencies = [
|
|
541
|
+
"bumpalo",
|
|
542
|
+
"proc-macro2",
|
|
543
|
+
"quote",
|
|
544
|
+
"syn",
|
|
545
|
+
"wasm-bindgen-shared",
|
|
546
|
+
]
|
|
547
|
+
|
|
548
|
+
[[package]]
|
|
549
|
+
name = "wasm-bindgen-shared"
|
|
550
|
+
version = "0.2.108"
|
|
551
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
552
|
+
checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
|
|
553
|
+
dependencies = [
|
|
554
|
+
"unicode-ident",
|
|
555
|
+
]
|
|
556
|
+
|
|
557
|
+
[[package]]
|
|
558
|
+
name = "winapi"
|
|
559
|
+
version = "0.3.9"
|
|
560
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
561
|
+
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
562
|
+
dependencies = [
|
|
563
|
+
"winapi-i686-pc-windows-gnu",
|
|
564
|
+
"winapi-x86_64-pc-windows-gnu",
|
|
565
|
+
]
|
|
566
|
+
|
|
567
|
+
[[package]]
|
|
568
|
+
name = "winapi-i686-pc-windows-gnu"
|
|
569
|
+
version = "0.4.0"
|
|
570
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
571
|
+
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
572
|
+
|
|
573
|
+
[[package]]
|
|
574
|
+
name = "winapi-x86_64-pc-windows-gnu"
|
|
575
|
+
version = "0.4.0"
|
|
576
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
577
|
+
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
578
|
+
|
|
579
|
+
[[package]]
|
|
580
|
+
name = "wit-bindgen"
|
|
581
|
+
version = "0.51.0"
|
|
582
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
583
|
+
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
|
|
584
|
+
|
|
585
|
+
[[package]]
|
|
586
|
+
name = "zmij"
|
|
587
|
+
version = "1.0.20"
|
|
588
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
589
|
+
checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "2"
|
|
3
|
+
members = ["crates/scai-state-python"]
|
|
4
|
+
|
|
5
|
+
[workspace.package]
|
|
6
|
+
version = "0.0.1"
|
|
7
|
+
edition = "2021"
|
|
8
|
+
license = "Apache-2.0"
|
|
9
|
+
repository = "https://github.com/snowflakedb/scai-state"
|
|
10
|
+
|
|
11
|
+
[workspace.dependencies]
|
|
12
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
13
|
+
serde_json = "1.0"
|
|
14
|
+
thiserror = "1.0"
|
|
15
|
+
uuid = { version = "1.0", features = ["v4"] }
|
|
16
|
+
fs2 = "0.4"
|
|
17
|
+
sqlparser = "0.53"
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: snowflake-code-unit-registry
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: Intended Audience :: Developers
|
|
6
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Rust
|
|
13
|
+
Requires-Dist: pydantic>=2.0
|
|
14
|
+
Requires-Dist: pytest>=7.0 ; extra == 'dev'
|
|
15
|
+
Requires-Dist: mypy>=1.0 ; extra == 'dev'
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Summary: SCAI state management library for database migrations
|
|
18
|
+
License: Apache-2.0
|
|
19
|
+
Requires-Python: >=3.9
|
|
20
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
21
|
+
|
|
22
|
+
# scai-state
|
|
23
|
+
|
|
24
|
+
SCAI state management library for database migrations.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
pip install scai-state
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
from scai_state import (
|
|
36
|
+
Project,
|
|
37
|
+
CodeUnit,
|
|
38
|
+
SourceMetadata,
|
|
39
|
+
TargetMetadata,
|
|
40
|
+
ObjectType,
|
|
41
|
+
StateDocument,
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
# Initialize a new project
|
|
45
|
+
project = Project.init("/path/to/repo")
|
|
46
|
+
|
|
47
|
+
# Or open an existing project
|
|
48
|
+
project = Project.open("/path/to/existing/repo")
|
|
49
|
+
|
|
50
|
+
# Create a code unit
|
|
51
|
+
code_unit = CodeUnit(
|
|
52
|
+
kind="database_object",
|
|
53
|
+
object_type=ObjectType.TABLE,
|
|
54
|
+
source=SourceMetadata(
|
|
55
|
+
database="RETAIL_DB",
|
|
56
|
+
schema="dbo",
|
|
57
|
+
raw_name="Customer",
|
|
58
|
+
),
|
|
59
|
+
target=TargetMetadata(
|
|
60
|
+
database="RETAIL",
|
|
61
|
+
schema="DBO",
|
|
62
|
+
name="CUSTOMER",
|
|
63
|
+
),
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
# Returns StateDocument with computed id and all fields
|
|
67
|
+
doc: StateDocument = project.create_code_unit(code_unit)
|
|
68
|
+
print(doc.code_unit.id) # "dbo/table/customer.a1b2c3d4..."
|
|
69
|
+
|
|
70
|
+
# Get a code unit
|
|
71
|
+
doc = project.get_code_unit("dbo/table/customer.a1b2c3d4...")
|
|
72
|
+
|
|
73
|
+
# List all code units
|
|
74
|
+
docs = project.list_code_units()
|
|
75
|
+
|
|
76
|
+
# Update a code unit
|
|
77
|
+
doc.planning.wave = 2
|
|
78
|
+
updated = project.update_code_unit(doc.code_unit.id, doc)
|
|
79
|
+
|
|
80
|
+
# Delete a code unit (marks as deleted)
|
|
81
|
+
deleted = project.delete_code_unit(doc.code_unit.id)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Building from Source
|
|
85
|
+
|
|
86
|
+
This package requires Rust and maturin to build:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Install maturin
|
|
90
|
+
pip install maturin
|
|
91
|
+
|
|
92
|
+
# Build and install in development mode
|
|
93
|
+
cd crates/scai-state-python
|
|
94
|
+
maturin develop
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
## License
|
|
98
|
+
|
|
99
|
+
Apache-2.0
|
|
100
|
+
|