tableio 0.9__tar.gz → 1.0__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.
- {tableio-0.9/tableio.egg-info → tableio-1.0}/PKG-INFO +6 -6
- {tableio-0.9 → tableio-1.0}/README.md +3 -3
- {tableio-0.9 → tableio-1.0}/README_pypi.md +3 -3
- {tableio-0.9 → tableio-1.0}/pyproject.toml +1 -1
- {tableio-0.9 → tableio-1.0}/setup.py +3 -3
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_spreadsheetbased.py +33 -16
- {tableio-0.9 → tableio-1.0/tableio.egg-info}/PKG-INFO +6 -6
- {tableio-0.9 → tableio-1.0}/tableio.egg-info/requires.txt +2 -2
- {tableio-0.9 → tableio-1.0}/LICENSE.txt +0 -0
- {tableio-0.9 → tableio-1.0}/setup.cfg +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/__init__.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/_archive_rewrite.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/access_capability.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/border_helper.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/capability.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/color.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/config_data.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/config_data_apply.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/config_data_describe.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/config_data_error.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/config_data_validate.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/factory.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/optional_args.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/py.typed +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/reg_pkg_formats.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_csv.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_openpyxl.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_pylightxl.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_xlsxwriter.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excelbased.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_mformat.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_mformatbased.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_ods_odfdo.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_textbased.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/tableio_types.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/value_type.py +0 -0
- {tableio-0.9 → tableio-1.0}/src/tableio/valueconversion.py +0 -0
- {tableio-0.9 → tableio-1.0}/tableio.egg-info/SOURCES.txt +0 -0
- {tableio-0.9 → tableio-1.0}/tableio.egg-info/dependency_links.txt +0 -0
- {tableio-0.9 → tableio-1.0}/tableio.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tableio
|
|
3
|
-
Version: 0
|
|
3
|
+
Version: 1.0
|
|
4
4
|
Summary: Uniform way to write table data to and read from different file formats
|
|
5
5
|
Author: Tom Björkholm
|
|
6
6
|
Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
|
|
@@ -17,8 +17,8 @@ Requires-Dist: build>=1.5.0
|
|
|
17
17
|
Requires-Dist: wheel>=0.47.0
|
|
18
18
|
Requires-Dist: mformat-ext>=0.6
|
|
19
19
|
Requires-Dist: openpyxl>=3.1.5
|
|
20
|
-
Requires-Dist: types-openpyxl>=3.1.5.
|
|
21
|
-
Requires-Dist: odfdo>=3.22.
|
|
20
|
+
Requires-Dist: types-openpyxl>=3.1.5.20260518
|
|
21
|
+
Requires-Dist: odfdo>=3.22.8
|
|
22
22
|
Requires-Dist: xlsxwriter>=3.2.9
|
|
23
23
|
Requires-Dist: pylightxl>=1.61
|
|
24
24
|
Dynamic: author
|
|
@@ -137,9 +137,9 @@ a better start by reading the examples.
|
|
|
137
137
|
|
|
138
138
|
## Test summary
|
|
139
139
|
|
|
140
|
-
- Test result:
|
|
140
|
+
- Test result: 1347 passed in 22s
|
|
141
141
|
- No flake8 warnings.
|
|
142
142
|
- No mypy errors found.
|
|
143
143
|
- No python layout warnings.
|
|
144
|
-
- Built version(s): 0
|
|
145
|
-
- Build and test using Python 3.14.
|
|
144
|
+
- Built version(s): 1.0
|
|
145
|
+
- Build and test using Python 3.14.5
|
|
@@ -93,9 +93,9 @@ information about the build system. This README can also be viewed at
|
|
|
93
93
|
|
|
94
94
|
## Test summary
|
|
95
95
|
|
|
96
|
-
- Test result:
|
|
96
|
+
- Test result: 1347 passed in 22s
|
|
97
97
|
- No flake8 warnings.
|
|
98
98
|
- No mypy errors found.
|
|
99
99
|
- No python layout warnings.
|
|
100
|
-
- Built version(s): 0
|
|
101
|
-
- Build and test using Python 3.14.
|
|
100
|
+
- Built version(s): 1.0
|
|
101
|
+
- Build and test using Python 3.14.5
|
|
@@ -109,9 +109,9 @@ a better start by reading the examples.
|
|
|
109
109
|
|
|
110
110
|
## Test summary
|
|
111
111
|
|
|
112
|
-
- Test result:
|
|
112
|
+
- Test result: 1347 passed in 22s
|
|
113
113
|
- No flake8 warnings.
|
|
114
114
|
- No mypy errors found.
|
|
115
115
|
- No python layout warnings.
|
|
116
|
-
- Built version(s): 0
|
|
117
|
-
- Build and test using Python 3.14.
|
|
116
|
+
- Built version(s): 1.0
|
|
117
|
+
- Build and test using Python 3.14.5
|
|
@@ -5,7 +5,7 @@ from setuptools import setup
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='tableio',
|
|
8
|
-
version='0
|
|
8
|
+
version='1.0',
|
|
9
9
|
description='Uniform way to write table data to and read from different ' \
|
|
10
10
|
'file formats',
|
|
11
11
|
author='Tom Björkholm',
|
|
@@ -21,8 +21,8 @@ setup(
|
|
|
21
21
|
'wheel >= 0.47.0',
|
|
22
22
|
'mformat-ext >= 0.6',
|
|
23
23
|
'openpyxl >= 3.1.5',
|
|
24
|
-
'types-openpyxl >= 3.1.5.
|
|
25
|
-
'odfdo >= 3.22.
|
|
24
|
+
'types-openpyxl >= 3.1.5.20260518',
|
|
25
|
+
'odfdo >= 3.22.8',
|
|
26
26
|
'xlsxwriter >= 3.2.9',
|
|
27
27
|
'pylightxl >= 1.61'
|
|
28
28
|
]
|
|
@@ -50,6 +50,16 @@ class _ScanResult(NamedTuple):
|
|
|
50
50
|
next_read_row: int
|
|
51
51
|
|
|
52
52
|
|
|
53
|
+
class _ReadLimits(NamedTuple):
|
|
54
|
+
"""Resolved row and column limits for one section read."""
|
|
55
|
+
|
|
56
|
+
left: int
|
|
57
|
+
top: int
|
|
58
|
+
bottom: int
|
|
59
|
+
scan_right: int
|
|
60
|
+
fixed_right: Optional[int]
|
|
61
|
+
|
|
62
|
+
|
|
53
63
|
class _SheetState(NamedTuple):
|
|
54
64
|
"""Sequential state tracked for one sheet during an open session."""
|
|
55
65
|
|
|
@@ -295,8 +305,7 @@ class TableIOSpreadsheetBased(TableIO):
|
|
|
295
305
|
if read_sheet is not write_sheet:
|
|
296
306
|
self._write_value_to_sheet(read_sheet, row, column, None)
|
|
297
307
|
|
|
298
|
-
def _read_limits(
|
|
299
|
-
self, box: Optional[Box]) -> tuple[int, int, int, Optional[int]]:
|
|
308
|
+
def _read_limits(self, box: Optional[Box]) -> _ReadLimits:
|
|
300
309
|
"""Return the row and column limits for a read operation."""
|
|
301
310
|
read_sheet = self._read_sheet()
|
|
302
311
|
left = 0 if box is None else box.left
|
|
@@ -304,8 +313,10 @@ class TableIOSpreadsheetBased(TableIO):
|
|
|
304
313
|
bottom = box.bottom if box is not None and \
|
|
305
314
|
box.bottom is not None else self._scan_limit_bottom(read_sheet,
|
|
306
315
|
top)
|
|
307
|
-
|
|
308
|
-
|
|
316
|
+
fixed_right = box.right if box is not None else None
|
|
317
|
+
scan_right = self._scan_limit_right(read_sheet, left, fixed_right)
|
|
318
|
+
return _ReadLimits(left=left, top=top, bottom=bottom,
|
|
319
|
+
scan_right=scan_right, fixed_right=fixed_right)
|
|
309
320
|
|
|
310
321
|
def _scan_limit_bottom(self, sheet: object, top: int) -> int:
|
|
311
322
|
"""Return the exclusive bottom limit used when scanning rows."""
|
|
@@ -353,20 +364,26 @@ class TableIOSpreadsheetBased(TableIO):
|
|
|
353
364
|
def _scan_section(self, box: Optional[Box]) -> _ScanResult:
|
|
354
365
|
"""Scan the next readable section on the active sheet."""
|
|
355
366
|
sheet = self._read_sheet()
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
367
|
+
limits = self._read_limits(box)
|
|
368
|
+
left = limits.left
|
|
369
|
+
bottom = limits.bottom
|
|
370
|
+
scan_right = limits.scan_right
|
|
371
|
+
fixed_right = limits.fixed_right
|
|
372
|
+
row = limits.top
|
|
373
|
+
last_read_row = limits.top - 1
|
|
374
|
+
while row < bottom and self._row_is_empty(sheet, row, left,
|
|
375
|
+
scan_right):
|
|
360
376
|
last_read_row = row
|
|
361
377
|
row += 1
|
|
362
378
|
headings: list[str] = []
|
|
363
|
-
while row < bottom and self._row_is_heading(sheet, row, left,
|
|
364
|
-
bottom):
|
|
365
|
-
|
|
366
|
-
|
|
379
|
+
while row < bottom and self._row_is_heading(sheet, row, left,
|
|
380
|
+
scan_right, bottom):
|
|
381
|
+
headings.append(value_to_str(self._cell_value(sheet, row, left),
|
|
382
|
+
none_is_empty=True))
|
|
367
383
|
last_read_row = row
|
|
368
384
|
row += 1
|
|
369
|
-
while row < bottom and self._row_is_empty(sheet, row, left,
|
|
385
|
+
while row < bottom and self._row_is_empty(sheet, row, left,
|
|
386
|
+
scan_right):
|
|
370
387
|
last_read_row = row
|
|
371
388
|
row += 1
|
|
372
389
|
table_top = row
|
|
@@ -374,17 +391,17 @@ class TableIOSpreadsheetBased(TableIO):
|
|
|
374
391
|
table_right = left
|
|
375
392
|
while row < bottom:
|
|
376
393
|
nonempty_columns = self._row_nonempty_columns(sheet, row, left,
|
|
377
|
-
|
|
394
|
+
scan_right)
|
|
378
395
|
if not nonempty_columns:
|
|
379
396
|
last_read_row = row
|
|
380
397
|
row += 1
|
|
381
398
|
break
|
|
382
399
|
last_read_row = row
|
|
383
400
|
table_bottom = row + 1
|
|
384
|
-
if
|
|
401
|
+
if fixed_right is None:
|
|
385
402
|
table_right = max(table_right, max(nonempty_columns) + 1)
|
|
386
403
|
else:
|
|
387
|
-
table_right =
|
|
404
|
+
table_right = fixed_right
|
|
388
405
|
row += 1
|
|
389
406
|
return _ScanResult(headings=headings, table_top=table_top,
|
|
390
407
|
table_bottom=table_bottom, table_left=left,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tableio
|
|
3
|
-
Version: 0
|
|
3
|
+
Version: 1.0
|
|
4
4
|
Summary: Uniform way to write table data to and read from different file formats
|
|
5
5
|
Author: Tom Björkholm
|
|
6
6
|
Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
|
|
@@ -17,8 +17,8 @@ Requires-Dist: build>=1.5.0
|
|
|
17
17
|
Requires-Dist: wheel>=0.47.0
|
|
18
18
|
Requires-Dist: mformat-ext>=0.6
|
|
19
19
|
Requires-Dist: openpyxl>=3.1.5
|
|
20
|
-
Requires-Dist: types-openpyxl>=3.1.5.
|
|
21
|
-
Requires-Dist: odfdo>=3.22.
|
|
20
|
+
Requires-Dist: types-openpyxl>=3.1.5.20260518
|
|
21
|
+
Requires-Dist: odfdo>=3.22.8
|
|
22
22
|
Requires-Dist: xlsxwriter>=3.2.9
|
|
23
23
|
Requires-Dist: pylightxl>=1.61
|
|
24
24
|
Dynamic: author
|
|
@@ -137,9 +137,9 @@ a better start by reading the examples.
|
|
|
137
137
|
|
|
138
138
|
## Test summary
|
|
139
139
|
|
|
140
|
-
- Test result:
|
|
140
|
+
- Test result: 1347 passed in 22s
|
|
141
141
|
- No flake8 warnings.
|
|
142
142
|
- No mypy errors found.
|
|
143
143
|
- No python layout warnings.
|
|
144
|
-
- Built version(s): 0
|
|
145
|
-
- Build and test using Python 3.14.
|
|
144
|
+
- Built version(s): 1.0
|
|
145
|
+
- Build and test using Python 3.14.5
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|