-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: refatoring updating image_request.py and updating tests #108
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
jtblack-aws
reviewed
Oct 28, 2024
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.
Commit should be refactor:
instead of chore:
to be consistent with conventional commits.
1bde467
to
6ff3a9d
Compare
6ff3a9d
to
315181d
Compare
jtblack-aws
approved these changes
Oct 30, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: n/a
Notes
This PR introduces several improvements to the
ImageRequest
class, focusing on enhanced initialization, validation, and backward compatibility, along with updated unit tests to ensure robust functionality.Key Changes:
Initialization Improvements:
post_processing
) are only applied when attributes are not explicitly set.outputBucket
andoutputPrefix
to ensure backward compatibility foroutputs
initialization.Refactoring and Cleaner Structure:
_parse_outputs
,_parse_post_processing
) to improve readability and maintainability.from_external_message
method to correctly handle both modern and legacy input formats, ensuring reliable parsing of attributes.Enhanced Validation Logic:
is_valid()
method to check for validSinkType
values inoutputs
, ensuring that only recognized sink types (e.g.,S3
,KINESIS
) are allowed. This prevents configuration errors.Updated and Expanded Unit Tests:
outputBucket
andoutputPrefix
are used instead of modernoutputs
fields.None
values and verifying correct application of defaults.Checklist
Before you submit a pull request, please make sure you have the following:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.