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.
Files changed (41) hide show
  1. {tableio-0.9/tableio.egg-info → tableio-1.0}/PKG-INFO +6 -6
  2. {tableio-0.9 → tableio-1.0}/README.md +3 -3
  3. {tableio-0.9 → tableio-1.0}/README_pypi.md +3 -3
  4. {tableio-0.9 → tableio-1.0}/pyproject.toml +1 -1
  5. {tableio-0.9 → tableio-1.0}/setup.py +3 -3
  6. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_spreadsheetbased.py +33 -16
  7. {tableio-0.9 → tableio-1.0/tableio.egg-info}/PKG-INFO +6 -6
  8. {tableio-0.9 → tableio-1.0}/tableio.egg-info/requires.txt +2 -2
  9. {tableio-0.9 → tableio-1.0}/LICENSE.txt +0 -0
  10. {tableio-0.9 → tableio-1.0}/setup.cfg +0 -0
  11. {tableio-0.9 → tableio-1.0}/src/tableio/__init__.py +0 -0
  12. {tableio-0.9 → tableio-1.0}/src/tableio/_archive_rewrite.py +0 -0
  13. {tableio-0.9 → tableio-1.0}/src/tableio/access_capability.py +0 -0
  14. {tableio-0.9 → tableio-1.0}/src/tableio/border_helper.py +0 -0
  15. {tableio-0.9 → tableio-1.0}/src/tableio/capability.py +0 -0
  16. {tableio-0.9 → tableio-1.0}/src/tableio/color.py +0 -0
  17. {tableio-0.9 → tableio-1.0}/src/tableio/config_data.py +0 -0
  18. {tableio-0.9 → tableio-1.0}/src/tableio/config_data_apply.py +0 -0
  19. {tableio-0.9 → tableio-1.0}/src/tableio/config_data_describe.py +0 -0
  20. {tableio-0.9 → tableio-1.0}/src/tableio/config_data_error.py +0 -0
  21. {tableio-0.9 → tableio-1.0}/src/tableio/config_data_validate.py +0 -0
  22. {tableio-0.9 → tableio-1.0}/src/tableio/factory.py +0 -0
  23. {tableio-0.9 → tableio-1.0}/src/tableio/optional_args.py +0 -0
  24. {tableio-0.9 → tableio-1.0}/src/tableio/py.typed +0 -0
  25. {tableio-0.9 → tableio-1.0}/src/tableio/reg_pkg_formats.py +0 -0
  26. {tableio-0.9 → tableio-1.0}/src/tableio/tableio.py +0 -0
  27. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_csv.py +0 -0
  28. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_openpyxl.py +0 -0
  29. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_pylightxl.py +0 -0
  30. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excel_xlsxwriter.py +0 -0
  31. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_excelbased.py +0 -0
  32. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_mformat.py +0 -0
  33. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_mformatbased.py +0 -0
  34. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_ods_odfdo.py +0 -0
  35. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_textbased.py +0 -0
  36. {tableio-0.9 → tableio-1.0}/src/tableio/tableio_types.py +0 -0
  37. {tableio-0.9 → tableio-1.0}/src/tableio/value_type.py +0 -0
  38. {tableio-0.9 → tableio-1.0}/src/tableio/valueconversion.py +0 -0
  39. {tableio-0.9 → tableio-1.0}/tableio.egg-info/SOURCES.txt +0 -0
  40. {tableio-0.9 → tableio-1.0}/tableio.egg-info/dependency_links.txt +0 -0
  41. {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.9
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.20260402
21
- Requires-Dist: odfdo>=3.22.7
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: 1344 passed in 20s
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.9
145
- - Build and test using Python 3.14.4
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: 1344 passed in 20s
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.9
101
- - Build and test using Python 3.14.4
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: 1344 passed in 20s
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.9
117
- - Build and test using Python 3.14.4
116
+ - Built version(s): 1.0
117
+ - Build and test using Python 3.14.5
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "tableio"
7
- version = "0.9"
7
+ version = "1.0"
8
8
  authors = [
9
9
  { name="Tom Björkholm", email="klausuler_linnet0q@icloud.com" },
10
10
  ]
@@ -5,7 +5,7 @@ from setuptools import setup
5
5
 
6
6
  setup(
7
7
  name='tableio',
8
- version='0.9',
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.20260402',
25
- 'odfdo >= 3.22.7',
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
- right = box.right if box is not None else None
308
- return left, top, bottom, right
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
- left, top, bottom, right = self._read_limits(box)
357
- row = top
358
- last_read_row = top - 1
359
- while row < bottom and self._row_is_empty(sheet, row, left, right):
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, right,
364
- bottom):
365
- heading = self._cell_value(sheet, row, left)
366
- headings.append(value_to_str(heading, none_is_empty=True))
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, right):
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
- right)
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 right is None:
401
+ if fixed_right is None:
385
402
  table_right = max(table_right, max(nonempty_columns) + 1)
386
403
  else:
387
- table_right = 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.9
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.20260402
21
- Requires-Dist: odfdo>=3.22.7
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: 1344 passed in 20s
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.9
145
- - Build and test using Python 3.14.4
144
+ - Built version(s): 1.0
145
+ - Build and test using Python 3.14.5
@@ -4,7 +4,7 @@ build>=1.5.0
4
4
  wheel>=0.47.0
5
5
  mformat-ext>=0.6
6
6
  openpyxl>=3.1.5
7
- types-openpyxl>=3.1.5.20260402
8
- odfdo>=3.22.7
7
+ types-openpyxl>=3.1.5.20260518
8
+ odfdo>=3.22.8
9
9
  xlsxwriter>=3.2.9
10
10
  pylightxl>=1.61
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