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

Add options to skip operations for RestoreLabeld Transform #8125

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

ctongh
Copy link

@ctongh ctongh commented Oct 1, 2024

Fixes #6380

Description

Four new bool parameters are added into RestoreLabeld to allow users to selectively enable or disable each restoration operation as needed, and a corresponding test case is added to verify that the function runs correctly.

This design allows users to selectively enable or disable each restoration operation as needed, providing greater flexibility.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Integration tests passed locally by running ./runtests.sh -f -u --net --coverage.
  • Quick tests passed locally by running ./runtests.sh --quick --unittests --disttests.
  • In-line docstrings updated.
  • Documentation updated, tested make html command in the docs/ folder.

ctongh and others added 2 commits October 1, 2024 16:38
Signed-off-by: Hsin Tong <zcc22592590@gmail.com>
ctongh and others added 3 commits October 2, 2024 14:40
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Hsin-Tong Hsieh <75067139+ctongh@users.noreply.github.com>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
Signed-off-by: Hsin-Tong Hsieh <75067139+ctongh@users.noreply.github.com>
Signed-off-by: Hsin-Tong Hsieh <75067139+ctongh@users.noreply.github.com>
@ctongh
Copy link
Author

ctongh commented Oct 2, 2024

Hi @ericspod , Thanks for the suggestion. I've fixed the suggestions mentioned above, and I've also standardized the parameter names to restore_resizing, restore_cropping, restore_spacing, restore_slicing, I'm not sure if that's a good setting.

Signed-off-by: Hsin Tong <zcc22592590@gmail.com>
Signed-off-by: Hsin Tong <zcc22592590@gmail.com>
@ctongh ctongh marked this pull request as ready for review October 2, 2024 09:38
Comment on lines +356 to +359
"restore_resizing": False,
"restore_cropping": False,
"restore_spacing": False,
"restore_slicing": False,
Copy link
Member

Choose a reason for hiding this comment

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

We have this test for when all the flags are false and the previous one where only one flag is false, I think we need the other three tests for when one flag at a time is false. This just ensures any future changes doesn't impact behaviour, the tests can be simple like this one if that's easier.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, after you help add these tests, I can help trigger more tests, thanks!

Copy link
Member

@ericspod ericspod left a comment

Choose a reason for hiding this comment

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

I had some minor test-related suggestions but otherwise I think this is fine. I will ask @KumoLiu to review and enable blossom as well. Thanks!

@ericspod ericspod requested a review from KumoLiu October 4, 2024 13:41
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 option to skip resizing for RestoreLabeld Transform
3 participants