-
Notifications
You must be signed in to change notification settings - Fork 28
feat: modernize packaging with pyproject.toml and uv #247
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
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.
Summary of Changes
Hello @taeold, 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!
This pull request overhauls the Python packaging and development environment to align with modern best practices, significantly improving dependency management speed, build reproducibility, and code quality tooling. These changes are foundational, aiming to streamline development and CI processes without altering core functionality.
Highlights
- Modernized Python Packaging: This pull request significantly modernizes the Python packaging setup by migrating from
setup.py
topyproject.toml
(PEP 621) for package metadata and configuration. - Introduction of uv Package Manager: The project now adopts
uv
as its primary package manager, promising 10-100x faster dependency management and reproducible builds viauv.lock
. - CI/CD and Development Workflow Updates: All CI/CD workflows have been updated to leverage
uv sync
anduv run
commands, and theCONTRIBUTING.md
documentation has been revised to guide developers through the newuv
-based development setup. - Code Formatting and Linting Standard: The project transitions from
yapf
andpylint
toruff
for code formatting and linting, with corresponding updates in.vscode/settings.json
andpyproject.toml
. - Consistent Python Versioning: A
.python-version
file has been added to ensure consistent usage of Python 3.10 across the development environment.
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.
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. ↩
/gemini review |
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 modernizes the project's packaging and dependency management by migrating to pyproject.toml
and adopting uv
. The changes are well-organized, and the updates to CI workflows and documentation are excellent. Consider committing the uv.lock
file and using the standard [project.optional-dependencies]
table for development dependencies.
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 modernizes the project's packaging by adopting pyproject.toml
and uv
. The changes are well-structured and move the project in the right direction. I've identified a few critical and high-severity issues related to the new packaging and dependency management setup that should be addressed to ensure correctness, maintainability, and reproducibility.
- Add ruff to dev dependencies - Configure ruff in pyproject.toml to match Google style - Add ruff linting to CI alongside pylint - Replace yapf with ruff format in CI - Remove yapf from dependencies - Add .git-blame-ignore-revs for formatting commit
- Migrate package metadata from setup.py to pyproject.toml (PEP 621) - Keep dynamic version reading from __init__.py for compatibility - Use modern dependency-groups format (PEP 735) for dev dependencies - Add uv for fast dependency management (10-100x faster than pip) - Update all CI/CD workflows to use uv - Add .python-version file for consistent Python version - Update CONTRIBUTING.md with uv instructions - Use modern build tool instead of setup.py commands - Fix license format to use SPDX identifier Benefits: - Faster dependency installation and resolution with uv - Modern Python packaging standards compliance - Better dependency locking with uv.lock - Simpler, more maintainable configuration - Consistent Python version across environments
b2260fc
to
175f7fb
Compare
/gemini review |
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 is a great step forward in modernizing the project's packaging and dependency management. The migration to pyproject.toml
and adoption of uv
will certainly improve the developer experience and CI performance. I've left a few comments to enhance compatibility and maintainability, mainly concerning the pyproject.toml
configuration and a small improvement to the contribution guide. Once these points are addressed, this PR will be in excellent shape.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Summary
Modernize Python packaging by migrating to pyproject.toml and adopting uv for faster dependency management.
Changes
uv sync
anduv run
commandsBenefits
Notes
Test plan
uv run pytest
uv run python -m build