csv-gp 0.3.0__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.
Files changed (32) hide show
  1. csv_gp-0.3.0/Cargo.lock +510 -0
  2. csv_gp-0.3.0/Cargo.toml +3 -0
  3. csv_gp-0.3.0/LICENSE +21 -0
  4. csv_gp-0.3.0/PKG-INFO +94 -0
  5. csv_gp-0.3.0/README.md +71 -0
  6. csv_gp-0.3.0/csv_gp/Cargo.toml +16 -0
  7. csv_gp-0.3.0/csv_gp/src/cell.rs +109 -0
  8. csv_gp-0.3.0/csv_gp/src/checker.rs +252 -0
  9. csv_gp-0.3.0/csv_gp/src/csv_details.rs +136 -0
  10. csv_gp-0.3.0/csv_gp/src/error.rs +17 -0
  11. csv_gp-0.3.0/csv_gp/src/file.rs +25 -0
  12. csv_gp-0.3.0/csv_gp/src/lib.rs +7 -0
  13. csv_gp-0.3.0/csv_gp/src/main.rs +47 -0
  14. csv_gp-0.3.0/csv_gp/src/parser.rs +542 -0
  15. csv_gp-0.3.0/csv_gp/src/valid_file.rs +78 -0
  16. csv_gp-0.3.0/csv_gp_python/.gitignore +2 -0
  17. csv_gp-0.3.0/csv_gp_python/Cargo.toml +14 -0
  18. csv_gp-0.3.0/csv_gp_python/README.md +71 -0
  19. csv_gp-0.3.0/csv_gp_python/csv_gp.pyi +109 -0
  20. csv_gp-0.3.0/csv_gp_python/poetry.lock +187 -0
  21. csv_gp-0.3.0/csv_gp_python/src/error.rs +10 -0
  22. csv_gp-0.3.0/csv_gp_python/src/lib.rs +159 -0
  23. csv_gp-0.3.0/csv_gp_python/tests/fixtures/empty.csv +0 -0
  24. csv_gp-0.3.0/csv_gp_python/tests/fixtures/header_messed_up.csv +4 -0
  25. csv_gp-0.3.0/csv_gp_python/tests/fixtures/incorrect_quote.csv +4 -0
  26. csv_gp-0.3.0/csv_gp_python/tests/fixtures/kitchen_sink.csv +11 -0
  27. csv_gp-0.3.0/csv_gp_python/tests/fixtures/kitchen_sink_valid.csv +7 -0
  28. csv_gp-0.3.0/csv_gp_python/tests/fixtures/mac_roman.csv +2 -0
  29. csv_gp-0.3.0/csv_gp_python/tests/fixtures/quote_and_newline.csv +10 -0
  30. csv_gp-0.3.0/csv_gp_python/tests/fixtures/quote_last_cell.csv +3 -0
  31. csv_gp-0.3.0/csv_gp_python/tests/test_integration.py +161 -0
  32. csv_gp-0.3.0/pyproject.toml +109 -0
