csv-detective 0.7.5.dev1345__py3-none-any.whl → 0.8.0__py3-none-any.whl

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_detective/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  from .explore_csv import routine, routine_minio, validate_then_detect # noqa
2
2
  from .output.example import create_example_csv_file # noqa
3
3
 
4
- __version__ = '0.7.5.dev'
4
+ __version__ = '0.8.0'
@@ -134,19 +134,14 @@ def validate_then_detect(
134
134
  verbose=verbose,
135
135
  skipna=skipna,
136
136
  )
137
- if is_valid:
138
- # skipping formats detection as the validation is successful
139
- analysis = previous_analysis
140
- # profile has to be regenerated, it's independent from analysis
141
- del analysis["profile"]
142
- else:
143
- if analysis is None:
144
- # if loading failed in validate, we load it from scratch
145
- table, analysis = load_file(
146
- file_path=file_path,
147
- num_rows=num_rows,
148
- verbose=verbose,
149
- )
137
+ if analysis is None:
138
+ # if loading failed in validate, we load it from scratch
139
+ table, analysis = load_file(
140
+ file_path=file_path,
141
+ num_rows=num_rows,
142
+ verbose=verbose,
143
+ )
144
+ if not is_valid:
150
145
  analysis = detect_formats(
151
146
  table=table,
152
147
  analysis=analysis,
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Current (in progress)
3
+ ## 0.8.0 (2025-05-20)
4
4
 
5
5
  - New function that creates a csv from a list of fields and constraints, or from a TableSchema [#101](https://github.com/datagouv/csv-detective/pull/101)
6
6
  - Enable outputing loaded dataframe [#102](https://github.com/datagouv/csv-detective/pull/102)
@@ -18,6 +18,7 @@
18
18
  - Refactor fields tests [#114](https://github.com/datagouv/csv-detective/pull/114)
19
19
  - Better code waldec and add code import [#116](https://github.com/datagouv/csv-detective/pull/116)
20
20
  - Better validation and refactors [#117](https://github.com/datagouv/csv-detective/pull/117)
21
+ - Fix validation [#118](https://github.com/datagouv/csv-detective/pull/118)
21
22
 
22
23
  ## 0.7.4 (2024-11-15)
23
24
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csv_detective
3
- Version: 0.7.5.dev1345
3
+ Version: 0.8.0
4
4
  Summary: Detect CSV column content
5
5
  Home-page: https://github.com/etalab/csv_detective
6
6
  Author: Etalab
@@ -1,6 +1,6 @@
1
- csv_detective/__init__.py,sha256=vpK7WMkIQbcJzu6HKOwcn7PpHsNCCaXZ1YLMS5Wq9tM,165
1
+ csv_detective/__init__.py,sha256=R1C9_pVd2Dm9FeURRgfJBC6SubLhUzpk4Yk4bPeKKtA,161
2
2
  csv_detective/cli.py,sha256=itooHtpyfC6DUsL_DchPKe1xo7m0MYJIp1L4R8eqoTk,1401
3
- csv_detective/explore_csv.py,sha256=K9OM1NGZI1u6E6J_rUbbkpeM5UHQysvu6PKwm4cso6I,9326
3
+ csv_detective/explore_csv.py,sha256=IT1-9TbS78p6oeDpQ5T6DQ93xQbobcscyBQb6nh86H4,9082
4
4
  csv_detective/load_tests.py,sha256=GILvfkd4OVI-72mA4nzbPlZqgcXZ4wznOhGfZ1ucWkM,2385
5
5
  csv_detective/s3_utils.py,sha256=1cIVdQUYY2ovErbMwp72Gqtqx2bkB8nfVhn-QaOFTT0,1451
6
6
  csv_detective/utils.py,sha256=8cBKgWifWF7BG_uMfLmxtV45p6PZ4b50NjWXKoAAZ4s,1002
@@ -148,19 +148,19 @@ csv_detective/parsing/csv.py,sha256=11mibDnJhIjykXLGZvA5ZEU5U7KgxIrbyO6BNv6jlro,
148
148
  csv_detective/parsing/excel.py,sha256=AslE2S1e67o8yTIAIhp-lAnJ6-XqeBBRz1-VMFqhZBM,7055
149
149
  csv_detective/parsing/load.py,sha256=u6fbGFZsL2GwPQRzhAXgt32JpUur7vbQdErREHxNJ-w,3661
150
150
  csv_detective/parsing/text.py,sha256=rsfk66BCmdpsCOd0kDJ8tmqMsEWd-OeBkEisWc4Ej9k,1246
151
- csv_detective-0.7.5.dev1345.data/data/share/csv_detective/CHANGELOG.md,sha256=a_xgrE-o1Qk1NkVcuohY3Dp76R4l66cyf3IPHw7mB4E,8177
152
- csv_detective-0.7.5.dev1345.data/data/share/csv_detective/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
153
- csv_detective-0.7.5.dev1345.data/data/share/csv_detective/README.md,sha256=Qr8xRXc-dxQ-tdXCpCTCKp1Uliqq84r0UOlPRNuGCpI,9506
154
- csv_detective-0.7.5.dev1345.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
151
+ csv_detective-0.8.0.data/data/share/csv_detective/CHANGELOG.md,sha256=0dHnpXhDXbRZ9lPZ2qTC8Dj9elXGkr-YLQTjNLVhY7E,8250
152
+ csv_detective-0.8.0.data/data/share/csv_detective/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
153
+ csv_detective-0.8.0.data/data/share/csv_detective/README.md,sha256=Qr8xRXc-dxQ-tdXCpCTCKp1Uliqq84r0UOlPRNuGCpI,9506
154
+ csv_detective-0.8.0.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
155
155
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
156
156
  tests/test_example.py,sha256=JeHxSK0IVDcSrOhSZlNGSQv4JAc_r6mzvJM8PfmLTMw,2018
157
157
  tests/test_fields.py,sha256=E6kEsp6_W56WW6FXWUl7hggsJv-vsKuOaJ9JLoFmrUw,9964
158
158
  tests/test_file.py,sha256=9APE1d43lQ8Dk8lwJFNUK_YekYYsQ0ae2_fgpcPE9mk,8116
159
159
  tests/test_labels.py,sha256=6MOKrGznkwU5fjZ_3oiB6Scmb480Eu-9geBJs0UDLds,159
160
160
  tests/test_structure.py,sha256=bv-tjgXohvQAxwmxzH0BynFpK2TyPjcxvtIAmIRlZmA,1393
161
- tests/test_validation.py,sha256=x3UZoyx_uyseLtv8yf_OJmRQ27j2eX4_rQUgbq0F6pg,3215
162
- csv_detective-0.7.5.dev1345.dist-info/METADATA,sha256=ZRUXgtu7AR2cdoC7fzjS19wJAKqfa4GoXLy3nw8CbHs,1386
163
- csv_detective-0.7.5.dev1345.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
164
- csv_detective-0.7.5.dev1345.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
165
- csv_detective-0.7.5.dev1345.dist-info/top_level.txt,sha256=M0Nv646VHo-49zWjPkwo2C48UmtfddV8_9mEZeIxy8Q,20
166
- csv_detective-0.7.5.dev1345.dist-info/RECORD,,
161
+ tests/test_validation.py,sha256=CTGonR6htxcWF9WH8MxumDD8cF45Y-G4hm94SM4lFjU,3246
162
+ csv_detective-0.8.0.dist-info/METADATA,sha256=qGNczwjyZlIEpcqV4SgjoU1L0wa7IJ1HWFl0jick3NA,1378
163
+ csv_detective-0.8.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
164
+ csv_detective-0.8.0.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
165
+ csv_detective-0.8.0.dist-info/top_level.txt,sha256=M0Nv646VHo-49zWjPkwo2C48UmtfddV8_9mEZeIxy8Q,20
166
+ csv_detective-0.8.0.dist-info/RECORD,,
tests/test_validation.py CHANGED
@@ -70,6 +70,7 @@ def test_validation(_params):
70
70
  {"separator": "|"},
71
71
  {"encoding": "unknown"},
72
72
  {"header": ["a", "b"]},
73
+ {"total_lines": 100},
73
74
  {
74
75
  "columns.NUMCOM": {
75
76
  "python_type": "int",