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

rename parameters in add_images_weighted #376

Merged
merged 18 commits into from
Oct 17, 2024
Merged

rename parameters in add_images_weighted #376

merged 18 commits into from
Oct 17, 2024

Conversation

haesleinhuepf
Copy link
Member

@haesleinhuepf haesleinhuepf commented Oct 17, 2024

Here I'm renaming numeric parameters of some functions to improve backwards-compatibility with the prototype

closes #369
partially solves clEsperanto/pyclesperanto#260

@codecov-commenter
Copy link

codecov-commenter commented Oct 17, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 27.50000% with 29 lines in your changes missing coverage. Please review.

Project coverage is 48.36%. Comparing base (d61a5a0) to head (1750e2d).

Files with missing lines Patch % Lines
clic/src/tier3/histogram.cpp 30.76% 0 Missing and 9 partials ⚠️
clic/src/tier1/paste.cpp 0.00% 0 Missing and 6 partials ⚠️
clic/src/tier1/replace_values.cpp 0.00% 1 Missing and 3 partials ⚠️
clic/src/tier4/filter_label_by_values.cpp 0.00% 2 Missing ⚠️
clic/src/tier1/add_images_weighted.cpp 0.00% 0 Missing and 1 partial ⚠️
clic/src/tier1/copy_horizontal_slice.cpp 50.00% 0 Missing and 1 partial ⚠️
clic/src/tier1/copy_slice.cpp 50.00% 0 Missing and 1 partial ⚠️
clic/src/tier1/copy_vertical_slice.cpp 50.00% 0 Missing and 1 partial ⚠️
clic/src/tier1/set_column.cpp 50.00% 0 Missing and 1 partial ⚠️
clic/src/tier1/set_plane.cpp 50.00% 0 Missing and 1 partial ⚠️
... and 2 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #376      +/-   ##
==========================================
- Coverage   48.44%   48.36%   -0.09%     
==========================================
  Files         243      243              
  Lines        3965     3974       +9     
  Branches     1809     1818       +9     
==========================================
+ Hits         1921     1922       +1     
  Misses        619      619              
- Partials     1425     1433       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@StRigaud
Copy link
Member

Sorry in advance for the pre-commit thing 😅

@haesleinhuepf
Copy link
Member Author

@StRigaud This is ready for review. Feel free to merge if it's ok!

Comment on lines 47 to +51
const Array::Pointer & src0,
const Array::Pointer & src1,
Array::Pointer dst,
float factor0,
float factor1) -> Array::Pointer;
float factor1,
float factor2) -> Array::Pointer;
Copy link
Member

Choose a reason for hiding this comment

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

I know it is to fit the prototype but the input index being 0 and 1, and the factor index being 1 and 2 triggers my OCD.

Wouldn't we want to also use this effort to correct possible wrong doing in the API developpment during the prototype ( i know I am annoying 😉 )

Copy link
Member Author

Choose a reason for hiding this comment

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

That's why it should also be input_image1 and input_image2, everywhere

Copy link
Member Author

Choose a reason for hiding this comment

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

The documentation is also commonly "First image to process"

Comment on lines 13 to +17
const Array::Pointer & src0,
const Array::Pointer & src1,
Array::Pointer dst,
float factor0,
float factor1) -> Array::Pointer
float factor1,
float factor2) -> Array::Pointer
Copy link
Member

Choose a reason for hiding this comment

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

same as first comment

@StRigaud
Copy link
Member

This will require to update some of the tests in pyclesperanto because of the parameter name change but otherwise, should be ok.

Just the factor indexing that annoys me a bit... the rest i can live with it 🙃

@StRigaud StRigaud merged commit a599c24 into master Oct 17, 2024
5 checks passed
@StRigaud StRigaud deleted the rename_parameters branch October 18, 2024 08:37
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.

Add back _index names to functions
3 participants