-
Notifications
You must be signed in to change notification settings - Fork 0
M3: Update CI to use uv for dependency management #31
Conversation
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.
Hello @ipv1337, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request focuses on migrating the project's dependency management from pip to uv. This change impacts the CI workflow, local coverage check script, pre-commit setup, and documentation. The primary goal is to leverage uv for faster and more efficient dependency resolution and installation.
Highlights
- CI Workflow Update: The CI workflow configuration file (
.github/workflows/python-ci.yml) is updated to useuvfor installing dependencies instead ofpip. - Local Coverage Script Update: The
run_coverage_local.shscript is modified to useuvfor installing thetomlpackage, if it's not already available. - Documentation Updates: The
README.mdanddocs/install.mdfiles are updated to reflect the recommended usage ofuvfor installing the project and its dependencies, including instructions for installing from PyPI and from source. - Pre-commit Hook Setup: The
setup_pre_commit.shscript is updated to useuvfor installing and upgradingpre-commit. - Test Updates: The test file
tests/models/test_gemini.pywas updated to adjust assertions and mock objects to better reflect the expected behavior of the Gemini model during testing.
Changelog
Click here to see the changelog
- README.md
- Updated installation instructions to use
uvinstead ofpipfor installing the package from PyPI. - Updated installation instructions to use
uvinstead ofpipfor installing the package from source, including instructions for creating a virtual environment and installing development dependencies.
- Updated installation instructions to use
- docs/install.md
- Updated installation instructions to use
uvinstead ofpipfor installing the package from PyPI. - Updated installation instructions to use
uvinstead ofpipfor installing the package from source, including instructions for creating a virtual environment and installing development dependencies. - Corrected a typo in the configuration example, changing
YOUR_GEMINI_API_KEY_HEREtoYOUR_GEMINI_API_KEY.
- Updated installation instructions to use
- scripts/run_coverage_local.sh
- Modified the script to use
uvinstead ofpipfor installing thetomlpackage if it's not already available. - No newline at end of file was added.
- Modified the script to use
- scripts/setup_pre_commit.sh
- Updated the script to use
uvinstead ofpipfor installing and upgradingpre-commit.
- Updated the script to use
- tests/models/test_gemini.py
- Modified the
mock_consolefunction to explicitly return the mock status object when__enter__is called. - Added a multiline statement to improve readability.
- Modified the
mock_tool_helpersfunction to use multiline statements to improve readability. - Moved the mock configure definition to be before the mock model object.
- Updated assertions in
test_generate_tool_callto account for changes in agent loop behavior. - Updated assertions in
test_generate_user_rejects_editto account for changes in agent loop behavior.
- Modified the
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
uv is swift,
Pip's pace, a slower drift,
Speeding Python's way.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
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.
Code Review
This pull request updates the CI workflow and local coverage check script to use uv for dependency management. The changes are straightforward and well-documented. However, there are a few minor issues and areas for improvement.
Summary of Findings
- Inconsistent use of
uvprefix: Theuvprefix is inconsistently applied in the README anddocs/install.mdfiles. Somepipcommands have theuvprefix, while others do not. This inconsistency should be resolved for clarity and consistency. - Missing virtual environment activation in README: The README provides instructions for creating a virtual environment but doesn't explicitly show how to activate it. Adding this step would improve the clarity of the installation instructions.
- Unnecessary comments in README and docs/install.md: Several commented-out lines exist in the README and
docs/install.mdfiles. These should be removed to improve readability. If these lines are intended for future use, they should be moved to a separate section or file. - PEP 8 Style Guide Adherence: While no explicit style guide was provided, the code implicitly follows PEP 8. However, some lines exceed the recommended line length. These should be refactored to improve readability and maintainability.
Merge Readiness
The pull request is mostly ready to be merged, but the minor issues identified above should be addressed to improve clarity, consistency, and readability. Please note that I am unable to approve the pull request; other reviewers must also review and approve this code before merging.
| **Recommended (PyPI):** | ||
| ```bash | ||
| pip install cli-code-agent | ||
| uv pip install cli-code-agent |
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.
| # Create a virtual environment (optional but recommended) | ||
| # uv venv | ||
| # source .venv/bin/activate | ||
|
|
||
| # Install in editable mode | ||
| uv pip install -e . | ||
| # For development including test dependencies, use: | ||
| # uv pip install -e '.[dev]' |
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.
The README instructs users to create a virtual environment but omits the activation step. Adding this would improve clarity. Also, the commented-out lines should be removed for better readability.
| # Create a virtual environment (optional but recommended) | |
| # uv venv | |
| # source .venv/bin/activate | |
| # Install in editable mode | |
| uv pip install -e . | |
| # For development including test dependencies, use: | |
| # uv pip install -e '.[dev]' | |
| git clone https://github.com/BlueCentre/cli-code.git | |
| cd cli-code | |
| uv venv | |
| source .venv/bin/activate | |
| uv pip install -e . | |
| # For development including test dependencies, use: | |
| uv pip install -e '.[dev]' |
|
|
||
| ```bash | ||
| pip install cli-code-agent | ||
| uv pip install cli-code-agent |
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.
| # Create a virtual environment (optional but recommended) | ||
| # uv venv | ||
| # source .venv/bin/activate | ||
|
|
||
| # Install in editable mode | ||
| uv pip install -e . | ||
| # For development including test dependencies, use: | ||
| # uv pip install -e '.[dev]' |
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.
The commented-out lines should be removed for better readability.
| # Create a virtual environment (optional but recommended) | |
| # uv venv | |
| # source .venv/bin/activate | |
| # Install in editable mode | |
| uv pip install -e . | |
| # For development including test dependencies, use: | |
| # uv pip install -e '.[dev]' | |
| # Install in editable mode | |
| uv pip install -e . | |
| # For development including test dependencies, use: | |
| uv pip install -e '.[dev]' |
Code Coverage Report📊 Current Coverage: 92.50% Detailed coverage analysis is available in SonarCloud Coverage Change DetailsThis shows code coverage for changes in this PR. To improve coverage, consider adding tests for new or modified code. |
1 similar comment
Code Coverage Report📊 Current Coverage: 92.50% Detailed coverage analysis is available in SonarCloud Coverage Change DetailsThis shows code coverage for changes in this PR. To improve coverage, consider adding tests for new or modified code. |
|



This PR updates the CI workflow (
.github/workflows/python-ci.yml) to useuvinstead ofpipfor installing dependencies, as part of the migration plan.\n\nAlso updates the local coverage check script (scripts/run_coverage_local.sh) to useuv.