-
Couldn't load subscription status.
- Fork 56
Add more unit tests #212
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?
Add more unit tests #212
Conversation
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 ) |
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.
without this it was giving bunch of warning for stuff coming from python binding library headers
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.
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? |
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.
@antond-weta is that on purpose? If not, I'll make a change. All other similar places (There are two more we return false)
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.
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. |
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.
calling @antond-weta to decide if I understand that right
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.
please replace with assert(success);
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| } | ||
|
|
||
| /// Tests that prepare_transform_spectral fails when no camera manufacturer information is available (should fail) | ||
| void test_missing_camera_manufacturer() |
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.
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>
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.
looks good
Description
Adding more tests
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.