Conversation
There was a problem hiding this comment.
Summary of Changes
Hello @chrisk314, 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 significantly modernizes and streamlines the project's build, packaging, and dependency management workflows. The core changes involve migrating from poetry and pyenv to hatch-vcs for dynamic versioning and uv for environment and dependency management, alongside improvements to the Docker build process. The aim is to enhance efficiency, maintainability, and reproducibility of the build system.
Highlights
- Build System Migration to Hatch: I've transitioned the project's version management from
poetryandtoml-clitohatch-vcs. This involves marking the version as dynamic inpyproject.toml, addinghatch-vcsas a build system and development dependency, and updating the Dockerfile and Makefile to usehatchcommands for building and retrieving the package version. - Dependency Management Shift to UV: The build and development workflows in the
Makefilehave been refactored to replacepyenvandpoetrycommands withuv. This includes usinguv venvfor virtual environment creation,uv syncfor dependency installation,uv runfor executing development tools (likeruff,mypy,pytest,mkdocs), anduv exportfor generatingrequirements.txt. - Docker Build Process Enhancements: The Dockerfile now leverages
uv venvand installshatchlingin the builder stage. The package installation within the Docker image has been streamlined to usehatch buildto create a wheel, followed byuv pip installof that wheel. TheMakefile'sdocker-buildtarget has been updated to usedocker buildx buildwith added--provenance=falseand--cache-fromflags for improved build efficiency and reproducibility. - Dependency Pinning: The
raydependency inpyproject.tomlhas been pinned to<2.47to address potential hanging issues observed in GitHub Actions, with a clarifying comment added.
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. ↩
There was a problem hiding this comment.
Code Review
This PR introduces hatch-vcs for dynamic package versioning and refactors the build system to use uv, replacing pyenv and poetry in the Makefile. The changes are generally well-aligned with these goals and modernize the build process. Key improvements:
pyproject.toml: Usehatch-vcsinstead ofhatch.vcs.Dockerfile: Installhatchandhatch-vcsin the builder stage and useSETUPTOOLS_SCM_PRETEND_VERSIONinstead ofUV_VERSION_BYPASS.Makefile: Add--emit-packageto theuv exportcommand.
996bead to
9aeeeb4
Compare
9aeeeb4 to
aaf90f2
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
Summary
This PR introduces some enhancements and house cleaning for the build and packaging workflow for plugboard. Mainly "hatch-vcs" is introduced to set the semver string for the package dynamically.
Changes
hatch versionto get/set semver strings in build steps rather than toml-cli tricks