Skip to content

Code refactoring: Import depth cleaning - #640

Merged
NeptuneHub merged 16 commits into
mainfrom
devel
Jun 14, 2026
Merged

Code refactoring: Import depth cleaning#640
NeptuneHub merged 16 commits into
mainfrom
devel

Conversation

@NeptuneHub

@NeptuneHub NeptuneHub commented Jun 13, 2026

Copy link
Copy Markdown
Owner

This PR is a code refactoring to improve code maintainability by:

  • cleaning unused function or replicated;
  • Avoid when possible hight depth import

PR test builds:

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the import architecture and AI provider integrations. Specifically, it flattens the eager import graph in app.py by moving blueprint imports and registrations into a local _register_blueprints function. Additionally, it consolidates the Ollama provider transport into the OpenAI-compatible transport (tasks/ai/providers/openai.py), removing the standalone ollama.py file and updating the corresponding unit tests and import architecture checks. Feedback on these changes includes a recommendation to defensively check that the Ollama tool call arguments are a dictionary to prevent potential AttributeError crashes, and a suggestion to move the module-level import of run_due_cron_jobs in app.py to a local scope to fully flatten the eager import graph.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread tasks/ai/providers/openai.py
Comment thread app.py Outdated
Comment thread database.py Fixed
Comment thread database.py Dismissed
Comment thread tasks/ai/tool_impl.py Dismissed
Comment thread tasks/ai/tool_impl.py Dismissed
@NeptuneHub
NeptuneHub merged commit d7ff540 into main Jun 14, 2026
5 of 12 checks passed
@NeptuneHub
NeptuneHub deleted the devel branch June 14, 2026 14:47
@sonarqubecloud

Copy link
Copy Markdown

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