Skip to content

Commit 196f81c

Browse files
committed
Migrate from just to poe
Signed-off-by: Anuraag Agrawal <anuraaga@gmail.com>
1 parent 8e0ec35 commit 196f81c

File tree

11 files changed

+169
-124
lines changed

11 files changed

+169
-124
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,37 +67,33 @@ jobs:
6767
go-version-file: protoc-gen-connect-python/go.mod
6868
cache-dependency-path: "**/go.mod"
6969

70-
- run: uv sync --all-packages
70+
- run: uv sync --frozen
7171

7272
- name: run lints
7373
if: startsWith(matrix.os, 'ubuntu-')
74-
run: |
75-
uv run ruff format --check .
76-
uv run ruff check .
77-
uv run pyright
74+
run: uv run poe lint
7875

7976
- name: run python tests
80-
run: uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
77+
run: uv run poe test ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
8178

8279
- name: run conformance tests
8380
# TODO: Debug stdin/stdout issues on Windows
8481
if: ${{ !startsWith(matrix.os, 'windows-') }}
85-
run: uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
86-
working-directory: conformance
82+
run: uv run poe test-conformance ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
8783

8884
- name: run OTel tests
89-
run: uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
85+
run: uv run poe test-otel ${{ matrix.coverage == 'cov' && '--cov=connectrpc_otel --cov-report=xml' || '' }}
9086
working-directory: connectrpc-otel
9187

9288
- name: run Go tests
9389
run: go test ./...
9490
working-directory: protoc-gen-connect-python
9591

96-
- name: check running `just generate` does not create a diff
92+
- name: check running generate does not create a diff
9793
# NOTE: running on macOS as our sed command only works there
9894
# We expect uv.lock to change when matrix.resolution == "lowest-direct", so we don't check it there.
9995
if: ${{ startsWith(matrix.os, 'macos-') && matrix.resolution == 'highest' }}
100-
run: uv run just checkgenerate
96+
run: uv run poe checkgenerate
10197
env:
10298
BUF_TOKEN: ${{ secrets.BUF_TOKEN }}
10399

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333

3434
- uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
3535

36-
- run: uv run --group docs --no-dev zensical build --clean
36+
- run: uv run poe docs-build
3737

3838
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
3939
if: github.event_name != 'pull_request'

CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ $ git commit -s -m "your commit message"
2424

