-
Notifications
You must be signed in to change notification settings - Fork 8
Migrate from just to poe #205
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,118 @@ | ||||||||||||||||||||||||||||||
| #:schema https://json.schemastore.org/partial-poe.json | ||||||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't mind putting it directly in pyproject.toml but I tend to split it out to prevent an ever-growing project config file |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [env] | ||||||||||||||||||||||||||||||
| BUF_VERSION = "v1.67.0" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.bump] | ||||||||||||||||||||||||||||||
| help = "Bump the project version" | ||||||||||||||||||||||||||||||
| sequence = [ | ||||||||||||||||||||||||||||||
| { cmd = "uv version --active --bump=${_version}" }, | ||||||||||||||||||||||||||||||
| { cmd = "uv version --active --directory protoc-gen-connect-python --bump=${_version}" } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| args = [ | ||||||||||||||||||||||||||||||
| { name = "_version", help = "The type of version bump to apply", choices = [ | ||||||||||||||||||||||||||||||
| "patch", | ||||||||||||||||||||||||||||||
| "minor", | ||||||||||||||||||||||||||||||
| "major" | ||||||||||||||||||||||||||||||
| ] } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
|
Comment on lines
+12
to
+18
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was just kicking the tires and noticed this doesn't working without an arg supplied; make it a
Suggested change
|
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.check] | ||||||||||||||||||||||||||||||
| help = "Run smoke checks" | ||||||||||||||||||||||||||||||
| sequence = ["lint", "test", "test-otel"] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.checkgenerate] | ||||||||||||||||||||||||||||||
| help = "Used in CI to verify that generate doesn't produce a diff" | ||||||||||||||||||||||||||||||
| sequence = [ | ||||||||||||||||||||||||||||||
| "generate", | ||||||||||||||||||||||||||||||
| { shell = 'test -z "$(git status --porcelain | tee /dev/stderr)"' }, | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.docs-build] | ||||||||||||||||||||||||||||||
| help = "Build documentation" | ||||||||||||||||||||||||||||||
| cmd = "zensical build" | ||||||||||||||||||||||||||||||
| executor = { type = "uv", group = "docs" } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.docs-serve] | ||||||||||||||||||||||||||||||
| help = "Start documentation local server" | ||||||||||||||||||||||||||||||
| cmd = "zensical serve" | ||||||||||||||||||||||||||||||
| executor = { type = "uv", group = "docs" } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.format] | ||||||||||||||||||||||||||||||
| help = "Apply all possible auto-formatting to files" | ||||||||||||||||||||||||||||||
| sequence = ["format-python", "format-toml"] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.format-python] | ||||||||||||||||||||||||||||||
| help = "Apply auto-formatting to Python files" | ||||||||||||||||||||||||||||||
| sequence = [ | ||||||||||||||||||||||||||||||
| { cmd = "ruff check --fix --unsafe-fixes --exit-zero" }, | ||||||||||||||||||||||||||||||
| { cmd = "ruff format" } | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.format-toml] | ||||||||||||||||||||||||||||||
| help = "Apply auto-formatting to TOML files" | ||||||||||||||||||||||||||||||
| cmd = "tombi format" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.generate] | ||||||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking forward to the tombi schema supporting the new groups feature (hint hint :) ) https://poethepoet.natn.io/guides/help_guide.html#grouping-tasks |
||||||||||||||||||||||||||||||
| help = "Generate all files" | ||||||||||||||||||||||||||||||
| sequence = [ | ||||||||||||||||||||||||||||||
| "generate-conformance", | ||||||||||||||||||||||||||||||
| "generate-example", | ||||||||||||||||||||||||||||||
| "generate-status", | ||||||||||||||||||||||||||||||
| "generate-test", | ||||||||||||||||||||||||||||||
| "format", | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.generate-conformance] | ||||||||||||||||||||||||||||||
| help = "Generate conformance files" | ||||||||||||||||||||||||||||||
| sequence = [ | ||||||||||||||||||||||||||||||
| { cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" }, | ||||||||||||||||||||||||||||||
| { shell = "find test/gen -type f -exec sed -i '' 's/from connectrpc.conformance.v1/from gen.connectrpc.conformance.v1/' {} +", env = { "LC_ALL" = "c" } }, | ||||||||||||||||||||||||||||||
| ] | ||||||||||||||||||||||||||||||
| cwd = "conformance" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.generate-example] | ||||||||||||||||||||||||||||||
| help = "Generate example files" | ||||||||||||||||||||||||||||||
| cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" | ||||||||||||||||||||||||||||||
| cwd = "example" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.generate-status] | ||||||||||||||||||||||||||||||
| help = "Generate gRPC status" | ||||||||||||||||||||||||||||||
| cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.generate-test] | ||||||||||||||||||||||||||||||
| help = "Generate test files" | ||||||||||||||||||||||||||||||
| cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" | ||||||||||||||||||||||||||||||
| cwd = "test" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.lint] | ||||||||||||||||||||||||||||||
| help = "Apply all possible linting to files" | ||||||||||||||||||||||||||||||
| sequence = ["lint-python", "lint-toml", "lint-types"] | ||||||||||||||||||||||||||||||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm always torn on whether lint should run typechecks since it is pretty slow, but I went with it this time since I feel it is the simplest model
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd still love to investigate |
||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.lint-python] | ||||||||||||||||||||||||||||||
| help = "Apply linting to Python files" | ||||||||||||||||||||||||||||||
| sequence = [{ cmd = "ruff check" }, { cmd = "ruff format --check" }] | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.lint-toml] | ||||||||||||||||||||||||||||||
| help = "Apply linting to TOML files" | ||||||||||||||||||||||||||||||
| cmd = "tombi lint" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.lint-types] | ||||||||||||||||||||||||||||||
| help = "Apply type checking to Python files" | ||||||||||||||||||||||||||||||
| cmd = "pyright" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.test] | ||||||||||||||||||||||||||||||
| help = "Run unit tests" | ||||||||||||||||||||||||||||||
| cmd = "pytest" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.test-conformance] | ||||||||||||||||||||||||||||||
| help = "Run conformance tests. These are very slow" | ||||||||||||||||||||||||||||||
| cmd = "pytest" | ||||||||||||||||||||||||||||||
| cwd = "conformance" | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| [tasks.test-otel] | ||||||||||||||||||||||||||||||
| help = "Run connectrpc-otel tests" | ||||||||||||||||||||||||||||||
| # Use uv run to make sure the package is built before running tests. | ||||||||||||||||||||||||||||||
| # Instrumentation tests require package metadata. | ||||||||||||||||||||||||||||||
| cmd = "uv run pytest" | ||||||||||||||||||||||||||||||
| cwd = "connectrpc-otel" | ||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| module github.com/connectrpc/connect-python/protoc-gen-connect-python | ||
|
|
||
| go 1.25.0 | ||
| go 1.25.7 | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to match the latest buf, or otherwise |
||
|
|
||
| require ( | ||
| github.com/bufbuild/protoplugin v0.0.0-20250218205857-750e09ce93e1 | ||
|
|
||
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.
There are a few more that look worth getting into tasks but didn't go too far this time