Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Fix conditional fall-through in SOMAObject.open #3446

Merged
merged 4 commits into from
Dec 17, 2024

Conversation

nguyenv
Copy link
Member

@nguyenv nguyenv commented Dec 15, 2024

Issue and/or context:

As reported internally, the pybind11 implemented SOMAObject.open contains a conditional fall-through as of #3402.

Changes:

Wrap the C++ call in try-catch block where SOMAObject::open should already throw an exception for unknown types. In the Pybind11 code, if the conditional falls through then trigger an assert for unreachable code.

Copy link

codecov bot commented Dec 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.29%. Comparing base (8eed6dc) to head (87f4227).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3446      +/-   ##
==========================================
+ Coverage   86.22%   86.29%   +0.06%     
==========================================
  Files          55       55              
  Lines        6295     6305      +10     
==========================================
+ Hits         5428     5441      +13     
+ Misses        867      864       -3     
Flag Coverage Δ
python 86.29% <ø> (+0.06%) ⬆️

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

Components Coverage Δ
python_api 86.29% <ø> (+0.06%) ⬆️
libtiledbsoma ∅ <ø> (∅)

@nguyenv nguyenv requested a review from bkmartinjr December 16, 2024 03:04
@johnkerl johnkerl self-requested a review December 16, 2024 16:25
@nguyenv nguyenv merged commit 3283bb3 into main Dec 17, 2024
12 checks passed
@nguyenv nguyenv deleted the fix-void-return-in-open-factory branch December 17, 2024 00:35
johnkerl pushed a commit that referenced this pull request Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants