python-calamine-reducto 0.7.15__tar.gz → 0.7.17__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 (66) hide show
  1. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/Cargo.lock +2 -2
  2. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/Cargo.toml +1 -1
  3. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/PKG-INFO +1 -1
  4. python_calamine_reducto-0.7.17/tests/create_hidden_col_range_fixture.py +33 -0
  5. python_calamine_reducto-0.7.17/tests/data/hidden_col_range_test.xlsx +0 -0
  6. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_grid.py +21 -0
  7. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.github/workflows/CI.yml +0 -0
  8. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.github/workflows/release.yml +0 -0
  9. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.gitignore +0 -0
  10. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.pre-commit-config.yaml +0 -0
  11. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.python-version +0 -0
  12. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/CLAUDE.md +0 -0
  13. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/LICENSE +0 -0
  14. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/README.md +0 -0
  15. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/build.rs +0 -0
  16. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/pyproject.toml +0 -0
  17. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/__init__.py +0 -0
  18. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/_python_calamine.pyi +0 -0
  19. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/py.typed +0 -0
  20. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/renovate.json +0 -0
  21. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/lib.rs +0 -0
  22. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/cell.rs +0 -0
  23. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/errors.rs +0 -0
  24. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/grid.rs +0 -0
  25. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/mod.rs +0 -0
  26. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/sheet.rs +0 -0
  27. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/table.rs +0 -0
  28. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/workbook.rs +0 -0
  29. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/__init__.py +0 -0
  30. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/conftest.py +0 -0
  31. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_empty_merge_fixture.py +0 -0
  32. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_richtext_fixture.py +0 -0
  33. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_test_fixture.py +0 -0
  34. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.ods +0 -0
  35. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xls +0 -0
  36. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsb +0 -0
  37. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsx +0 -0
  38. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.ods +0 -0
  39. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xls +0 -0
  40. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xlsb +0 -0
  41. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xlsx +0 -0
  42. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/dropdown_test.xlsx +0 -0
  43. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.ods +0 -0
  44. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsb +0 -0
  45. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsx +0 -0
  46. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_merge_test.xlsx +0 -0
  47. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/formula_test.xlsx +0 -0
  48. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/grid_test.xlsx +0 -0
  49. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/image_test.xlsx +0 -0
  50. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/issue139.xlsx +0 -0
  51. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/multi_image_test.xlsx +0 -0
  52. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.ods +0 -0
  53. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xls +0 -0
  54. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xlsb +0 -0
  55. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xlsx +0 -0
  56. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/richtext_test.xlsx +0 -0
  57. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsb +0 -0
  58. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsx +0 -0
  59. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/temperature-table.xlsb +0 -0
  60. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_band.py +0 -0
  61. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_base.py +0 -0
  62. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_images.py +0 -0
  63. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_pandas.py +0 -0
  64. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_sheet_type.py +0 -0
  65. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_tables.py +0 -0
  66. {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/uv.lock +0 -0
@@ -80,7 +80,7 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
80
80
  [[package]]
81
81
  name = "calamine"
82
82
  version = "0.32.0"
83
- source = "git+https://github.com/reductoai/calamine.git?branch=main#89ef3e2e1cbbfe06cf61fd0ee1c7d54dff235a0e"
83
+ source = "git+https://github.com/reductoai/calamine.git?branch=main#9e6866a552b5baa5b9f2270049eeb72846c4386e"
84
84
  dependencies = [
85
85
  "atoi_simd",
86
86
  "byteorder",
@@ -612,7 +612,7 @@ dependencies = [
612
612
 
613
613
  [[package]]
614
614
  name = "python-calamine-reducto"
615
- version = "0.7.15"
615
+ version = "0.7.17"
616
616
  dependencies = [
617
617
  "calamine",
618
618
  "chrono",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "python-calamine-reducto"
3
- version = "0.7.15"
3
+ version = "0.7.17"
4
4
  edition = "2021"
5
5
  readme = "README.md"
6
6
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-calamine-reducto
3
- Version: 0.7.15
3
+ Version: 0.7.17
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Programming Language :: Rust
6
6
  Classifier: Programming Language :: Python :: 3.11
@@ -0,0 +1,33 @@
1
+ """Generate test fixture: tests/data/hidden_col_range_test.xlsx
2
+
3
+ Creates an xlsx where a single `<col>` element covers a *range* of columns
4
+ (`<col min="3" max="6" hidden="1"/>`), to test that get_sheet_layout reports
5
+ every column in the range rather than only `min`.
6
+
7
+ Run once: python tests/create_hidden_col_range_fixture.py
8
+ """
9
+
10
+ from pathlib import Path
11
+
12
+ import openpyxl
13
+
14
+ wb = openpyxl.Workbook()
15
+
16
+ ws = wb.active
17
+ ws.title = "HiddenColRange"
18
+
19
+ for row in range(1, 4):
20
+ for col in range(1, 11):
21
+ ws.cell(row=row, column=col, value=f"r{row}c{col}")
22
+
23
+ # C:F hidden as a group -> one <col min="3" max="6" hidden="1" width="9.5"/>
24
+ ws.column_dimensions.group("C", "F", hidden=True)
25
+ ws.column_dimensions["C"].width = 9.5
26
+
27
+ # H hidden on its own -> <col min="8" max="8" .../>, the degenerate range
28
+ ws.column_dimensions["H"].width = 20
29
+ ws.column_dimensions["H"].hidden = True
30
+
31
+ out = Path(__file__).parent / "data" / "hidden_col_range_test.xlsx"
32
+ wb.save(out)
33
+ print(f"Created {out}")
@@ -20,6 +20,7 @@ DATA = Path(__file__).parent / "data"
20
20
  GRID_TEST = DATA / "grid_test.xlsx"
21
21
  RICHTEXT_TEST = DATA / "richtext_test.xlsx"
22
22
  EMPTY_MERGE_TEST = DATA / "empty_merge_test.xlsx"
23
+ HIDDEN_COL_RANGE_TEST = DATA / "hidden_col_range_test.xlsx"
23
24
 
24
25
 
25
26
  # ─── Fixtures ───
@@ -241,6 +242,26 @@ class TestGetSheetLayout:
241
242
  assert layout["default_row_height"] is not None
242
243
  # default_column_width may be None if not explicitly set in the xlsx
243
244
 
245
+ def test_hidden_column_range(self):
246
+ """A `<col>` spanning min..max applies to every column in the range.
247
+
248
+ The fixture hides C:F as a group, which Excel writes as a single
249
+ `<col min="3" max="6" hidden="1"/>`. Reporting only column C left
250
+ D:F looking visible to consumers that key off `hidden`.
251
+ """
252
+ wb = CalamineWorkbook.from_path(HIDDEN_COL_RANGE_TEST)
253
+ layout = wb.get_sheet_layout("HiddenColRange")
254
+ cols = {c[0]: (c[1], c[2]) for c in layout["column_widths"]}
255
+
256
+ for idx in range(2, 6): # C:F, 0-indexed
257
+ assert idx in cols, f"column {idx} missing from layout"
258
+ width, hidden = cols[idx]
259
+ assert hidden is True, f"column {idx} should be hidden"
260
+ assert width == pytest.approx(9.5)
261
+
262
+ assert 6 not in cols # G untouched
263
+ assert cols[7] == (pytest.approx(20.0), True) # H, single-column range
264
+
244
265
 
245
266
  # ─── CellGrid.empty() ───
246
267