2525
- Python 3.10 or later
2626
- [uv](https://docs.astral.sh/uv/) for dependency management
27-
- [just](https://just.systems/) for running tasks
2827

2928
### Installation
3029

@@ -38,13 +37,13 @@ $ git commit -s -m "your commit message"
3837
2. Verify everything is working:
3938

4039
```console
41-
$ uv run just check
40+
$ uv run poe check
4241
```
4342

4443
## Development Workflow
4544

46-
We use `just` as our task runner.
47-
Run `uv run just --list` to see all available commands.
45+
We use `poe` as our task runner.
46+
Run `uv run poe` to see all available commands.
4847

4948
## Submitting a Pull Request
5049

@@ -57,7 +56,7 @@ Run `uv run just --list` to see all available commands.
5756
2. Make your changes and ensure all checks pass:
5857

5958
```console
60-
$ uv run just check
59+
$ uv run poe check
6160
```
6261

6362
3. Commit with a sign-off and a clear message, then push to your fork and open a pull

DEVELOPMENT.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,20 @@
2424

2525
## Development Workflow
2626

27-
We use `just` as a task runner. Available commands:
27+
We use `poe` as a task runner. Available commands:
2828

2929
```bash
3030
# Run all checks
31-
uv run just check
31+
uv run poe check
3232

3333
# Format code
34-
uv run just format
35-
36-
# Run type checking
37-
uv run just typecheck
34+
uv run poe format
3835

3936
# Run tests
40-
uv run just test
37+
uv run poe test
4138

4239
# Run conformance tests
43-
uv run just conformance
40+
uv run poe test-conformance
4441
```
4542

4643
## Code Style
@@ -58,23 +55,23 @@ The project follows strict type checking and formatting standards.
5855
### Unit Tests
5956

6057
```bash
61-
uv run just test
58+
uv run poe test
6259
```
6360

6461
### Conformance Tests
6562

6663
The project uses the official Connect conformance test suite. Go must be installed to run them.
6764

6865
```bash
69-
uv run just conformance
66+
uv run poe test-conformance
7067
```
7168

7269
## Code Generation
7370

7471
The project includes protobuf code generation for examples and tests:
7572

7673
```bash
77-
uv run just generate
74+
uv run poe generate
7875
```
7976

8077
## Releasing
@@ -90,7 +87,7 @@ Documentation is contained in the [connectrpc/connectrpc.com](https://github.com
9087
1. Fork the repository
9188
2. Create a feature branch
9289
3. Make your changes
93-
4. Run the full test suite: `uv run just check`
90+
4. Run the full smoke check suite: `uv run poe check`
9491
5. Submit a pull request
9592

9693
### Pull Request Guidelines

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ Set up a virtual env:
408408
uv sync
409409
```
410410

411-
Then, use `uv run just` to do development checks, or check out `uv run just --list` for other targets.
412-
`just` is run via `uv` as a development dependency, but you can also install it globally and omit the `uv run` from the commands.
411+
Then, use `uv run poe check` to do development checks, or check out `uv run poe` for other targets.
413412

414413
## Status
415414

RELEASE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This document outlines how to create a release of connect-python.
66

77
2. On a new branch, update version strings with the `bump` command, either to the next minor or patch version, based on the changes that are included in this new release.
88

9-
- If there are only bug fixes and no new features, run `uv run just bump patch`.
10-
- If there are features being released, run `uv run just bump minor`.
9+
- If there are only bug fixes and no new features, run `uv run poe bump --version patch`.
10+
- If there are features being released, run `uv run poe bump --version minor`.
1111

1212
Note the new version X.Y.Z in the updated files.
1313

connect-python.code-workspace

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
"golang.go",
2727
"ms-python.python",
2828
"ms-python.vscode-pylance",
29-
"nefrob.vscode-just-syntax",
3029
],
3130
},
3231
"settings": {

justfile

Lines changed: 0 additions & 73 deletions
This file was deleted.

poe_tasks.toml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
#:schema https://json.schemastore.org/partial-poe.json
2+
3+
[env]
4+
BUF_VERSION = "v1.67.0"
5+
6+
[tasks.bump]
7+
help = "Bump the project version"
8+
sequence = [
9+
{ cmd = "uv version --active --bump=${_version}" },
10+
{ cmd = "uv version --active --directory protoc-gen-connect-python --bump=${_version}" }
11+
]
12+
args = [
13+
{ name = "_version", help = "The type of version bump to apply", choices = [
14+
"patch",
15+
"minor",
16+
"major"
17+
] }
18+
]
19+
20+
[tasks.check]
21+
help = "Run smoke checks"
22+
sequence = ["lint", "test", "test-otel"]
23+
24+
[tasks.checkgenerate]
25+
help = "Used in CI to verify that generate doesn't produce a diff"
26+
sequence = [
27+
"generate",
28+
{ shell = 'test -z "$(git status --porcelain | tee /dev/stderr)"' },
29+
]
30+
31+
[tasks.docs-build]
32+
help = "Build documentation"
33+
cmd = "zensical build"
34+
executor = { type = "uv", group = "docs" }
35+
36+
[tasks.docs-serve]
37+
help = "Start documentation local server"
38+
cmd = "zensical serve"
39+
executor = { type = "uv", group = "docs" }
40+
41+
[tasks.format]
42+
help = "Apply all possible auto-formatting to files"
43+
sequence = ["format-python", "format-toml"]
44+
45+
[tasks.format-python]
46+
help = "Apply auto-formatting to Python files"
47+
sequence = [
48+
{ cmd = "ruff check --fix --unsafe-fixes --exit-zero" },
49+
{ cmd = "ruff format" }
50+
]
51+
52+
[tasks.format-toml]
53+
help = "Apply auto-formatting to TOML files"
54+
cmd = "tombi format"
55+
56+
[tasks.generate]
57+
help = "Generate all files"
58+
sequence = [
59+
"generate-conformance",
60+
"generate-example",
61+
"generate-status",
62+
"generate-test",
63+
"format",
64+
]
65+
66+
[tasks.generate-conformance]
67+
help = "Generate conformance files"
68+
sequence = [
69+
{ cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate" },
70+
{ shell = "find test/gen -type f -exec sed -i '' 's/from connectrpc.conformance.v1/from gen.connectrpc.conformance.v1/' {} +", env = { "LC_ALL" = "c" } },
71+
]
72+
cwd = "conformance"
73+
74+
[tasks.generate-example]
75+
help = "Generate example files"
76+
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
77+
cwd = "example"
78+
79+
[tasks.generate-status]
80+
help = "Generate gRPC status"
81+
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
82+
83+
[tasks.generate-test]
84+
help = "Generate test files"
85+
cmd = "go run github.com/bufbuild/buf/cmd/buf@${BUF_VERSION} generate"
86+
cwd = "test"
87+
88+
[tasks.lint]
89+
help = "Apply all possible linting to files"
90+
sequence = ["lint-python", "lint-toml"]
91+
92+
[tasks.lint-python]
93+
help = "Apply linting to Python files"
94+
sequence = [{ cmd = "ruff check" }, { cmd = "ruff format --check" }]
95+
96+
[tasks.lint-toml]
97+
help = "Apply linting to TOML files"
98+
cmd = "tombi lint"
99+
100+
[tasks.lint-types]
101+
help = "Apply type checking to Python files"
102+
cmd = "pyright"
103+
104+
[tasks.test]
105+
help = "Run unit tests"
106+
cmd = "pytest"
107+
108+
[tasks.test-conformance]
109+
help = "Run conformance tests. These are very slow"
110+
cmd = "pytest"
111+
cwd = "conformance"
112+
113+
[tasks.test-otel]
114+
help = "Run connectrpc-otel tests"
115+
cmd = "pytest"
116+
cwd = "connectrpc-otel"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ dev = [
4848
"grpcio-tools==1.80.0",
4949
"gunicorn==25.3.0",
5050
"hypercorn==0.18.0",
51-
"just-bin==1.48.1; sys_platform != 'win32'",
51+
"poethepoet==0.44.0",
5252
"pyright[nodejs]==1.1.408",
5353
"pyvoy==0.3.0",
5454
"ruff==0.15.9",

0 commit comments

Comments
 (0)