-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: Image utils optional dependency errors and unblock unit tests on minimal env #5808
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
base: master
Are you sure you want to change the base?
Conversation
017a91a to
fc9bb71
Compare
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.
Pull request overview
This PR fixes error handling in feast.image_utils when optional image dependencies are missing and enables unit tests to run in minimal environments without integration dependencies.
- Adds
_check_image_dependencies()calls tovalidate_image_formatandget_image_metadatato raise clearImportErrorwhen image dependencies are missing - Adds unit tests to verify optional dependency handling
- Updates test infrastructure to support running unit tests without optional integration/auth dependencies
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/python/feast/image_utils.py | Added dependency checks to image validation and metadata extraction functions |
| sdk/python/tests/unit/test_image_utils_optional_deps.py | New unit tests verifying ImportError behavior when image dependencies are unavailable |
| sdk/python/tests/conftest.py | Wrapped integration and auth test imports in try-except blocks to allow conftest loading without optional dependencies; fixed Windows platform detection |
| sdk/python/pytest.ini | Removed deprecated pytest configuration for pytest 8 compatibility |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
35db3ae to
d8fd430
Compare
Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com> Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com> Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
…s.py Signed-off-by: Lanre Shittu <136805224+Shizoqua@users.noreply.github.com> Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
bdd4b82 to
2b2a4f2
Compare
Signed-off-by: Shizoqua <hr.lanreshittu@yahoo.com>
|
Good day @franciscojavierarceo |
Summary
This PR fixes behavior in
feast.image_utilswhen optional image dependencies are not installed, and adds unit tests to cover the expected failure mode.While validating the fix locally, I also addressed a few test-harness issues that prevented running unit tests in a minimal environment (without integration/auth optional deps).
Changes
ImportErrorwhenfeast[image]deps are missing (instead of failing with aNameErrordue to missingPIL.Image).env=config that requires extra plugins.sys.platformiswin32, notwindows).Why
feast[image]dependencies are not installed.Test Plan
python -m pytest -q tests/unit/test_image_utils_optional_deps.py