-
-
Notifications
You must be signed in to change notification settings - Fork 1k
feat: poetry builder #5734
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
feat: poetry builder #5734
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.
Pull Request Overview
This PR adds Poetry support to GoReleaser by introducing new configuration files, updating documentation, and integrating a Poetry build process similar to the UV builder.
- Added comprehensive documentation for Poetry builds.
- Introduced new static config files and associated tests for Poetry.
- Updated the initialization and language detection logic to support Poetry.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
www/docs/customization/builds/uv.md | Minor documentation update for UV builds. |
www/docs/customization/builds/poetry.md | Added documentation for Poetry builds with examples and options. |
internal/static/config.poetry.yaml | New static configuration file for Poetry builds. |
internal/static/config.go | Added embedding for the new Poetry configuration. |
internal/pyproject/pyproject_test.go | Removed an assertion related to Python version requirements. |
internal/pyproject/pyproject.go | Extended the PyProject struct and methods to support Poetry. |
internal/builders/poetry/*.go & tests | Implemented the Poetry builder with tests for both wheel and sdist. |
cmd/init.go | Integrated Poetry support into the init command and language detection. |
cmd/init_test.go | Added tests to verify language detection and config generation for Poetry. |
Deploying goreleaser with
|
Latest commit: |
be5f3f6
|
Status: | ✅ Deploy successful! |
Preview URL: | https://5482bc10.goreleaser.pages.dev |
Branch Preview URL: | https://poetry.goreleaser.pages.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.
Pull Request Overview
This PR adds Poetry support to GoReleaser by introducing a new poetry builder, configuration, documentation, and tests. Key changes include the addition of a new documentation file and configuration file for Poetry, implementation of a Poetry builder with associated tests, and updates to language detection and initialization logic to recognize Poetry projects.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
www/docs/customization/builds/uv.md | Updated clarification text in UV documentation. |
www/docs/customization/builds/poetry.md | New documentation detailing the Poetry build support and configuration options. |
internal/static/config.poetry.yaml | Added configuration file with defaults for Poetry builds. |
internal/static/config.go | Exposed PoetryExampleConfig for use during initialization. |
internal/pyproject/pyproject_test.go | Added tests for poetry detection and project naming. |
internal/pyproject/pyproject.go | Updated pyproject structure and added IsPoetry and Name methods. |
internal/builders/poetry/* | New poetry builder implementation and its tests. |
cmd/init.go and cmd/init_test.go | Updated language detection and init command to support Poetry alongside UV. |
Comments suppressed due to low confidence (2)
cmd/init.go:162
- [nitpick] Consider defining a constant for the filename "pyproject.toml" to improve maintainability and avoid repetition.
file = "pyproject.toml"
internal/pyproject/pyproject_test.go:14
- [nitpick] A comment clarifying that the test expects a non-Poetry pyproject.toml (i.e. one without [tool.poetry]) would help future readers understand the intent.
require.False(t, proj.IsPoetry())
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.
Pull Request Overview
This PR adds support for building Python projects using Poetry, mirroring the functionality previously available for uv. Key changes include:
- Updated documentation with a new builds/poetry.md file and adjustments in uv.md.
- New configuration files and embedded examples for Poetry (config.poetry.yaml and PoetryExampleConfig).
- Implementation changes and tests in the pyproject and builders packages, as well as language detection updates in the init commands.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
www/docs/customization/builds/uv.md | Removed duplicated text regarding checksumming. |
www/docs/customization/builds/poetry.md | Added comprehensive documentation and configuration examples for the poetry builder. |
internal/static/config.poetry.yaml | Provides default configuration for poetry builds. |
internal/static/config.go | Embedded Poetry config example file along with uv and rust configs. |
internal/pyproject/* | Introduced IsPoetry() and Name() methods, and added tests for poetry detection. |
internal/builders/uv/build.go | Updated artifact naming by using the new Name() method from pyproject package. |
internal/builders/poetry/* | New builder implementation and tests for supporting Poetry builds. |
cmd/init*.go | Updated language detection and init logic to support poetry as a language option. |
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.
Pull Request Overview
This PR adds Poetry builder support to goreleaser by introducing new documentation, configuration files, tests, and builder implementation.
- Updated documentation and index files to include Poetry support.
- Added new configuration examples and tests for the Poetry builder.
- Implemented the Poetry builder in the codebase and updated project initialization logic to detect Poetry projects.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
www/docs/customization/builds/uv.md | Cleaned up documentation text. |
www/docs/customization/builds/poetry.md | Added comprehensive documentation for Poetry builds. |
www/docs/customization/builds/index.md | Updated build index to include new UV and Poetry entries. |
internal/static/config.poetry.yaml | New configuration file example for Poetry builder. |
internal/static/config.go | Embedded the new Poetry configuration. |
internal/pyproject/pyproject.go | Extended pyproject parsing for Poetry with added IsPoetry and Name methods. |
internal/builders/uv/build.go | Updated artifact naming to call the new Name() method from the pyproject. |
internal/builders/poetry/* | Added Poetry-specific builder implementation, tests, and testdata configuration. |
cmd/init_test.go | Added tests to verify proper detection and initialization for Poetry projects. |
cmd/init.go | Updated project initialization to detect Poetry projects and to generate the correct config. |
Comments suppressed due to low confidence (1)
cmd/init.go:143
- The language flag completions do not include the new 'uv' and 'poetry' options. Please update the completions list to include these values to ensure users can select them via auto-completion.
[]string{"go", "bun", "deno", "rust", "zig"}
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5734 +/- ##
==========================================
- Coverage 82.94% 82.92% -0.03%
==========================================
Files 160 161 +1
Lines 15775 15916 +141
==========================================
+ Hits 13085 13198 +113
- Misses 2124 2144 +20
- Partials 566 574 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
this adds Poetry support to goreleaser.
the implementation is very similar to that of
uv
.