tableio 0.9__tar.gz → 1.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 (42) hide show
  1. {tableio-0.9/tableio.egg-info → tableio-1.1}/PKG-INFO +17 -15
  2. {tableio-0.9 → tableio-1.1}/README.md +5 -5
  3. {tableio-0.9 → tableio-1.1}/README_pypi.md +6 -6
  4. {tableio-0.9 → tableio-1.1}/pyproject.toml +9 -3
  5. {tableio-0.9 → tableio-1.1}/setup.py +5 -9
  6. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_spreadsheetbased.py +33 -16
  7. {tableio-0.9 → tableio-1.1/tableio.egg-info}/PKG-INFO +17 -15
  8. tableio-1.1/tableio.egg-info/requires.txt +6 -0
  9. tableio-0.9/tableio.egg-info/requires.txt +0 -10
  10. {tableio-0.9 → tableio-1.1}/LICENSE.txt +0 -0
  11. {tableio-0.9 → tableio-1.1}/setup.cfg +0 -0
  12. {tableio-0.9 → tableio-1.1}/src/tableio/__init__.py +0 -0
  13. {tableio-0.9 → tableio-1.1}/src/tableio/_archive_rewrite.py +0 -0
  14. {tableio-0.9 → tableio-1.1}/src/tableio/access_capability.py +0 -0
  15. {tableio-0.9 → tableio-1.1}/src/tableio/border_helper.py +0 -0
  16. {tableio-0.9 → tableio-1.1}/src/tableio/capability.py +0 -0
  17. {tableio-0.9 → tableio-1.1}/src/tableio/color.py +0 -0
  18. {tableio-0.9 → tableio-1.1}/src/tableio/config_data.py +0 -0
  19. {tableio-0.9 → tableio-1.1}/src/tableio/config_data_apply.py +0 -0
  20. {tableio-0.9 → tableio-1.1}/src/tableio/config_data_describe.py +0 -0
  21. {tableio-0.9 → tableio-1.1}/src/tableio/config_data_error.py +0 -0
  22. {tableio-0.9 → tableio-1.1}/src/tableio/config_data_validate.py +0 -0
  23. {tableio-0.9 → tableio-1.1}/src/tableio/factory.py +0 -0
  24. {tableio-0.9 → tableio-1.1}/src/tableio/optional_args.py +0 -0
  25. {tableio-0.9 → tableio-1.1}/src/tableio/py.typed +0 -0
  26. {tableio-0.9 → tableio-1.1}/src/tableio/reg_pkg_formats.py +0 -0
  27. {tableio-0.9 → tableio-1.1}/src/tableio/tableio.py +0 -0
  28. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_csv.py +0 -0
  29. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_excel_openpyxl.py +0 -0
  30. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_excel_pylightxl.py +0 -0
  31. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_excel_xlsxwriter.py +0 -0
  32. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_excelbased.py +0 -0
  33. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_mformat.py +0 -0
  34. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_mformatbased.py +0 -0
  35. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_ods_odfdo.py +0 -0
  36. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_textbased.py +0 -0
  37. {tableio-0.9 → tableio-1.1}/src/tableio/tableio_types.py +0 -0
  38. {tableio-0.9 → tableio-1.1}/src/tableio/value_type.py +0 -0
  39. {tableio-0.9 → tableio-1.1}/src/tableio/valueconversion.py +0 -0
  40. {tableio-0.9 → tableio-1.1}/tableio.egg-info/SOURCES.txt +0 -0
  41. {tableio-0.9 → tableio-1.1}/tableio.egg-info/dependency_links.txt +0 -0
  42. {tableio-0.9 → tableio-1.1}/tableio.egg-info/top_level.txt +0 -0
@@ -1,24 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tableio
3
- Version: 0.9
3
+ Version: 1.1
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>
7
7
  License-Expression: MIT
8
- Project-URL: Source code, https://bitbucket.org/tom-bjorkholm/table-io
8
+ Project-URL: Source code, https://github.com/tom-bjorkholm/table-io
9
+ Project-URL: Documentation, https://github.com/tom-bjorkholm/table-io/blob/master/doc/
9
10
  Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
10
14
  Classifier: Operating System :: OS Independent
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Typing :: Typed
11
17
  Requires-Python: >=3.12
12
18
  Description-Content-Type: text/markdown
13
19
  License-File: LICENSE.txt
14
- Requires-Dist: pip>=26.1.1
15
- Requires-Dist: setuptools>=82.0.1
16
- Requires-Dist: build>=1.5.0
17
- Requires-Dist: wheel>=0.47.0
18
- Requires-Dist: mformat-ext>=0.6
20
+ Requires-Dist: mformat-ext>=0.7
19
21
  Requires-Dist: openpyxl>=3.1.5
