-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
75 lines (62 loc) · 1.92 KB
/
pyproject.toml
File metadata and controls
75 lines (62 loc) · 1.92 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
[project]
name = "pexrc"
version = "0.1.0"
requires-python = ">=2.7"
[tool.uv]
package = false
[dependency-groups]
dev = [
"ansicolors",
"dev-cmd[old-pythons]; python_version >= '3.8'",
"mypy",
"pex",
"pytest",
"pytest-xdist",
"ruff",
"types-setuptools",
]
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = ["I"]
[tool.dev-cmd.commands]
fmt = ["ruff", "format", "crates/scripts", "python"]
check-fmt = ["ruff", "format", "--diff", "crates/scripts", "python"]
lint = ["ruff", "check", "--fix", "crates/scripts", "python"]
check-lint = ["ruff", "check", "crates/scripts", "python"]
[tool.dev-cmd.commands.type-check-pexrc.factors]
py = "The Python version to type check in <major>.<minor> form; i.e.: 3.13."
[tool.dev-cmd.commands.type-check-pexrc]
args = [
"mypy",
"--python-version", "{-py:{markers.python_version}}",
"--cache-dir", ".mypy_cache_{markers.python_version}",
"crates/scripts",
"python",
]
[tool.dev-cmd.commands.type-check-scripts]
args = ["mypy", "scripts"]
[tool.dev-cmd.commands.generate-release-hashes]
when = "python_version >= '3.10'"
args = ["scripts/generate-release-hashes.py"]
accepts-extra-args = true
[tool.dev-cmd.commands.test]
args = ["python/testing/bin/run-tests.py"]
accepts-extra-args = true
[tool.dev-cmd.tasks.checks]
description = "Runs all development checks, including auto-formatting code."
steps = [
"fmt",
"lint",
# Parallelizing the type checks is safe (they don't modify files), and it nets a ~3x
# speedup over running them all serially.
["type-check-pexrc-py3.{8..14}", "type-check-scripts"],
"test",
]
[tool.dev-cmd.tasks.ci]
description = "Runs all checks used for CI."
# None of the CI checks modify files; so they can all be run in parallel which nets a ~1.5x speedup.
steps = [["check-fmt", "check-lint", "type-check-pexrc", "type-check-scripts", "test"]]
[tool.dev-cmd]
default = "checks"
exit-style = "immediate"