-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpoe_tasks.toml
More file actions
114 lines (94 loc) · 2.74 KB
/
poe_tasks.toml
File metadata and controls
114 lines (94 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#:schema https://json.schemastore.org/partial-poe.json
[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", required = true, help = "The type of version bump to apply", choices = [
"patch",
"minor",
"major"
] }
]
[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 = "uv run --group docs zensical build"
[tasks.docs-serve]
help = "Start documentation local server"
cmd = "uv run --group docs zensical serve"
[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]
help = "Generate all files"
sequence = [
"generate-conformance",
"generate-example",
"generate-status",
"generate-test",
{ cmd = "go mod tidy", cwd = "protoc-gen-connect-python" },
"format",
]
[tasks.generate-conformance]
help = "Generate conformance files"
sequence = [
{ cmd = "buf 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 = "buf generate"
cwd = "example"
[tasks.generate-status]
help = "Generate gRPC status"
cmd = "buf generate"
[tasks.generate-test]
help = "Generate test files"
cmd = "buf generate"
cwd = "test"
[tasks.lint]
help = "Apply all possible linting to files"
sequence = ["lint-python", "lint-toml", "lint-types"]
[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"