20
- Requires-Dist: types-openpyxl>=3.1.5.20260402
21
- Requires-Dist: odfdo>=3.22.7
22
+ Requires-Dist: types-openpyxl>=3.1.5.20260518
23
+ Requires-Dist: odfdo>=3.22.10
22
24
  Requires-Dist: xlsxwriter>=3.2.9
23
25
  Requires-Dist: pylightxl>=1.61
24
26
  Dynamic: author
@@ -121,13 +123,13 @@ The main features are:
121
123
 
122
124
  The best way to learn to use this package is to use the provided
123
125
  example programs:
124
- [https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md).
126
+ [https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md](https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md).
125
127
 
126
128
  ## API documentation
127
129
 
128
- You can find the public API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md)
130
+ You can find the public API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md)
129
131
 
130
- You can find the protected API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md)
132
+ You can find the protected API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md)
131
133
  The protected API documentation is only for developers that want to
132
134
  extend the framework by adding their own classes as registered
133
135
  readers/writers to the factory.
@@ -137,9 +139,9 @@ a better start by reading the examples.
137
139
 
138
140
  ## Test summary
139
141
 
140
- - Test result: 1344 passed in 20s
142
+ - Test result: 1347 passed in 20s
141
143
  - No flake8 warnings.
142
144
  - No mypy errors found.
143
145
  - No python layout warnings.
144
- - Built version(s): 0.9
145
- - Build and test using Python 3.14.4
146
+ - Built version(s): 1.1
147
+ - Build and test using Python 3.14.6
@@ -29,7 +29,7 @@ formulas in the received spreadsheet).
29
29
  The tableio repo uses submodules. To clone it use the command:
30
30
 
31
31
  ````sh
32
- git clone --recurse-submodules git@bitbucket.org:tom-bjorkholm/table-io.git
32
+ git clone --recurse-submodules git@github.com:tom-bjorkholm/table-io.git
33
33
  ````
34
34
 
35
35
  If you forgot to include the `--recurse-submodules` in your `git clone` command
@@ -89,13 +89,13 @@ reports.
89
89
 
90
90
  The file `./common_build_tools/README.md` (in git submodule - see above) contains more
91
91
  information about the build system. This README can also be viewed at
92
- [https://bitbucket.org/tom-bjorkholm/common_build_tools/src/master/README.md](https://bitbucket.org/tom-bjorkholm/common_build_tools/src/master/README.md)
92
+ [https://github.com/tom-bjorkholm/common_build_tools/blob/master/README.md](https://github.com/tom-bjorkholm/common_build_tools/blob/master/README.md)
93
93
 
94
94
  ## Test summary
95
95
 
96
- - Test result: 1344 passed in 20s
96
+ - Test result: 1347 passed in 20s
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.1
101
+ - Build and test using Python 3.14.6
@@ -93,13 +93,13 @@ The main features are:
93
93
 
94
94
  The best way to learn to use this package is to use the provided
95
95
  example programs:
96
- [https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md).
96
+ [https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md](https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md).
97
97
 
98
98
  ## API documentation
99
99
 
100
- You can find the public API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md)
100
+ You can find the public API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md)
101
101
 
102
- You can find the protected API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md)
102
+ You can find the protected API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md)
103
103
  The protected API documentation is only for developers that want to
104
104
  extend the framework by adding their own classes as registered
105
105
  readers/writers to the factory.
@@ -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 20s
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.1
117
+ - Build and test using Python 3.14.6
@@ -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.1"
8
8
  authors = [
9
9
  { name="Tom Björkholm", email="klausuler_linnet0q@icloud.com" },
10
10
  ]
@@ -15,9 +15,15 @@ license = "MIT"
15
15
  license-files = ["LICENSE.txt"]
16
16
  classifiers = [
17
17
  "Programming Language :: Python :: 3",
18
- "Operating System :: OS Independent"
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ "Operating System :: OS Independent",
22
+ "Intended Audience :: Developers",
23
+ "Typing :: Typed"
19
24
  ]
20
25
  dynamic = ["dependencies"]
21
26
 
22
27
  [project.urls]
23
- "Source code" = "https://bitbucket.org/tom-bjorkholm/table-io"
28
+ "Source code" = "https://github.com/tom-bjorkholm/table-io"
29
+ "Documentation" = "https://github.com/tom-bjorkholm/table-io/blob/master/doc/"
@@ -5,7 +5,7 @@ from setuptools import setup
5
5
 
