-
Notifications
You must be signed in to change notification settings - Fork 57
[python] more ImageConverter bindings #223
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Anton Dukhovnikov <antond@wetafx.co.nz>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #223 +/- ##
==========================================
+ Coverage 82.70% 83.31% +0.60%
==========================================
Files 11 11
Lines 2151 2151
Branches 327 327
==========================================
+ Hits 1779 1792 +13
+ Misses 372 359 -13 see 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| return result; | ||
| }, | ||
| []( ImageConverter::Settings &settings, const std::vector<int> &box ) { | ||
| if ( box.size() == 4 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens if user doesn't provide array of 4?
| assert abs(wb[3] - 0) < 0.0001 | ||
|
|
||
| print("get_IDT_matrix", converter.get_IDT_matrix()) | ||
| print("get_CAT_matrix", converter.get_CAT_matrix()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these meant to stay?
| except Exception: | ||
| pytest.fail(Exception) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be:
except Exception as e:
pytest.fail(f"Unexpected exception: {e}")
?
Description
This contains the python bindings for the rest of the ImageConverter functionality, except of the ones requiring OIIO objects.
OIIO doesn't currently have nanobind bindings, we'll add those after OIIO switches from pybind to nanobind.
Tests
There are unit tests for all added bindings.
Checklist:
need to update the documentation, for example if this is a bug fix that
doesn't change the API.)
(adding new test cases if necessary).
already run clang-format before submitting, I definitely will look at the CI
test that runs clang-format and fix anything that it highlights as being
nonconforming.