-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpants.toml
More file actions
124 lines (107 loc) · 3.51 KB
/
Copy pathpants.toml
File metadata and controls
124 lines (107 loc) · 3.51 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
[GLOBAL]
backend_packages = [
"pants.backend.build_files.fmt.ruff",
"pants.backend.docker",
"pants.backend.docker.lint.hadolint",
"pants.backend.experimental.adhoc",
# For `vcs_version` (setuptools-scm-derived versions from git tags).
"pants.backend.experimental.python",
"pants.backend.experimental.python.lint.ruff.check",
"pants.backend.experimental.python.lint.ruff.format",
"pants.backend.experimental.tools.yamllint",
"pants.backend.experimental.visibility",
"pants.backend.python",
"pants.backend.python.lint.bandit",
"pants.backend.python.typecheck.mypy",
"pants.backend.shell",
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
"pants.backend.tools.taplo",
]
pants_version = "2.32.0"
build_patterns = ["BUILD", "BUILD.*"]
build_file_prelude_globs = ["build_scripts/pants_macros.py"]
colors = true
pants_ignore = [
".*/",
"**/.venv/",
"/dist/",
"/site/",
"__pycache__",
"!.semgrep/",
"!.github/",
]
[changed]
dependents = "transitive"
[source]
# Longest-matching prefix wins, so files under `src/python` resolve to that root, not `src`. The beets
# plugin intentionally has NO `src/beetsplug` root: resolving from `src` gives its sources the
# `beetsplug.beetkeeper_plugin` import path — the same path beets imports after a wheel install (beets
# only discovers plugins under the `beetsplug` namespace), so dev/test imports match production.
root_patterns = ["src", "src/python", "build_scripts"]
[docker]
use_buildx = true
# Puts Docker Desktop's `credsStore = "desktop"` helper on the build process PATH; `pants.ci.toml` clears
# this since CI runners lack it (CI must run with `PANTS_CONFIG_FILES=pants.ci.toml`).
tools = ["docker-credential-desktop"]
[docker.registries.ghcr]
address = "ghcr.io"
[tailor]
build_file_name = "BUILD"
[taplo]
glob_pattern = ["**/*.toml", "!.taplo.toml", "!taplo.toml"]
[test]
extra_env_vars = ["PANTS=true"]
[cli.alias]
--all-changed = "--changed-since=HEAD --changed-dependents=transitive"
[python-bootstrap]
search_path = ["<PYENV>", "<ASDF>", "<PATH>"]
[python]
# resolver = "uv"
resolver = "pex"
enable_resolves = true
default_resolve = "beetkeeper-resolve"
interpreter_constraints = ["CPython>=3.14,<3.15"]
interpreter_versions_universe = ["3.14", "3.15"]
default_to_resolve_interpreter_constraints = true
pip_version = "latest"
separate_lockfile_metadata_file = true
[python.resolves]
"beetkeeper-resolve" = "3rdparty/python/beetkeeper-lockfile.json"
"tools-resolve" = "3rdparty/tools/tools-lockfile.json"
# [python.resolves_to_interpreter_constraints]
# "beetkeeper-resolve" = ["CPython>=3.14,<3.15"]
[bandit]
args = ["--quiet", "--severity-level=medium", "--confidence-level=medium"]
config = "pyproject.toml"
install_from_resolve = "tools-resolve"
requirements = ["bandit"]
[mypy]
config = "pyproject.toml"
install_from_resolve = "tools-resolve"
requirements = [
"mypy",
"mypy-extensions",
"pydantic", # for the `pydantic.mypy` plugin so type checking can proceed on test files
"pytest",
]
[pytest]
config = "pyproject.toml"
install_from_resolve = "tools-resolve"
# Must include every plugin whose options we pass in `args`/`addopts` (e.g. `pytest-socket`), or pex's
# argparse rejects those options: https://www.pantsbuild.org/stable/reference/subsystems/pytest#requirements
requirements = [
"fastapi[standard]",
"pytest",
"pytest-mock",
"pytest-socket",
"pytest-xdist",
"ruamel-yaml",
"tomlkit",
]
xdist_enabled = false
[update-build-files]
fmt = true
formatter = "ruff"
[yamllint]
config_file_name = ".yamllint.yaml"