-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
87 lines (72 loc) · 2.26 KB
/
pyproject.toml
File metadata and controls
87 lines (72 loc) · 2.26 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
[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.mypy.overrides]]
module = "_pytest.*"
follow_imports = "skip"
[tool.ruff]
line-length = 100
[tool.ruff.lint]
extend-select = ["I"]
[tool.dev-cmd.commands]
fmt = ["ruff", "format", "crates/scripts", "python", "scripts"]
check-fmt = ["ruff", "format", "--diff", "crates/scripts", "python", "scripts"]
lint = ["ruff", "check", "--fix", "crates/scripts", "python", "scripts"]
check-lint = ["ruff", "check", "crates/scripts", "python", "scripts"]
[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_{-py:{markers.python_version}}",
"crates/scripts",
"python",
]
[tool.dev-cmd.commands.type-check-scripts]
args = [
"mypy",
"--python-version", "{markers.python_version}",
"--cache-dir", ".mypy_cache_{markers.python_version}",
"scripts",
]
[tool.dev-cmd.commands.generate-release-hashes]
args = ["scripts/generate-release-hashes.py"]
accepts-extra-args = true
[tool.dev-cmd.commands.prepare-venv-activation-scripts]
args = ["scripts/prepare-venv-activation-scripts.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.{9..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"