-
Notifications
You must be signed in to change notification settings - Fork 236
Suggest using uv pip install to get missing module #1532
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
Conversation
Signed-off-by: Daniel J Walsh <[email protected]>
Important Installation incomplete: to start using Gemini Code Assist, please ask the organization owner(s) to visit the Gemini Code Assist Admin Console and sign the Terms of Services. |
Reviewer's GuideThe PR updates both the Huggingface and ModelScope integrations by enhancing the missing-module installation guidance to include “uv pip install” and refactoring error raising to use a centralized get_missing_message() method instead of static strings. Sequence Diagram: Error Handling for Missing CLI ToolssequenceDiagram
actor User
participant Handler as ModuleHandler
participant Self as self (ModuleHandler instance)
User->>Handler: push(args)
Handler->>Handler: Check if CLI tool is available
alt CLI tool not available
Handler->>Self: get_missing_message()
Self-->>Handler: error_message (with "uv pip install")
Handler-->>User: raise NotImplementedError(error_message)
else CLI tool available
Handler->>Handler: Proceed with push operation
Handler-->>User: Push successful / other result
end
Class Diagram: Updates to Module HandlersclassDiagram
class HuggingfaceHandler {
+push(self, _, args)
+get_missing_message(self) : string
}
class ModelscopeHandler {
+push(self, _, args)
+get_missing_message(self) : string
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @rhatdan - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `ramalama/huggingface.py:18` </location>
<code_context>
missing_huggingface = """
Optional: Huggingface models require the huggingface-cli module.
-These modules can be installed via PyPi tools like pip, pip3, pipx, or via
+This module can be installed via PyPi tools like uv, pip, pip3, pipx, or via
distribution package managers like dnf or apt. Example:
-pip install huggingface_hub
+uv pip install huggingface_hub
"""
</code_context>
<issue_to_address>
Remove or clarify the 'uv' prefix around pip commands
The 'uv' prefix may confuse users unless it's intentional. Please use 'pip install huggingface_hub' or explain what 'uv' refers to if it's required.
</issue_to_address>
### Comment 2
<location> `ramalama/modelscope.py:15` </location>
<code_context>
missing_huggingface = """
Optional: Huggingface models require the huggingface-cli module.
-These modules can be installed via PyPi tools like pip, pip3, pipx, or via
+This module can be installed via PyPi tools like uv, pip, pip3, pipx, or via
distribution package managers like dnf or apt. Example:
-pip install huggingface_hub
</code_context>
<issue_to_address>
Remove or clarify the 'uv' prefix around pip commands
The 'uv' prefix may confuse users if not explained. Use 'pip install modelscope' or clarify what 'uv' refers to if it's intentional.
</issue_to_address>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This module can be installed via PyPi tools like uv, pip, pip3, pipx, or via | ||
distribution package managers like dnf or apt. Example: | ||
pip install huggingface_hub | ||
uv pip install huggingface_hub |
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.
issue: Remove or clarify the 'uv' prefix around pip commands
The 'uv' prefix may confuse users unless it's intentional. Please use 'pip install huggingface_hub' or explain what 'uv' refers to if it's required.
This module can be installed via PyPi tools like uv, pip, pip3, pipx, or via | ||
distribution package managers like dnf or apt. Example: | ||
pip install modelscope | ||
uv pip install modelscope |
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.
issue: Remove or clarify the 'uv' prefix around pip commands
The 'uv' prefix may confuse users if not explained. Use 'pip install modelscope' or clarify what 'uv' refers to if it's intentional.
@ericcurtin PTAL |
Summary by Sourcery
Update missing dependency error messages for Huggingface and ModelScope integrations and refactor exception handling to use a dynamic message method.
Enhancements: