Skip to content

[python] import time check of expected TileDB version#4126

Merged
bkmartinjr merged 6 commits intomainfrom
bkm/soma-267-version-check
Jun 17, 2025
Merged

[python] import time check of expected TileDB version#4126
bkmartinjr merged 6 commits intomainfrom
bkm/soma-267-version-check

Conversation

@bkmartinjr
Copy link
Copy Markdown
Member

@bkmartinjr bkmartinjr commented Jun 17, 2025

There have been several examples where users end up with corrupted conda environments, manifesting as strange and difficult to diagnose errors. Root cause in at least one is a mismatch between the build-time and run-time TileDB version. This is an attempt to provide some detection and warning of this condition.

Changes:

  1. Add C++ API to report the TileDB version that the Python pybind11 module was built against ("expected" TileDB version)
  2. Add package import-time check to validate that our build-time and run-time TileDB versions match. A RuntimeError (exception) is raised upon mismatch.
  3. Tests

Fixes SOMA-267

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 17, 2025

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 53.86%. Comparing base (2c6767c) to head (55611c9).
Report is 3 commits behind head on main.

❗ There is a different number of reports uploaded between BASE (2c6767c) and HEAD (55611c9). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (2c6767c) HEAD (55611c9)
python 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #4126       +/-   ##
===========================================
- Coverage   65.89%   53.86%   -12.04%     
===========================================
  Files         158       99       -59     
  Lines       20992    13892     -7100     
  Branches     1237     1237               
===========================================
- Hits        13833     7483     -6350     
+ Misses       6746     5996      -750     
  Partials      413      413               
Flag Coverage Δ
libtiledbsoma 53.86% <0.00%> (-0.02%) ⬇️
python ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api ∅ <ø> (∅)
libtiledbsoma 44.36% <0.00%> (-0.03%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread apis/python/src/tiledbsoma/_general_utilities.py Outdated
@bkmartinjr bkmartinjr marked this pull request as ready for review June 17, 2025 17:44
Copy link
Copy Markdown
Collaborator

@jp-dark jp-dark left a comment

Choose a reason for hiding this comment

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

Looks good other than one grammar nit. Thanks!

Comment thread apis/python/HISTORY.md Outdated
@bkmartinjr bkmartinjr merged commit e5c267a into main Jun 17, 2025
41 of 43 checks passed
@bkmartinjr bkmartinjr deleted the bkm/soma-267-version-check branch June 17, 2025 20:35
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.

4 participants