Skip to content

Conversation

@soswow
Copy link
Contributor

@soswow soswow commented Oct 19, 2025

Description

Adding more tests

Checklist:

  • [x 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: Aleksandr Motsjonov <soswow@gmail.com>
Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
target_compile_options ( nanobind-static PRIVATE -Wno-error=zero-length-array )
target_compile_options ( rawtoaces_bindings PRIVATE -Wno-error=zero-length-array )
target_compile_options ( nanobind-static PRIVATE -Wno-error=zero-length-array -Wno-zero-length-array )
target_compile_options ( rawtoaces_bindings PRIVATE -Wno-error=zero-length-array -Wno-zero-length-array )
Copy link
Contributor Author

Choose a reason for hiding this comment

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

without this it was giving bunch of warning for stuff coming from python binding library headers

Copy link
Contributor

Choose a reason for hiding this comment

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

could you try if suppressing the warnings locally around the nanobind includes in rawtoaces_bindings would work?

{
std::cerr << "ERROR: camera needs to be initialised prior to calling "
<< "SpectralSolver::calculate_WB()" << std::endl;
// TODO: Should here be return false?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@antond-weta is that on purpose? If not, I'll make a change. All other similar places (There are two more we return false)

Copy link
Contributor

Choose a reason for hiding this comment

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

not on purpose, please fix. thanks.


if ( !success )
{
// TODO: Potentially remove, since this code path is not reachable due to camera lookup success in the previous step.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

calling @antond-weta to decide if I understand that right

Copy link
Contributor

Choose a reason for hiding this comment

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

please replace with assert(success);

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.03%. Comparing base (82dba85) to head (8eb7656).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #212      +/-   ##
==========================================
+ Coverage   72.30%   80.03%   +7.73%     
==========================================
  Files          10       10              
  Lines        2354     2354              
  Branches      311      311              
==========================================
+ Hits         1702     1884     +182     
+ Misses        652      470     -182     
Files with missing lines Coverage Δ
src/rawtoaces_core/rawtoaces_core.cpp 88.38% <ø> (+2.25%) ⬆️
src/rawtoaces_util/image_converter.cpp 69.12% <ø> (+15.12%) ⬆️

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 82dba85...8eb7656. Read the comment docs.

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

}

/// Tests that prepare_transform_spectral fails when no camera manufacturer information is available (should fail)
void test_missing_camera_manufacturer()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not able to change .dng we have such that it has no make 🤷 no matter what I did with exiftools, new .dng always has "DNG" as a make. Hence I couldn't make this test go through main gate like other ones.

Signed-off-by: Aleksandr Motsjonov <soswow@gmail.com>
Copy link
Contributor

@antond-weta antond-weta 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

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