Skip to content

Conversation

@antond-weta
Copy link
Contributor

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:

  • I have read the contribution guidelines.
  • I have updated the documentation, if applicable. (Check if there is no
    need to update the documentation, for example if this is a bug fix that
    doesn't change the API.)
  • I have ensured that the change is tested somewhere in the testsuite
    (adding new test cases if necessary).
  • My code follows the prevailing code style of this project. If I haven't
    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.

Signed-off-by: Anton Dukhovnikov <antond@wetafx.co.nz>
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.31%. Comparing base (84658cd) to head (088cfd3).

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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84658cd...088cfd3. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

return result;
},
[]( ImageConverter::Settings &settings, const std::vector<int> &box ) {
if ( box.size() == 4 )
Copy link
Contributor

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())
Copy link
Contributor

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?

Comment on lines +176 to +177
except Exception:
pytest.fail(Exception)
Copy link
Contributor

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}")

?

@antond-weta antond-weta marked this pull request as draft December 12, 2025 04:28
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.

3 participants