🧹 remove duplicate _apply_prefix and _determine_ruri_prefix functions - #87
Conversation
Import _apply_prefix and _determine_ruri_prefix in app.main from app.services.embedding instead of defining redundant duplicates. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: Removed duplicate implementations of
_apply_prefixand_determine_ruri_prefixinsrc/app/main.pyby re-exporting them fromsrc/app/services/embedding.py.💡 Why: Having duplicate helper function implementations in
main.pyandservices/embedding.pyincreased maintenance overhead and potential risk of logic divergence. Re-exporting from the canonical implementation inservices/embedding.pymaintains backwards compatibility for unit tests while eliminating duplicate code.✅ Verification:
uv run ruff check src/anduv run ruff format --check src/to confirm code style and lint compliance.uv run pytest, verifying that all 149 unit and integration tests passed.✨ Result: Reduced code duplication in
src/app/main.pyand consolidated prefix handling logic intosrc/app/services/embedding.py.PR created automatically by Jules for task 320161055953050528 started by @chottokun