-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpoe_tasks.toml
More file actions
127 lines (105 loc) · 3.11 KB
/
Copy pathpoe_tasks.toml
File metadata and controls
127 lines (105 loc) · 3.11 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
115
116
117
118
119
120
121
122
123
124
125
126
127
#: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-connectrpc --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-grpcreflect",
"generate-status",
"generate-test",
"format",
]
[tasks.generate-conformance]
help = "Generate conformance files"
cmd = "buf generate"
cwd = "conformance"
[tasks.generate-example]
help = "Generate example files"
cmd = "buf generate"
cwd = "example"
[tasks.generate-grpcreflect]
help = "Generate gRPC reflection files"
cmd = "buf generate"
cwd = "connectrpc-grpcreflect"
[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"
# Workaround lack of monorepo support by running in each project explicitly.
# https://docs.astral.sh/ty/reference/typing-faq/#does-ty-support-monorepos
# https://github.com/astral-sh/ty/issues/819
sequence = [
{ cmd = "ty check --project connectrpc-grpcreflect" },
{ cmd = "ty check --project connectrpc-otel" },
{ cmd = "ty check --project example" },
{ cmd = "ty check" },
]
[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-grpcreflect]
help = "Run connectrpc-grpcreflect tests"
cmd = "pytest"
cwd = "connectrpc-grpcreflect"
[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"