Skip to content

Add validation for resize config in get_transform#1365

Open
Pritika2512 wants to merge 2 commits into
weecology:mainfrom
Pritika2512:validate-resize-config
Open

Add validation for resize config in get_transform#1365
Pritika2512 wants to merge 2 commits into
weecology:mainfrom
Pritika2512:validate-resize-config

Conversation

@Pritika2512
Copy link
Copy Markdown

Description

Adds validation for the resize configuration in get_transform() to ensure it is a list or tuple of length 2.

Changes

  • Added input validation for resize parameter
  • Raises clear error if invalid format is provided

Why this change?

Without validation, incorrect resize values could lead to runtime errors or unexpected behavior. This improves robustness and debugging.

Impact

  • Improves reliability
  • Prevents silent bugs
  • No breaking changes

Copy link
Copy Markdown
Member

@ethanwhite ethanwhite left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution @Pritika2512 and apologies for taking a while to get to it. This looks good, but I have two small requested changes:

  1. Remove the extra changes to the expand_bbox_to_square definition. Those changes are fine but they would belong in a separate PR.
  2. Rebase the PR into a single commit.

Once those are done I think this is good to merge.

@ethanwhite ethanwhite added the Awaiting author contribution Waiting on the issue author to do something before proceeding label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting author contribution Waiting on the issue author to do something before proceeding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants