Repository navigation
fix: Make optional dependencies gracefully optional for tests - #11
Merged
Merged
Conversation
🔧 DEPENDENCY FIX: Optional imports for Redis and Schedule - Made redis import optional in CacheService with graceful fallback - Made schedule import optional in BackupService with graceful fallback - Added REDIS_AVAILABLE and SCHEDULE_AVAILABLE flags - Local cache fallback when Redis not available - Automatic backup disabled when schedule not available ✅ TEST COMPATIBILITY: - Resolves ModuleNotFoundError: No module named 'redis' - Resolves ModuleNotFoundError: No module named 'schedule' - All 72 tests can now be collected without import errors - CI/CD unit tests will now pass collection phase �� REQUIREMENTS UPDATES: - Added redis>=4.5.0 as commented optional dependency - Added schedule>=1.2.0 as commented optional dependency - Clear documentation for optional features 🎯 BENEFITS: - Core functionality works without optional dependencies - Enhanced features available when dependencies installed - Better CI/CD compatibility - Cleaner development environment setup The system now gracefully degrades when optional dependencies are not available, ensuring tests can run in minimal environments.
This file contains hidden or 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
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.
🔧 DEPENDENCY FIX: Optional imports for Redis and Schedule
✅ TEST COMPATIBILITY:
�� REQUIREMENTS UPDATES:
🎯 BENEFITS:
The system now gracefully degrades when optional dependencies are not available, ensuring tests can run in minimal environments.