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

refactor: implement ImageRequestHandler class #102

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

drduhe
Copy link
Collaborator

@drduhe drduhe commented Oct 14, 2024

Issue #, if available: n/a

Notes

This PR introduces refactoring of the ImageRequestHandler class to decouple region processing logic from ModelRunner. The ImageRequestHandler now makes it the image processing logic self-contained, modular, and easier to test. Additionally, changes to the ModelRunner class were made to initialize this handler with the appropriate dependencies. Methods were refined in the ImageRequestHandler class to make them more compact and testable.

Unit tests were updated to split out region processing testing associated with the new class.

Additional method was added to the JobItem dataclass which allows conversion to from an ImageRequest to a JobItem.

Checklist

Before you submit a pull request, please make sure you have the following:

  • Code changes are compact and well-structured to facilitate easy review
  • Changes are documented in the README.md and other relevant documentation pages
  • PR title and description accurately reflect the changes and are detailed enough for historical tracking
  • PR contains tests that cover all new code and the code has been manual tested
  • All new dependencies are declared (if any), and no unnecessary libraries are added
  • Performance impacts (if any) of the changes are evaluated and documented
  • Security implications of the changes (if any) are reviewed and addressed
  • I have read the Contributing Guidelines and agree to follow the Code of Conduct

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@drduhe drduhe force-pushed the refactor/implement-image-request-handler branch 2 times, most recently from 979047d to 6a9de28 Compare October 14, 2024 19:18
@drduhe drduhe changed the title refactor: implement RegionRequestHandler class to break logic from ap… refactor: implement RegionRequestHandler class Oct 14, 2024
@drduhe drduhe force-pushed the refactor/implement-image-request-handler branch from 6a9de28 to 859426a Compare October 15, 2024 00:52
@drduhe drduhe force-pushed the refactor/implement-image-request-handler branch from 859426a to d110375 Compare October 15, 2024 16:31
@drduhe drduhe changed the title refactor: implement RegionRequestHandler class refactor: implement ImageRequestHandler class Oct 15, 2024
@drduhe drduhe merged commit ee271e7 into main Oct 15, 2024
2 checks passed
@drduhe drduhe deleted the refactor/implement-image-request-handler branch October 15, 2024 17:02
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.

2 participants