-
-
Notifications
You must be signed in to change notification settings - Fork 46.2k
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
test_digital_image_processing -> test_local_binary_pattern replacing a large image with a smaller one #10161
Conversation
It would be helpful if this pull request provided before and after times. |
@@ -96,7 +96,7 @@ def test_nearest_neighbour( | |||
|
|||
|
|||
def test_local_binary_pattern(): | |||
file_path = "digital_image_processing/image_data/lena.jpg" | |||
file_path = "digital_image_processing/image_data/lena_small.jpg" |
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.
Let's use https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
file_path = "digital_image_processing/image_data/lena_small.jpg" | |
from os import getenv # Speed up our Continuous Integration tests | |
file_name = "lena_small.jpg" if getenv("CI") else "lena.jpg" | |
file_path = f"digital_image_processing/image_data/{file_name}.jpg" |
Co-authored-by: Christian Clauss <cclauss@me.com>
for more information, see https://pre-commit.ci
tests fail, I'll try an empty commit
|
||
# Reading the image and converting it to grayscale. | ||
file_name = "lena_small.jpg" if getenv("CI") else "lena.jpg" | ||
file_path = f"digital_image_processing/image_data/{file_name}.jpg" |
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.
file_path = f"digital_image_processing/image_data/{file_name}.jpg" | |
file_path = f"digital_image_processing/image_data/{file_name}" |
The build is failing because your filepath is "lena.jpg.jpg"
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.
My mistake. :-(
added clarifications
for more information, see https://pre-commit.ci
@cclauss also added comments to the function itself: test_local_binary_pattern, indicating the pull request number and the values before and after. |
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.
Nice!
Contributes to #9718 (adding for linking purposes) |
…a large image with a smaller one (TheAlgorithms#10161) * Replacing the generator with numpy vector operations from lu_decomposition. * Revert "Replacing the generator with numpy vector operations from lu_decomposition." This reverts commit ad217c6. * Replaced lena.jpg with lena_small.jpg to make tests faster. * Update digital_image_processing/test_digital_image_processing.py Co-authored-by: Christian Clauss <cclauss@me.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_digital_image_processing.py tests fail, I'll try an empty commit * Apply suggestions from code review * Update test_digital_image_processing.py added clarifications * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update test_digital_image_processing.py --------- Co-authored-by: Christian Clauss <cclauss@me.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
Describe your change:
Replaced lena.jpg with lena_small.jpg to make tests faster.
pull request 10161 before:
file_path = "digital_image_processing/image_data/lena.jpg"
after:
file_path = "digital_image_processing/image_data/lena_small.jpg"
Checklist: