csvsmith 0.11.0__tar.gz → 0.11.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.
Files changed (45) hide show
  1. {csvsmith-0.11.0/src/csvsmith.egg-info → csvsmith-0.11.1}/PKG-INFO +1 -1
  2. {csvsmith-0.11.0 → csvsmith-0.11.1}/pyproject.toml +1 -1
  3. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/csv_viewer.py +1 -1
  4. {csvsmith-0.11.0 → csvsmith-0.11.1/src/csvsmith.egg-info}/PKG-INFO +1 -1
  5. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_csv_viewer.py +11 -0
  6. {csvsmith-0.11.0 → csvsmith-0.11.1}/LICENSE +0 -0
  7. {csvsmith-0.11.0 → csvsmith-0.11.1}/README.rst +0 -0
  8. {csvsmith-0.11.0 → csvsmith-0.11.1}/setup.cfg +0 -0
  9. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/__init__.py +0 -0
  10. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/cli.py +0 -0
  11. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/__init__.py +0 -0
  12. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/classify.py +0 -0
  13. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/dense_csv.py +0 -0
  14. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/excel2csv.py +0 -0
  15. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/filter_rows.py +0 -0
  16. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/find_matches_in_csv.py +0 -0
  17. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/knapsack_csv.py +0 -0
  18. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/move_files.py +0 -0
  19. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/row_dedup.py +0 -0
  20. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/sample_csv.py +0 -0
  21. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/tools/strict_concat.py +0 -0
  22. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/utils/__init__.py +0 -0
  23. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/utils/clean_numeric.py +0 -0
  24. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/utils/distance.py +0 -0
  25. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/utils/io.py +0 -0
  26. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith/utils/normalize.py +0 -0
  27. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith.egg-info/SOURCES.txt +0 -0
  28. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith.egg-info/dependency_links.txt +0 -0
  29. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith.egg-info/entry_points.txt +0 -0
  30. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith.egg-info/requires.txt +0 -0
  31. {csvsmith-0.11.0 → csvsmith-0.11.1}/src/csvsmith.egg-info/top_level.txt +0 -0
  32. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_classify.py +0 -0
  33. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_clean_numeric.py +0 -0
  34. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_cli.py +0 -0
  35. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_dense_csv.py +0 -0
  36. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_excel2csv.py +0 -0
  37. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_filter_rows.py +0 -0
  38. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_find_matches_in_csv.py +0 -0
  39. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_knapsack_csv.py +0 -0
  40. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_move_files.py +0 -0
  41. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_normalize.py +0 -0
  42. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_row_dedup.py +0 -0
  43. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_sample_csv.py +0 -0
  44. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_strict_concat.py +0 -0
  45. {csvsmith-0.11.0 → csvsmith-0.11.1}/tests/test_string_distance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csvsmith
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: Small CSV utilities: row deduplication, classification, row filtering, and CLI helpers.
5
5
  Author-email: Eiichi YAMAMOTO <info@yeiichi.com>
6
6
  License: MIT License
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "csvsmith"
7
- version = "0.11.0"
7
+ version = "0.11.1"
8
8
  description = "Small CSV utilities: row deduplication, classification, row filtering, and CLI helpers."
9
9
  readme = "README.rst"
10
10
  requires-python = ">=3.10"
@@ -31,7 +31,7 @@ class DataFrame:
31
31
  convert_types: bool = True,
32
32
  ) -> DataFrame:
33
33
  """Read a CSV file into a column-oriented ``DataFrame``."""
34
- with Path(filepath).open("r", newline="", encoding="utf-8") as file:
34
+ with Path(filepath).open("r", newline="", encoding="utf-8-sig") as file:
35
35
  reader = csv.DictReader(file)
36
36
  fieldnames = reader.fieldnames or []
37
37
  data: dict[str, list[Any]] = {column: [] for column in fieldnames}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: csvsmith
3
- Version: 0.11.0
3
+ Version: 0.11.1
4
4
  Summary: Small CSV utilities: row deduplication, classification, row filtering, and CLI helpers.
5
5
  Author-email: Eiichi YAMAMOTO <info@yeiichi.com>
6
6
  License: MIT License
@@ -24,6 +24,17 @@ def test_dataframe_reads_csv_and_infers_numeric_types(tmp_path):
24
24
  assert repr(df) == "<DataFrame with 2 rows and 2 columns>"
25
25
 
26
26
 
27
+ def test_dataframe_reads_utf8_bom_csv_headers(tmp_path):
28
+ source = tmp_path / "sample.csv"
29
+ with source.open("w", encoding="utf-8-sig", newline="") as outfile:
30
+ csv.writer(outfile).writerows([["name", "value"], ["Alice", "12"]])
31
+
32
+ df = DataFrame.from_csv(source)
33
+
34
+ assert df.columns == ["name", "value"]
35
+ assert df["name"] == ["Alice"]
36
+
37
+
27
38
  def test_dataframe_can_keep_values_as_strings(tmp_path):
28
39
  source = tmp_path / "sample.csv"
29
40
  write_csv(source, [["id"], ["001"]])
File without changes
File without changes
File without changes
File without changes
File without changes