You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(database): address all 16 review comments from PR #20
Addresses all feedback from Gemini Code Assist code review:
**Critical/High Priority:**
- Add missing text import in test_session.py (NameError fix)
- Remove load_dotenv() from session.py (better architecture)
Environment should be loaded at application entry point
- Move uuid import to top of file (PEP 8)
**Exception Handling:**
- Use specific OperationalError instead of generic Exception
- Add logging to check_database_health() for debugging
- Improve test_get_db_session_always_closes to verify close() is called
**Documentation:**
- Fix connect_with_retry docstring (accurate wait times: 1s, 2s)
- Fix __init__.py docstring example (correct import path and User import)
**API Design:**
- Remove _import_models from public API (__all__)
- Sort __all__ alphabetically for maintainability
**Code Quality:**
- Extract embedding dimension to named constant (EMBEDDING_DIMENSION = 1536)
- Use constant in Item model, seed_data.py, and tests
- Remove sys.path manipulation from seed_data.py
- Remove redundant test (test_seed_data_handles_errors_gracefully)
**Testing:**
- 73 tests passing (removed 1 redundant test)
- All quality checks passing (ruff, pyright)
- Seed script verified working
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
0 commit comments