@@ -0,0 +1,510 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "anstream"
7
+ version = "0.6.21"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
10
+ dependencies = [
11
+ "anstyle",
12
+ "anstyle-parse",
13
+ "anstyle-query",
14
+ "anstyle-wincon",
15
+ "colorchoice",
16
+ "is_terminal_polyfill",
17
+ "utf8parse",
18
+ ]
19
+
20
+ [[package]]
21
+ name = "anstyle"
22
+ version = "1.0.13"
23
+ source = "registry+https://github.com/rust-lang/crates.io-index"
24
+ checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
25
+
26
+ [[package]]
27
+ name = "anstyle-parse"
28
+ version = "0.2.7"
29
+ source = "registry+https://github.com/rust-lang/crates.io-index"
30
+ checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
31
+ dependencies = [
32
+ "utf8parse",
33
+ ]
34
+
35
+ [[package]]
36
+ name = "anstyle-query"
37
+ version = "1.1.5"
38
+ source = "registry+https://github.com/rust-lang/crates.io-index"
39
+ checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
40
+ dependencies = [
41
+ "windows-sys",
42
+ ]
43
+
44
+ [[package]]
45
+ name = "anstyle-wincon"
46
+ version = "3.0.11"
47
+ source = "registry+https://github.com/rust-lang/crates.io-index"
48
+ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
49
+ dependencies = [
50
+ "anstyle",
51
+ "once_cell_polyfill",
52
+ "windows-sys",
53
+ ]
54
+
55
+ [[package]]
56
+ name = "autocfg"
57
+ version = "1.5.0"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
60
+
61
+ [[package]]
62
+ name = "bitflags"
63
+ version = "2.10.0"
64
+ source = "registry+https://github.com/rust-lang/crates.io-index"
65
+ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
66
+
67
+ [[package]]
68
+ name = "cfg-if"
69
+ version = "1.0.4"
70
+ source = "registry+https://github.com/rust-lang/crates.io-index"
71
+ checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
72
+
73
+ [[package]]
74
+ name = "clap"
75
+ version = "4.5.53"
76
+ source = "registry+https://github.com/rust-lang/crates.io-index"
77
+ checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8"
78
+ dependencies = [
79
+ "clap_builder",
80
+ "clap_derive",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "clap_builder"
85
+ version = "4.5.53"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00"
88
+ dependencies = [
89
+ "anstream",
90
+ "anstyle",
91
+ "clap_lex",
92
+ "strsim",
93
+ ]
94
+
95
+ [[package]]
96
+ name = "clap_derive"
97
+ version = "4.5.49"
98
+ source = "registry+https://github.com/rust-lang/crates.io-index"
99
+ checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671"
100
+ dependencies = [
101
+ "heck",
102
+ "proc-macro2",
103
+ "quote",
104
+ "syn",
105
+ ]
106
+
107
+ [[package]]
108
+ name = "clap_lex"
109
+ version = "0.7.6"
110
+ source = "registry+https://github.com/rust-lang/crates.io-index"
111
+ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
112
+
113
+ [[package]]
114
+ name = "colorchoice"
115
+ version = "1.0.4"
116
+ source = "registry+https://github.com/rust-lang/crates.io-index"
117
+ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
118
+
119
+ [[package]]
120
+ name = "csv"
121
+ version = "1.4.0"
122
+ source = "registry+https://github.com/rust-lang/crates.io-index"
123
+ checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938"
124
+ dependencies = [
125
+ "csv-core",
126
+ "itoa",
127
+ "ryu",
128
+ "serde_core",
129
+ ]
130
+
131
+ [[package]]
132
+ name = "csv-core"
133
+ version = "0.1.13"
134
+ source = "registry+https://github.com/rust-lang/crates.io-index"
135
+ checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782"
136
+ dependencies = [
137
+ "memchr",
138
+ ]
139
+
140
+ [[package]]
141
+ name = "csv-gp"
142
+ version = "0.3.0"
143
+ dependencies = [
144
+ "clap",
145
+ "csv",
146
+ "encoding_rs",
147
+ "encoding_rs_io",
148
+ "tempfile",
149
+ "thiserror",
150
+ ]
151
+
152
+ [[package]]
153
+ name = "csv-gp-python"
154
+ version = "0.3.0"
155
+ dependencies = [
156
+ "csv-gp",
157
+ "pyo3",
158
+ ]
159
+
160
+ [[package]]
161
+ name = "encoding_rs"
162
+ version = "0.8.35"
163
+ source = "registry+https://github.com/rust-lang/crates.io-index"
164
+ checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3"
165
+ dependencies = [
166
+ "cfg-if",
167
+ ]
168
+
169
+ [[package]]
170
+ name = "encoding_rs_io"
171
+ version = "0.1.7"
172
+ source = "registry+https://github.com/rust-lang/crates.io-index"
173
+ checksum = "1cc3c5651fb62ab8aa3103998dade57efdd028544bd300516baa31840c252a83"
174
+ dependencies = [
175
+ "encoding_rs",
176
+ ]
177
+
178
+ [[package]]
179
+ name = "errno"
180
+ version = "0.3.14"
181
+ source = "registry+https://github.com/rust-lang/crates.io-index"
182
+ checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
183
+ dependencies = [
184
+ "libc",
185
+ "windows-sys",
186
+ ]
187
+
188
+ [[package]]
189
+ name = "fastrand"
190
+ version = "2.3.0"
191
+ source = "registry+https://github.com/rust-lang/crates.io-index"
192
+ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
193
+
194
+ [[package]]
195
+ name = "getrandom"
196
+ version = "0.3.4"
197
+ source = "registry+https://github.com/rust-lang/crates.io-index"
198
+ checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
199
+ dependencies = [
200
+ "cfg-if",
201
+ "libc",
202
+ "r-efi",
203
+ "wasip2",
204
+ ]
205
+
206
+ [[package]]
207
+ name = "heck"
208
+ version = "0.5.0"
209
+ source = "registry+https://github.com/rust-lang/crates.io-index"
210
+ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
211
+
212
+ [[package]]
213
+ name = "indoc"
214
+ version = "2.0.7"
215
+ source = "registry+https://github.com/rust-lang/crates.io-index"
216
+ checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
217
+ dependencies = [
218
+ "rustversion",
219
+ ]
220
+
221
+ [[package]]
222
+ name = "is_terminal_polyfill"
223
+ version = "1.70.2"
224
+ source = "registry+https://github.com/rust-lang/crates.io-index"
225
+ checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
226
+
227
+ [[package]]
228
+ name = "itoa"
229
+ version = "1.0.17"
230
+ source = "registry+https://github.com/rust-lang/crates.io-index"
231
+ checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
232
+
233
+ [[package]]
234
+ name = "libc"
235
+ version = "0.2.178"
236
+ source = "registry+https://github.com/rust-lang/crates.io-index"
237
+ checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091"
238
+
239
+ [[package]]
240
+ name = "linux-raw-sys"
241
+ version = "0.11.0"
242
+ source = "registry+https://github.com/rust-lang/crates.io-index"
243
+ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
244
+
245
+ [[package]]
246
+ name = "memchr"
247
+ version = "2.7.6"
248
+ source = "registry+https://github.com/rust-lang/crates.io-index"
249
+ checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
250
+
251
+ [[package]]
252
+ name = "memoffset"
253
+ version = "0.9.1"
254
+ source = "registry+https://github.com/rust-lang/crates.io-index"
255
+ checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
256
+ dependencies = [
257
+ "autocfg",
258
+ ]
259
+
260
+ [[package]]
261
+ name = "once_cell"
262
+ version = "1.21.3"
263
+ source = "registry+https://github.com/rust-lang/crates.io-index"
264
+ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
265
+
266
+ [[package]]
267
+ name = "once_cell_polyfill"
268
+ version = "1.70.2"
269
+ source = "registry+https://github.com/rust-lang/crates.io-index"
270
+ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
271
+
272
+ [[package]]
273
+ name = "portable-atomic"
274
+ version = "1.13.0"
275
+ source = "registry+https://github.com/rust-lang/crates.io-index"
276
+ checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950"
277
+
278
+ [[package]]
279
+ name = "proc-macro2"
280
+ version = "1.0.104"
281
+ source = "registry+https://github.com/rust-lang/crates.io-index"
282
+ checksum = "9695f8df41bb4f3d222c95a67532365f569318332d03d5f3f67f37b20e6ebdf0"
283
+ dependencies = [
284
+ "unicode-ident",
285
+ ]
286
+
287
+ [[package]]
288
+ name = "pyo3"
289
+ version = "0.27.2"
290
+ source = "registry+https://github.com/rust-lang/crates.io-index"
291
+ checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d"
292
+ dependencies = [
293
+ "indoc",
294
+ "libc",
295
+ "memoffset",
296
+ "once_cell",
297
+ "portable-atomic",
298
+ "pyo3-build-config",
299
+ "pyo3-ffi",
300
+ "pyo3-macros",
301
+ "unindent",
302
+ ]
303
+
304
+ [[package]]
305
+ name = "pyo3-build-config"
306
+ version = "0.27.2"
307
+ source = "registry+https://github.com/rust-lang/crates.io-index"
308
+ checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6"
309
+ dependencies = [
310
+ "target-lexicon",
311
+ ]
312
+
313
+ [[package]]
314
+ name = "pyo3-ffi"
315
+ version = "0.27.2"
316
+ source = "registry+https://github.com/rust-lang/crates.io-index"
317
+ checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089"
318
+ dependencies = [
319
+ "libc",
320
+ "pyo3-build-config",
321
+ ]
322
+
323
+ [[package]]
324
+ name = "pyo3-macros"
325
+ version = "0.27.2"
326
+ source = "registry+https://github.com/rust-lang/crates.io-index"
327
+ checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02"
328
+ dependencies = [
329
+ "proc-macro2",
330
+ "pyo3-macros-backend",
331
+ "quote",
332
+ "syn",
333
+ ]
334
+
335
+ [[package]]
336
+ name = "pyo3-macros-backend"
337
+ version = "0.27.2"
338
+ source = "registry+https://github.com/rust-lang/crates.io-index"
339
+ checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9"
340
+ dependencies = [
341
+ "heck",
342
+ "proc-macro2",
343
+ "pyo3-build-config",
344
+ "quote",
345
+ "syn",
346
+ ]
347
+
348
+ [[package]]
349
+ name = "quote"
350
+ version = "1.0.42"
351
+ source = "registry+https://github.com/rust-lang/crates.io-index"
352
+ checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
353
+ dependencies = [
354
+ "proc-macro2",
355
+ ]
356
+
357
+ [[package]]
358
+ name = "r-efi"
359
+ version = "5.3.0"
360
+ source = "registry+https://github.com/rust-lang/crates.io-index"
361
+ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
362
+
363
+ [[package]]
364
+ name = "rustix"
365
+ version = "1.1.3"
366
+ source = "registry+https://github.com/rust-lang/crates.io-index"
367
+ checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
368
+ dependencies = [
369
+ "bitflags",
370
+ "errno",
371
+ "libc",
372
+ "linux-raw-sys",
373
+ "windows-sys",
374
+ ]
375
+
376
+ [[package]]
377
+ name = "rustversion"
378
+ version = "1.0.22"
379
+ source = "registry+https://github.com/rust-lang/crates.io-index"
380
+ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
381
+
382
+ [[package]]
383
+ name = "ryu"
384
+ version = "1.0.22"
385
+ source = "registry+https://github.com/rust-lang/crates.io-index"
386
+ checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984"
387
+
388
+ [[package]]
389
+ name = "serde_core"
390
+ version = "1.0.228"
391
+ source = "registry+https://github.com/rust-lang/crates.io-index"
392
+ checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
393
+ dependencies = [
394
+ "serde_derive",
395
+ ]
396
+
397
+ [[package]]
398
+ name = "serde_derive"
399
+ version = "1.0.228"
400
+ source = "registry+https://github.com/rust-lang/crates.io-index"
401
+ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
402
+ dependencies = [
403
+ "proc-macro2",
404
+ "quote",
405
+ "syn",
406
+ ]
407
+
408
+ [[package]]
409
+ name = "strsim"
410
+ version = "0.11.1"
411
+ source = "registry+https://github.com/rust-lang/crates.io-index"
412
+ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
413
+
414
+ [[package]]
415
+ name = "syn"
416
+ version = "2.0.112"
417
+ source = "registry+https://github.com/rust-lang/crates.io-index"
418
+ checksum = "21f182278bf2d2bcb3c88b1b08a37df029d71ce3d3ae26168e3c653b213b99d4"
419
+ dependencies = [
420
+ "proc-macro2",
421
+ "quote",
422
+ "unicode-ident",
423
+ ]
424
+
425
+ [[package]]
426
+ name = "target-lexicon"
427
+ version = "0.13.4"
428
+ source = "registry+https://github.com/rust-lang/crates.io-index"
429
+ checksum = "b1dd07eb858a2067e2f3c7155d54e929265c264e6f37efe3ee7a8d1b5a1dd0ba"
430
+
431
+ [[package]]
432
+ name = "tempfile"
433
+ version = "3.24.0"
434
+ source = "registry+https://github.com/rust-lang/crates.io-index"
435
+ checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c"
436
+ dependencies = [
437
+ "fastrand",
438
+ "getrandom",
439
+ "once_cell",
440
+ "rustix",
441
+ "windows-sys",
442
+ ]
443
+
444
+ [[package]]
445
+ name = "thiserror"
446
+ version = "1.0.69"
447
+ source = "registry+https://github.com/rust-lang/crates.io-index"
448
+ checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
449
+ dependencies = [
450
+ "thiserror-impl",
451
+ ]
452
+
453
+ [[package]]
454
+ name = "thiserror-impl"
455
+ version = "1.0.69"
456
+ source = "registry+https://github.com/rust-lang/crates.io-index"
457
+ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
458
+ dependencies = [
459
+ "proc-macro2",
460
+ "quote",
461
+ "syn",
462
+ ]
463
+
464
+ [[package]]
465
+ name = "unicode-ident"
466
+ version = "1.0.22"
467
+ source = "registry+https://github.com/rust-lang/crates.io-index"
468
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
469
+
470
+ [[package]]
471
+ name = "unindent"
472
+ version = "0.2.4"
473
+ source = "registry+https://github.com/rust-lang/crates.io-index"
474
+ checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
475
+
476
+ [[package]]
477
+ name = "utf8parse"
478
+ version = "0.2.2"
479
+ source = "registry+https://github.com/rust-lang/crates.io-index"
480
+ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
481
+
482
+ [[package]]
483
+ name = "wasip2"
484
+ version = "1.0.1+wasi-0.2.4"
485
+ source = "registry+https://github.com/rust-lang/crates.io-index"
486
+ checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
487
+ dependencies = [
488
+ "wit-bindgen",
489
+ ]
490
+
491
+ [[package]]
492
+ name = "windows-link"
493
+ version = "0.2.1"
494
+ source = "registry+https://github.com/rust-lang/crates.io-index"
495
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
496
+
497
+ [[package]]
498
+ name = "windows-sys"
499
+ version = "0.61.2"
500
+ source = "registry+https://github.com/rust-lang/crates.io-index"
501
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
502
+ dependencies = [
503
+ "windows-link",
504
+ ]
505
+
506
+ [[package]]
507
+ name = "wit-bindgen"
508
+ version = "0.46.0"
509
+ source = "registry+https://github.com/rust-lang/crates.io-index"
510
+ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
@@ -0,0 +1,3 @@
1
+ [workspace]
2
+ resolver = "3"
3
+ members = ["csv_gp_python"]
csv_gp-0.3.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Xelix (GSPV Ltd)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
csv_gp-0.3.0/PKG-INFO ADDED
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: csv-gp
3
+ Version: 0.3.0
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Classifier: Programming Language :: Python
8
+ Classifier: Programming Language :: Python :: 3
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 :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
14
+ Classifier: Development Status :: 5 - Production/Stable
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ License-File: LICENSE
17
+ Summary: CSV GP allows you to pinpoint these common issues with a CSV file, as well as export just the parsable lines from a file.
18
+ Keywords: rust,csv
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
21
+ Project-URL: Repository, https://github.com/xelixdev/csv-gp
22
+
23
+ # CSV GP: Diagnose all your CSV issues
24
+
25
+ CSVs are a ubiquitous format for data transfer that are commonly [riddled with issues](https://donatstudios.com/Falsehoods-Programmers-Believe-About-CSVs). Most CSV libraries abort with an unhelpful error, CSV GP allows you to pinpoint these common issues with a CSV file, as well as export just the parsable lines from a file.
26
+
27
+ ## Installation
28
+
29
+ CSV GP can be used in three ways.
30
+
31
+ ### Standalone binary
32
+
33
+ 1. [Install rust](https://www.rust-lang.org/tools/install)
34
+ 2. Clone the repo and navigate into it
35
+ 3. Run `cargo install --path csv_gp`
36
+ 4. The `csv-gp` command will now be available to run, please see `csv-gp --help` for usage
37
+
38
+ ### Rust library
39
+
40
+ Add the following to your `Cargo.toml`:
41
+
42
+ `csv-gp = { git = "https://github.com/xelixdev/csv-gp", rev = "<optional git tag>" }`
43
+
44
+ ### Python library
45
+
46
+ ### From package manager
47
+
48
+ The library is available on PyPI, at https://pypi.org/project/csv-gp/ so you can just run:
49
+
50
+ `pip install csv-gp`
51
+
52
+ ### Compiling from source
53
+
54
+ 1. [Install rust](https://www.rust-lang.org/tools/install)
55
+ 2. Install (`pip install maturin`)
56
+ 3. Clone the repo
57
+ 4. Run `make all`
58
+ 5. `cd csv_gp_python && maturin develop`
59
+
60
+ ## Usage
61
+
62
+ ## Rust standalone binary
63
+
64
+ After installing the binary, the default usage is running `csv-gp $FILE`. This will print a diagnosis of the file. The command provides options to change the delimiter and the encoding of the file. See `csv-gp -h` for details.
65
+
66
+ Another option provided is `--correct-rows-path` which will export only the correct rows to the provided path.
67
+
68
+ ## Python library
69
+
70
+ The python library exposes two main functions, `check_file` and `get_rows`.
71
+
72
+ The check file function takes a path to file, the delimiter and the encoding (see https://github.com/xelixdev/csv-gp/blob/0f77c62841509c134a3bbe06ec178426e9c5aa10/csv_gp_python/csv_gp.pyi) and returns an instance of a class `CSVDetails` which provides details about the file. See the same file to see all the available attributes and their names/types.
73
+ If the `valid_rows_output_path` argument is provided to the function, only the correct rows will be exported to that path.
74
+
75
+ The get_rows once again takes a path to file, the delimiter and the encoding and additionally a list of row numbers. The function will then return the parsed cells for given rows. See the above file for the exact typing of the parameter and returned values.
76
+
77
+ ## Releasing a new version of the Python lib
78
+
79
+ 1. Update version numbers in `csv_gp_python/Cargo.toml` and `csv_gp_python/pyproject.toml`
80
+ 2. Run `cargo check` to update the lock files with new versions
81
+ 3. Merge this change into main
82
+ 4. Create a new release on GitHub, creating a tag in the form `vX.Y.Z`
83
+ 5. The 'Publish' pipeline should begin running, and the new version will be published
84
+
85
+ ## Running tests
86
+
87
+ ### Running Rust tests
88
+
89
+ Run `cargo test`.
90
+
91
+ ### Running Python tests
92
+
93
+ Follow the instructions on compiling from source. Then you can run `pytest`.
94
+
csv_gp-0.3.0/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # CSV GP: Diagnose all your CSV issues
2
+
3
+ CSVs are a ubiquitous format for data transfer that are commonly [riddled with issues](https://donatstudios.com/Falsehoods-Programmers-Believe-About-CSVs). Most CSV libraries abort with an unhelpful error, CSV GP allows you to pinpoint these common issues with a CSV file, as well as export just the parsable lines from a file.
4
+
5
+ ## Installation
6
+
7
+ CSV GP can be used in three ways.
8
+
9
+ ### Standalone binary
10
+
11
+ 1. [Install rust](https://www.rust-lang.org/tools/install)
12
+ 2. Clone the repo and navigate into it
13
+ 3. Run `cargo install --path csv_gp`
14
+ 4. The `csv-gp` command will now be available to run, please see `csv-gp --help` for usage
15
+
16
+ ### Rust library
17
+
18
+ Add the following to your `Cargo.toml`:
19
+
20
+ `csv-gp = { git = "https://github.com/xelixdev/csv-gp", rev = "<optional git tag>" }`
21
+
22
+ ### Python library
23
+
24
+ ### From package manager
25
+
26
+ The library is available on PyPI, at https://pypi.org/project/csv-gp/ so you can just run:
27
+
28
+ `pip install csv-gp`
29
+
30
+ ### Compiling from source
31
+
32
+ 1. [Install rust](https://www.rust-lang.org/tools/install)
33
+ 2. Install (`pip install maturin`)
34
+ 3. Clone the repo
35
+ 4. Run `make all`
36
+ 5. `cd csv_gp_python && maturin develop`
37
+
38
+ ## Usage
39
+
40
+ ## Rust standalone binary
41
+
42
+ After installing the binary, the default usage is running `csv-gp $FILE`. This will print a diagnosis of the file. The command provides options to change the delimiter and the encoding of the file. See `csv-gp -h` for details.
43
+
44
+ Another option provided is `--correct-rows-path` which will export only the correct rows to the provided path.
45
+
46
+ ## Python library
47
+
48
+ The python library exposes two main functions, `check_file` and `get_rows`.
49
+
50
+ The check file function takes a path to file, the delimiter and the encoding (see https://github.com/xelixdev/csv-gp/blob/0f77c62841509c134a3bbe06ec178426e9c5aa10/csv_gp_python/csv_gp.pyi) and returns an instance of a class `CSVDetails` which provides details about the file. See the same file to see all the available attributes and their names/types.
51
+ If the `valid_rows_output_path` argument is provided to the function, only the correct rows will be exported to that path.
52
+
53
+ The get_rows once again takes a path to file, the delimiter and the encoding and additionally a list of row numbers. The function will then return the parsed cells for given rows. See the above file for the exact typing of the parameter and returned values.
54
+
55
+ ## Releasing a new version of the Python lib
56
+
57
+ 1. Update version numbers in `csv_gp_python/Cargo.toml` and `csv_gp_python/pyproject.toml`
58
+ 2. Run `cargo check` to update the lock files with new versions
59
+ 3. Merge this change into main
60
+ 4. Create a new release on GitHub, creating a tag in the form `vX.Y.Z`
61
+ 5. The 'Publish' pipeline should begin running, and the new version will be published
62
+
63
+ ## Running tests
64
+
65
+ ### Running Rust tests
66
+
67
+ Run `cargo test`.
68
+
69
+ ### Running Python tests
70
+
71
+ Follow the instructions on compiling from source. Then you can run `pytest`.