csv-validation 0.0.12__tar.gz → 0.0.13__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.
- {csv_validation-0.0.12 → csv_validation-0.0.13}/Cargo.lock +1 -14
- {csv_validation-0.0.12 → csv_validation-0.0.13}/Cargo.toml +2 -2
- csv_validation-0.0.13/PKG-INFO +8 -0
- csv_validation-0.0.12/PKG-INFO → csv_validation-0.0.13/README.md +44 -15
- {csv_validation-0.0.12 → csv_validation-0.0.13}/src/lib.rs +45 -6
- csv_validation-0.0.12/README.md +0 -216
- {csv_validation-0.0.12 → csv_validation-0.0.13}/.github/workflows/CI.yml +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/.gitignore +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/LICENSE +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/MANIFEST.in +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/build.sh +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/csv_validation.pyi +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/pyproject.toml +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/test/empty_values.csv +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/test/test_file.csv +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/test/test_file.csv.gz +0 -0
- {csv_validation-0.0.12 → csv_validation-0.0.13}/test/test_validations.yml +0 -0
|
@@ -83,7 +83,7 @@ dependencies = [
|
|
|
83
83
|
|
|
84
84
|
[[package]]
|
|
85
85
|
name = "csv_validation"
|
|
86
|
-
version = "0.0.
|
|
86
|
+
version = "0.0.13"
|
|
87
87
|
dependencies = [
|
|
88
88
|
"csv",
|
|
89
89
|
"flate2",
|
|
@@ -92,7 +92,6 @@ dependencies = [
|
|
|
92
92
|
"pyo3-log",
|
|
93
93
|
"regex",
|
|
94
94
|
"serde",
|
|
95
|
-
"serde_json",
|
|
96
95
|
"simple_logger",
|
|
97
96
|
"yaml-rust2",
|
|
98
97
|
]
|
|
@@ -389,18 +388,6 @@ dependencies = [
|
|
|
389
388
|
"syn",
|
|
390
389
|
]
|
|
391
390
|
|
|
392
|
-
[[package]]
|
|
393
|
-
name = "serde_json"
|
|
394
|
-
version = "1.0.140"
|
|
395
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
396
|
-
checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373"
|
|
397
|
-
dependencies = [
|
|
398
|
-
"itoa",
|
|
399
|
-
"memchr",
|
|
400
|
-
"ryu",
|
|
401
|
-
"serde",
|
|
402
|
-
]
|
|
403
|
-
|
|
404
391
|
[[package]]
|
|
405
392
|
name = "simple_logger"
|
|
406
393
|
version = "5.0.0"
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "csv_validation"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.13"
|
|
4
4
|
edition = "2021"
|
|
5
|
+
readme = "README.md"
|
|
5
6
|
|
|
6
7
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
7
8
|
[lib]
|
|
@@ -15,7 +16,6 @@ log = "0.4.26"
|
|
|
15
16
|
pyo3 = "0.23.3"
|
|
16
17
|
pyo3-log = "0.12.1"
|
|
17
18
|
regex = "1.11.1"
|
|
18
|
-
serde_json = "1.0.140"
|
|
19
19
|
simple_logger = "5.0.0"
|
|
20
20
|
yaml-rust2 = "0.10.0"
|
|
21
21
|
serde = { version = "1.0.218", features = ["derive"] }
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: csv_validation
|
|
3
|
+
Version: 0.0.13
|
|
4
|
+
Classifier: Programming Language :: Rust
|
|
5
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: >=3.8
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: csv_validation
|
|
3
|
-
Version: 0.0.12
|
|
4
|
-
Classifier: Programming Language :: Rust
|
|
5
|
-
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
|
-
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
-
License-File: LICENSE
|
|
8
|
-
Requires-Python: >=3.8
|
|
9
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
10
|
-
|
|
11
1
|
# CSV Validation Library
|
|
12
2
|
|
|
13
3
|
Blazing fast format validations for your CSV files
|
|
@@ -104,11 +94,11 @@ columns:
|
|
|
104
94
|
- Available formats:
|
|
105
95
|
- `integer`: Validates any integer number (positive or negative)
|
|
106
96
|
- `positive integer`: Validates positive integer numbers
|
|
107
|
-
- `decimal`: Validates any decimal number (positive or negative) using point as decimal separator
|
|
97
|
+
- `decimal/decimal point`: Validates any decimal number (positive or negative) using point as decimal separator
|
|
98
|
+
- `decimal comma`: Validates decimal numbers using comma as decimal separator
|
|
108
99
|
- `positive decimal point/positive decimal`: Validates positive decimal numbers using point as decimal separator
|
|
109
100
|
- `positive decimal comma`: Validates positive decimal numbers using comma as decimal separator
|
|
110
101
|
- `decimal scientific`: Validates decimal numbers in scientific notation (e.g. 23.02e-12)
|
|
111
|
-
- `non_empty`: Validates that field contains at least one character
|
|
112
102
|
- More formats will be added in upcoming versions
|
|
113
103
|
|
|
114
104
|
3. **Minimum Value** (`min`)
|
|
@@ -120,7 +110,12 @@ columns:
|
|
|
120
110
|
5. **Value Set** (`values`)
|
|
121
111
|
- Ensure fields only contain values from a predefined set
|
|
122
112
|
|
|
123
|
-
|
|
113
|
+
6. **Extra** (`extra`)
|
|
114
|
+
- Extra validations that normally complement one of the other types
|
|
115
|
+
- Available extras:
|
|
116
|
+
- `non_empty`: Validates that field contains at least one character
|
|
117
|
+
|
|
118
|
+
You can add as many validation types as you want for the same column, but take into account that the
|
|
124
119
|
column only will be considered correct if all the validations are OK.
|
|
125
120
|
|
|
126
121
|
## Global Validations
|
|
@@ -130,7 +125,7 @@ column only will be considered correct if all the validations are OK.
|
|
|
130
125
|
Empty values (empty string '') are considered correct and accepted by default.
|
|
131
126
|
However, if your data must always have some content,
|
|
132
127
|
you can add a global `empty_not_ok` flag at the root level of your YAML definition to automatically
|
|
133
|
-
add the `
|
|
128
|
+
add the `extra: non_empty` validation to all columns:
|
|
134
129
|
|
|
135
130
|
```yaml
|
|
136
131
|
empty_not_ok: true
|
|
@@ -166,6 +161,40 @@ The library provides detailed validation reports through Python's logging system
|
|
|
166
161
|
- Sample of invalid values
|
|
167
162
|
- Number of rows that failed each validation
|
|
168
163
|
|
|
164
|
+
### Example of validation report
|
|
165
|
+
|
|
166
|
+
```
|
|
167
|
+
VALIDATIONS SUMMARY
|
|
168
|
+
==================================================
|
|
169
|
+
FILE: /test.csv
|
|
170
|
+
Rows: 232230 | Columns: 5
|
|
171
|
+
|
|
172
|
+
CORRECT COLUMNS: 3/5
|
|
173
|
+
--------------------------------------------------
|
|
174
|
+
- County: [✔] OK
|
|
175
|
+
✔ - RegularExpression { expression: "^.*$", alias: "regex" }
|
|
176
|
+
- City: [✔] OK
|
|
177
|
+
✔ - RegularExpression { expression: "^.*$", alias: "regex" }
|
|
178
|
+
- Model Year: [✔] OK
|
|
179
|
+
✔ - RegularExpression { expression: "^[0-9]+$", alias: "regex" }
|
|
180
|
+
✔ - Min(1999.0)
|
|
181
|
+
✔ - Max(2025.78)
|
|
182
|
+
|
|
183
|
+
WRONG COLUMNS: 2/5
|
|
184
|
+
--------------------------------------------------
|
|
185
|
+
- State: [✖] FAIL
|
|
186
|
+
✖ - Values(["WA", "OR", "NY", "DC", "CA", "TX", "FL", "OK", "MO", "KS", "VA", "MA", "MO", "NC", "IL", "AL", "WY", "CO", "PA", "WI", "MD", "NV", "AZ"])
|
|
187
|
+
"Wrong Rows: 93 | Sample: 'GA','NJ','CT','NJ','CT','CT','CT','NE','CT','NH'"
|
|
188
|
+
- Postal Code: [✖] FAIL
|
|
189
|
+
✔ - RegularExpression { expression: "^$|^-?\\d+$", alias: "integer" }
|
|
190
|
+
✖ - RegularExpression { expression: "^.+$", alias: "non_empty" }
|
|
191
|
+
"Wrong Rows: 4 | Sample: '','','',''"
|
|
192
|
+
|
|
193
|
+
VALIDATION RESULT
|
|
194
|
+
--------------------------------------------------
|
|
195
|
+
[✖] FAIL: File DOESN'T match all validations
|
|
196
|
+
```
|
|
197
|
+
|
|
169
198
|
## Development
|
|
170
199
|
|
|
171
200
|
### Prerequisites
|
|
@@ -223,4 +252,4 @@ SOFTWARE.
|
|
|
223
252
|
|
|
224
253
|
## Contributing
|
|
225
254
|
|
|
226
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
255
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
@@ -231,6 +231,15 @@ fn get_validations(definition_string: &str) -> PyResult<Vec<ColumnValidations>>
|
|
|
231
231
|
alias: format.to_string()
|
|
232
232
|
})
|
|
233
233
|
}
|
|
234
|
+
"extra" => {
|
|
235
|
+
let extra = value.as_str()
|
|
236
|
+
.ok_or_else(|| PyRuntimeError::new_err("Extra must be a string"))?;
|
|
237
|
+
let regex_for_extra = get_regex_for_extra(extra)?;
|
|
238
|
+
Ok(Validation::RegularExpression {
|
|
239
|
+
expression: regex_for_extra,
|
|
240
|
+
alias: extra.to_string()
|
|
241
|
+
})
|
|
242
|
+
}
|
|
234
243
|
_ => Err(PyRuntimeError::new_err(format!("Unknown validation: {key}")))
|
|
235
244
|
}?;
|
|
236
245
|
|
|
@@ -252,10 +261,7 @@ fn get_validations(definition_string: &str) -> PyResult<Vec<ColumnValidations>>
|
|
|
252
261
|
let empty_not_ok =
|
|
253
262
|
config[0]["empty_not_ok"].as_bool().map_or(false, |value| value);
|
|
254
263
|
if empty_not_ok {
|
|
255
|
-
let non_empty_validation =
|
|
256
|
-
expression: String::from("^.+$"),
|
|
257
|
-
alias: String::from("non_empty")
|
|
258
|
-
};
|
|
264
|
+
let non_empty_validation = validation_for_non_empty();
|
|
259
265
|
for column_validations in column_validations.iter_mut() {
|
|
260
266
|
column_validations.validations.push(non_empty_validation.clone());
|
|
261
267
|
}
|
|
@@ -276,15 +282,33 @@ fn get_regex_for_format(format: &str) -> PyResult<String> {
|
|
|
276
282
|
match format {
|
|
277
283
|
"integer" => Ok(String::from("^$|^-?\\d+$")),
|
|
278
284
|
"positive integer" => Ok(String::from("^$|^\\d+$")),
|
|
279
|
-
"decimal" => Ok(String::from("^$|^-?\\d+(\\.\\d+)?$")),
|
|
285
|
+
"decimal" | "decimal point" => Ok(String::from("^$|^-?\\d+(\\.\\d+)?$")),
|
|
286
|
+
"decimal comma" => Ok(String::from("^$|^-?\\d+(,\\d+)?$")),
|
|
280
287
|
"positive decimal point" | "positive decimal" => Ok(String::from("^$|^\\d+(\\.\\d+)?$")),
|
|
281
288
|
"positive decimal comma" => Ok(String::from("^$|^\\d+(,\\d+)?$")),
|
|
282
289
|
"decimal scientific" => Ok(String::from("^$|^-?\\d+(\\.\\d+)?([eE][-+]?\\d+)?$")),
|
|
283
|
-
"non_empty" => Ok(String::from("^.+$")),
|
|
284
290
|
_ => Err(PyRuntimeError::new_err(format!("Unknown format: {format}")))
|
|
285
291
|
}
|
|
286
292
|
}
|
|
287
293
|
|
|
294
|
+
fn get_regex_for_extra(extra: &str) -> PyResult<String> {
|
|
295
|
+
match extra {
|
|
296
|
+
"non_empty" => Ok(regex_for_non_empty()),
|
|
297
|
+
_ => Err(PyRuntimeError::new_err(format!("Unknown extra: {extra}")))
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
fn validation_for_non_empty() -> Validation {
|
|
302
|
+
RegularExpression {
|
|
303
|
+
expression: regex_for_non_empty(),
|
|
304
|
+
alias: String::from("non_empty")
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
fn regex_for_non_empty() -> String {
|
|
309
|
+
String::from("^.+$")
|
|
310
|
+
}
|
|
311
|
+
|
|
288
312
|
fn validate_column_names(reader: &mut Reader<Box<dyn Read>>, validations: &Vec<ColumnValidations>) -> PyResult<bool> {
|
|
289
313
|
info!("Validating column names and order...");
|
|
290
314
|
let expected_column_names = validations.iter()
|
|
@@ -723,6 +747,21 @@ mod tests {
|
|
|
723
747
|
assert!(!validator.validate("test/empty_values.csv").unwrap());
|
|
724
748
|
}
|
|
725
749
|
|
|
750
|
+
#[test]
|
|
751
|
+
fn test_extra_non_empty_column() {
|
|
752
|
+
let definition_with_non_empty_column = String::from("
|
|
753
|
+
columns:
|
|
754
|
+
- name: First Column
|
|
755
|
+
format: positive integer
|
|
756
|
+
extra: non_empty
|
|
757
|
+
- name: Second Column
|
|
758
|
+
values: ['A', 'B', 'C']
|
|
759
|
+
");
|
|
760
|
+
let validator = CSVValidator::from_string(&definition_with_non_empty_column).unwrap();
|
|
761
|
+
// Validation is not OK as the second column contains empty values
|
|
762
|
+
assert!(!validator.validate("test/empty_values.csv").unwrap());
|
|
763
|
+
}
|
|
764
|
+
|
|
726
765
|
#[test]
|
|
727
766
|
fn test_csv_validator_invalid_format() {
|
|
728
767
|
let definition = String::from("
|
csv_validation-0.0.12/README.md
DELETED
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
# CSV Validation Library
|
|
2
|
-
|
|
3
|
-
Blazing fast format validations for your CSV files
|
|
4
|
-
|
|
5
|
-
This is a Python lib with a Rust core that will allow you to validate huge CSV files (GBs) in seconds (or in a few minutes for really huge files) using a minimal amount of memory.
|
|
6
|
-
|
|
7
|
-
## Features
|
|
8
|
-
|
|
9
|
-
- ✨ Validate both plain and gzipped CSV files
|
|
10
|
-
- 🔍 Multiple validation types supported:
|
|
11
|
-
- Correct column name and order
|
|
12
|
-
- Regular expressions
|
|
13
|
-
- Well-known formats (integer, decimal, etc.)
|
|
14
|
-
- Minimum/Maximum numerical value checks
|
|
15
|
-
- Value set validation (allowed values)
|
|
16
|
-
- 🦀 + 🐍 Rust lib with Python bindings included
|
|
17
|
-
- 📝 Detailed validation summaries with sample invalid values
|
|
18
|
-
- 🚀 High performance with optimizations like regex pre-compilation
|
|
19
|
-
- 📊 Support for large CSV files
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
### Python
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install csv_validation
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Usage
|
|
30
|
-
|
|
31
|
-
### Python
|
|
32
|
-
|
|
33
|
-
#### You can provide a file with the validation rules
|
|
34
|
-
```python
|
|
35
|
-
from csv_validation import CSVValidator
|
|
36
|
-
|
|
37
|
-
validator = CSVValidator.from_file("validation_rules.yaml")
|
|
38
|
-
is_valid = validator.validate("data.csv")
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
#### You can also create a validator from a string
|
|
42
|
-
```python
|
|
43
|
-
validation_rules = """
|
|
44
|
-
columns:
|
|
45
|
-
- name: Name
|
|
46
|
-
regex: ^[A-Za-z\s]{2,50}$
|
|
47
|
-
- name: Age
|
|
48
|
-
format: positive_integer
|
|
49
|
-
max: 120
|
|
50
|
-
"""
|
|
51
|
-
|
|
52
|
-
validator = CSVValidator.from_string(validation_rules)
|
|
53
|
-
# Optionally set a custom column separator
|
|
54
|
-
validator.set_separator(";") # Default is comma (,)
|
|
55
|
-
|
|
56
|
-
# Validate a CSV file
|
|
57
|
-
is_valid = validator.validate("data.csv")
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Validation Definition Format
|
|
61
|
-
|
|
62
|
-
Create a small, easy-to-read YAML file with your validation rules. Example:
|
|
63
|
-
|
|
64
|
-
```yaml
|
|
65
|
-
columns:
|
|
66
|
-
- name: Name
|
|
67
|
-
regex: ^[A-Za-z\s]{2,50}$ # Letters and spaces, 2-50 characters
|
|
68
|
-
- name: Family Name
|
|
69
|
-
regex: ^[A-Za-z\s'-]{2,50}$ # Letters, spaces, hyphens and apostrophes
|
|
70
|
-
- name: Age
|
|
71
|
-
format: positive_integer # Using predefined format instead of custom regex
|
|
72
|
-
max: 120
|
|
73
|
-
- name: Salary
|
|
74
|
-
format: integer # Allows negative integers too
|
|
75
|
-
min: 20000
|
|
76
|
-
- name: Email
|
|
77
|
-
regex: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$ # Standard email format
|
|
78
|
-
- name: Phone
|
|
79
|
-
regex: ^\+?[0-9]{10,15}$ # International phone format with optional +
|
|
80
|
-
- name: Status
|
|
81
|
-
values: [active, inactive, pending, suspended] # Only these values are allowed
|
|
82
|
-
- name: Gender
|
|
83
|
-
values: [M, F, NB, O] # M: Male, F: Female, NB: Non-Binary, O: Other
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
## Validation Types
|
|
87
|
-
|
|
88
|
-
1. **Regular Expression** (`regex`)
|
|
89
|
-
- Validate fields against custom regex patterns
|
|
90
|
-
|
|
91
|
-
2. **Format** (`format`)
|
|
92
|
-
- Predefined formats for common validations (This is the recommended way to validate numeric fields)
|
|
93
|
-
- In the background, the library uses regex patterns to validate formats.
|
|
94
|
-
- Available formats:
|
|
95
|
-
- `integer`: Validates any integer number (positive or negative)
|
|
96
|
-
- `positive integer`: Validates positive integer numbers
|
|
97
|
-
- `decimal`: Validates any decimal number (positive or negative) using point as decimal separator
|
|
98
|
-
- `positive decimal point/positive decimal`: Validates positive decimal numbers using point as decimal separator
|
|
99
|
-
- `positive decimal comma`: Validates positive decimal numbers using comma as decimal separator
|
|
100
|
-
- `decimal scientific`: Validates decimal numbers in scientific notation (e.g. 23.02e-12)
|
|
101
|
-
- `non_empty`: Validates that field contains at least one character
|
|
102
|
-
- More formats will be added in upcoming versions
|
|
103
|
-
|
|
104
|
-
3. **Minimum Value** (`min`)
|
|
105
|
-
- Check if numeric fields are greater than or equal to a specified value
|
|
106
|
-
|
|
107
|
-
4. **Maximum Value** (`max`)
|
|
108
|
-
- Check if numeric fields are less than or equal to a specified value
|
|
109
|
-
|
|
110
|
-
5. **Value Set** (`values`)
|
|
111
|
-
- Ensure fields only contain values from a predefined set
|
|
112
|
-
|
|
113
|
-
You can add as many validations as you want for the same column, but take into account that the
|
|
114
|
-
column only will be considered correct if all the validations are OK.
|
|
115
|
-
|
|
116
|
-
## Global Validations
|
|
117
|
-
|
|
118
|
-
### empty_not_ok
|
|
119
|
-
|
|
120
|
-
Empty values (empty string '') are considered correct and accepted by default.
|
|
121
|
-
However, if your data must always have some content,
|
|
122
|
-
you can add a global `empty_not_ok` flag at the root level of your YAML definition to automatically
|
|
123
|
-
add the `format: non_empty` validation to all columns:
|
|
124
|
-
|
|
125
|
-
```yaml
|
|
126
|
-
empty_not_ok: true
|
|
127
|
-
columns:
|
|
128
|
-
- name: Column1
|
|
129
|
-
# other validations...
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Column Separator
|
|
133
|
-
|
|
134
|
-
By default, the library uses comma (,) as the column separator. You can change this using the `set_separator` method:
|
|
135
|
-
|
|
136
|
-
```python
|
|
137
|
-
validator = CSVValidator.from_file("rules.yml")
|
|
138
|
-
validator.set_separator(";") # Use semicolon as separator
|
|
139
|
-
validator.set_separator("\t") # Use tab as separator
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### Decimal Separator
|
|
143
|
-
|
|
144
|
-
By default, the library uses point (.) as the decimal separator. You can change this using the `set_decimal_separator` method:
|
|
145
|
-
|
|
146
|
-
```python
|
|
147
|
-
validator = CSVValidator.from_file("rules.yml")
|
|
148
|
-
validator.set_decimal_separator(",") # Use comma
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
## Error Handling
|
|
152
|
-
|
|
153
|
-
The library provides detailed validation reports through Python's logging system. When a validation fails, you'll get information about:
|
|
154
|
-
- Which columns failed validation
|
|
155
|
-
- What type of validation failed
|
|
156
|
-
- Sample of invalid values
|
|
157
|
-
- Number of rows that failed each validation
|
|
158
|
-
|
|
159
|
-
## Development
|
|
160
|
-
|
|
161
|
-
### Prerequisites
|
|
162
|
-
|
|
163
|
-
- Rust 2021 edition or later
|
|
164
|
-
- Python 3.6+ (for Python bindings)
|
|
165
|
-
- Cargo and standard Rust tooling
|
|
166
|
-
|
|
167
|
-
### Building from Source (Rust version)
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
# Clone the repository
|
|
171
|
-
git clone https://github.com/charro/csv_validation
|
|
172
|
-
cd csv_validation
|
|
173
|
-
|
|
174
|
-
# Build the project
|
|
175
|
-
cargo build --release
|
|
176
|
-
|
|
177
|
-
# Run tests
|
|
178
|
-
cargo test
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Dependencies
|
|
182
|
-
|
|
183
|
-
- `csv`: CSV parsing
|
|
184
|
-
- `flate2`: Compression support
|
|
185
|
-
- `pyo3`: Python bindings
|
|
186
|
-
- `regex`: Regular expression support
|
|
187
|
-
- `yaml-rust2`: YAML parsing
|
|
188
|
-
- Various utilities for logging and serialization
|
|
189
|
-
|
|
190
|
-
## License
|
|
191
|
-
|
|
192
|
-
MIT License
|
|
193
|
-
|
|
194
|
-
Copyright (c) 2024 CSV Validation Contributors
|
|
195
|
-
|
|
196
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
197
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
198
|
-
in the Software without restriction, including without limitation the rights
|
|
199
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
200
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
201
|
-
furnished to do so, subject to the following conditions:
|
|
202
|
-
|
|
203
|
-
The above copyright notice and this permission notice shall be included in all
|
|
204
|
-
copies or substantial portions of the Software.
|
|
205
|
-
|
|
206
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
207
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
208
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
209
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
210
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
211
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
212
|
-
SOFTWARE.
|
|
213
|
-
|
|
214
|
-
## Contributing
|
|
215
|
-
|
|
216
|
-
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|