Skip to content

Constrain automatic row range to table limit#44

Merged
sbesson merged 1 commit intoglencoesoftware:mainfrom
DavidStirling:ranging
Jan 7, 2026
Merged

Constrain automatic row range to table limit#44
sbesson merged 1 commit intoglencoesoftware:mainfrom
DavidStirling:ranging

Conversation

@DavidStirling
Copy link
Contributor

Fixes #43

Should address the API inconsistency between PyTables and TileDB backed tables.

Testing

Read/download a whole TileDB table with a chunk size which would result in the last chunk needing to be truncated. Without PR this should throw, with PR it should work.

Copy link
Contributor

@mabruce mabruce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this PR, both read_table and download_table throw omero.ApiUsageException for TileDB-backed tables as seen in the linked issue.

With this PR, both functions work with both TileDB and PyTables table types.

>>> omero2pandas.download_table("test1.csv", file_id=5933, omero_connector=connector)
Downloading table from OMERO: 100%|██████████████████████████████████████████████████████████████████████████████| 18477/18477 rows, 00:08
>>> omero2pandas.download_table("test2.csv", file_id=5859, omero_connector=connector)
Downloading table from OMERO: 100%|██████████████████████████████████████████████████████████████████████████████| 18477/18477 rows, 00:04
>>> omero2pandas.read_table(file_id=5933, omero_connector=connector)
Downloading table from OMERO: 100%|██████████████████████████████████████████████████████████████████████████████| 18477/18477 rows, 00:05
       object                                    id  Nucleus__Area  Nucleus__Perimeter  ...  bbox_min_x  bbox_min_y  bbox_max_x  bbox_max_y
0           1  45fd47cc-7882-465d-b606-78c87953c223           8.75           10.823806  ...      1794.0      1748.0      1806.0      1759.0
1           2  db75ae0e-e229-48c8-b7ee-c6dfa113acfd          14.50           15.924452  ...      2391.0      1876.0      2403.0      1894.0
2           3  b8ce84ae-01c5-4821-8b23-ae52f02d2c1b          19.00           17.303268  ...      2394.0      1896.0      2409.0      1914.0
3           4  a73cb71a-3f32-4bf1-88b4-dd05e0a4c596          19.00           22.310303  ...      2841.0      1937.0      2869.0      1953.0
4           5  4e5d039c-6c75-4526-b151-e6b120b0157e          12.50           14.829144  ...      2769.0      1979.0      2787.0      1991.0
...       ...                                   ...            ...                 ...  ...         ...         ...         ...         ...
18472   18473  2488dcca-aa73-41d5-ad59-aa763610e6ae          13.00           13.462880  ...      5624.0      4216.0      5641.0      4226.0
18473   18474  0809ccfe-f417-46b9-b52b-eb30b3b49898          24.50           20.229256  ...      5545.0      4226.0      5567.0      4244.0
18474   18475  1621af91-478f-466f-8c2f-32eeebd47538          17.25           18.287930  ...      5475.0      4237.0      5497.0      4249.0
18475   18476  e9192975-c1aa-46e4-a100-fc0d46e733aa          26.25           20.972122  ...      5512.0      4258.0      5535.0      4278.0
18476   18477  0c98eed2-2df9-48ec-97d9-9a3b8387581c          15.00           13.957096  ...      5484.0      4281.0      5498.0      4295.0

[18477 rows x 76 columns]
>>> omero2pandas.read_table(file_id=5859, omero_connector=connector)
Downloading table from OMERO: 100%|██████████████████████████████████████████████████████████████████████████████| 18477/18477 rows, 00:01
       object                                    id  Nucleus__Area  Nucleus__Perimeter  ...  bbox_min_x  bbox_min_y  bbox_max_x  bbox_max_y
0           1  45fd47cc-7882-465d-b606-78c87953c223           8.75           10.823806  ...      1794.0      1748.0      1806.0      1759.0
1           2  db75ae0e-e229-48c8-b7ee-c6dfa113acfd          14.50           15.924452  ...      2391.0      1876.0      2403.0      1894.0
2           3  b8ce84ae-01c5-4821-8b23-ae52f02d2c1b          19.00           17.303268  ...      2394.0      1896.0      2409.0      1914.0
3           4  a73cb71a-3f32-4bf1-88b4-dd05e0a4c596          19.00           22.310303  ...      2841.0      1937.0      2869.0      1953.0
4           5  4e5d039c-6c75-4526-b151-e6b120b0157e          12.50           14.829144  ...      2769.0      1979.0      2787.0      1991.0
...       ...                                   ...            ...                 ...  ...         ...         ...         ...         ...
18472   18473  2488dcca-aa73-41d5-ad59-aa763610e6ae          13.00           13.462880  ...      5624.0      4216.0      5641.0      4226.0
18473   18474  0809ccfe-f417-46b9-b52b-eb30b3b49898          24.50           20.229256  ...      5545.0      4226.0      5567.0      4244.0
18474   18475  1621af91-478f-466f-8c2f-32eeebd47538          17.25           18.287930  ...      5475.0      4237.0      5497.0      4249.0
18475   18476  e9192975-c1aa-46e4-a100-fc0d46e733aa          26.25           20.972122  ...      5512.0      4258.0      5535.0      4278.0
18476   18477  0c98eed2-2df9-48ec-97d9-9a3b8387581c          15.00           13.957096  ...      5484.0      4281.0      5498.0      4295.0

[18477 rows x 76 columns]

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposing to cut a 0.4.1 patch release

@sbesson sbesson merged commit 4a186af into glencoesoftware:main Jan 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Constrain row requests to maximum range

3 participants