6
6
  setup(
7
7
  name='tableio',
8
- version='0.9',
8
+ version='1.1',
9
9
  description='Uniform way to write table data to and read from different ' \
10
10
  'file formats',
11
11
  author='Tom Björkholm',
@@ -14,15 +14,11 @@ setup(
14
14
  packages=['tableio'],
15
15
  package_dir={'tableio': 'src/tableio'},
16
16
  package_data={'tableio': ['src/py.typed']},
17
- install_requires=[ # pylint: disable=duplicate-code
18
- 'pip >= 26.1.1',
19
- 'setuptools >= 82.0.1',
20
- 'build >= 1.5.0',
21
- 'wheel >= 0.47.0',
22
- 'mformat-ext >= 0.6',
17
+ install_requires=[
18
+ 'mformat-ext >= 0.7',
23
19
  'openpyxl >= 3.1.5',
24
- 'types-openpyxl >= 3.1.5.20260402',
25
- 'odfdo >= 3.22.7',
20
+ 'types-openpyxl >= 3.1.5.20260518',
21
+ 'odfdo >= 3.22.10',
26
22
  'xlsxwriter >= 3.2.9',
27
23
  'pylightxl >= 1.61'
28
24
  ]
@@ -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,24 +1,26 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tableio
3
- Version: 0.9
3
+ Version: 1.1
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>
7
7
  License-Expression: MIT
8
- Project-URL: Source code, https://bitbucket.org/tom-bjorkholm/table-io
8
+ Project-URL: Source code, https://github.com/tom-bjorkholm/table-io
9
+ Project-URL: Documentation, https://github.com/tom-bjorkholm/table-io/blob/master/doc/
9
10
  Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
10
14
  Classifier: Operating System :: OS Independent
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Typing :: Typed
11
17
  Requires-Python: >=3.12
12
18
  Description-Content-Type: text/markdown
13
19
  License-File: LICENSE.txt
14
- Requires-Dist: pip>=26.1.1
15
- Requires-Dist: setuptools>=82.0.1
16
- Requires-Dist: build>=1.5.0
17
- Requires-Dist: wheel>=0.47.0
18
- Requires-Dist: mformat-ext>=0.6
20
+ Requires-Dist: mformat-ext>=0.7
19
21
  Requires-Dist: openpyxl>=3.1.5
20
- Requires-Dist: types-openpyxl>=3.1.5.20260402
21
- Requires-Dist: odfdo>=3.22.7
22
+ Requires-Dist: types-openpyxl>=3.1.5.20260518
23
+ Requires-Dist: odfdo>=3.22.10
22
24
  Requires-Dist: xlsxwriter>=3.2.9
23
25
  Requires-Dist: pylightxl>=1.61
24
26
  Dynamic: author
@@ -121,13 +123,13 @@ The main features are:
121
123
 
122
124
  The best way to learn to use this package is to use the provided
123
125
  example programs:
124
- [https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/example/src/example/README.md).
126
+ [https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md](https://github.com/tom-bjorkholm/table-io/blob/master/example/src/example/README.md).
125
127
 
126
128
  ## API documentation
127
129
 
128
- You can find the public API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/api.md)
130
+ You can find the public API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/api.md)
129
131
 
130
- You can find the protected API documentation at [https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md](https://bitbucket.org/tom-bjorkholm/table-io/src/master/doc/protected_api.md)
132
+ You can find the protected API documentation at [https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md](https://github.com/tom-bjorkholm/table-io/blob/master/doc/protected_api.md)
131
133
  The protected API documentation is only for developers that want to
132
134
  extend the framework by adding their own classes as registered
133
135
  readers/writers to the factory.
@@ -137,9 +139,9 @@ a better start by reading the examples.
137
139
 
138
140
  ## Test summary
139
141
 
140
- - Test result: 1344 passed in 20s
142
+ - Test result: 1347 passed in 20s
141
143
  - No flake8 warnings.
142
144
  - No mypy errors found.
143
145
  - No python layout warnings.
144
- - Built version(s): 0.9
145
- - Build and test using Python 3.14.4
146
+ - Built version(s): 1.1
147
+ - Build and test using Python 3.14.6
@@ -0,0 +1,6 @@
1
+ mformat-ext>=0.7
2
+ openpyxl>=3.1.5
3
+ types-openpyxl>=3.1.5.20260518
4
+ odfdo>=3.22.10
5
+ xlsxwriter>=3.2.9
6
+ pylightxl>=1.61
@@ -1,10 +0,0 @@
1
- pip>=26.1.1
2
- setuptools>=82.0.1
3
- build>=1.5.0
4
- wheel>=0.47.0
5
- mformat-ext>=0.6
6
- openpyxl>=3.1.5
7
- types-openpyxl>=3.1.5.20260402
8
- odfdo>=3.22.7
9
- xlsxwriter>=3.2.9
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