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.
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/Cargo.lock +2 -2
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/Cargo.toml +1 -1
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/PKG-INFO +1 -1
- python_calamine_reducto-0.7.17/tests/create_hidden_col_range_fixture.py +33 -0
- python_calamine_reducto-0.7.17/tests/data/hidden_col_range_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_grid.py +21 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.github/workflows/CI.yml +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.github/workflows/release.yml +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.gitignore +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.pre-commit-config.yaml +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.python-version +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/CLAUDE.md +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/LICENSE +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/README.md +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/build.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/pyproject.toml +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/__init__.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/_python_calamine.pyi +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/py.typed +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/renovate.json +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/lib.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/cell.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/errors.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/grid.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/mod.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/sheet.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/table.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/src/types/workbook.rs +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/__init__.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/conftest.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_empty_merge_fixture.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_richtext_fixture.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_test_fixture.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.ods +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xls +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.ods +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xls +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/base.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/dropdown_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.ods +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_merge_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/formula_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/grid_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/image_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/issue139.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/multi_image_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.ods +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xls +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/password.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/richtext_test.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsx +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/temperature-table.xlsb +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_band.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_base.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_images.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_pandas.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_sheet_type.py +0 -0
- {python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/test_tables.py +0 -0
- {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#
|
|
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.
|
|
615
|
+
version = "0.7.17"
|
|
616
616
|
dependencies = [
|
|
617
617
|
"calamine",
|
|
618
618
|
"chrono",
|
|
@@ -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}")
|
|
Binary file
|
|
@@ -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
|
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/.github/workflows/release.yml
RENAMED
|
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
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/python/python_calamine/py.typed
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_richtext_fixture.py
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/create_test_fixture.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsb
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/any_sheets.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/dropdown_test.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsb
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_file.xlsx
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/empty_merge_test.xlsx
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/formula_test.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/image_test.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/multi_image_test.xlsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/richtext_test.xlsx
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsb
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/table-multiple.xlsx
RENAMED
|
File without changes
|
{python_calamine_reducto-0.7.15 → python_calamine_reducto-0.7.17}/tests/data/temperature-table.xlsb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|