forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pants.toml
286 lines (252 loc) · 9.36 KB
/
pants.toml
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
[GLOBAL]
print_stacktrace = true
# Enable our custom loose-source plugins.
pythonpath = ["%(buildroot)s/pants-plugins"]
backend_packages.add = [
"pants.backend.build_files.fmt.black",
"pants.backend.python",
"pants.backend.experimental.python.lint.autoflake",
"pants.backend.experimental.python.packaging.pyoxidizer",
"pants.backend.explorer",
"pants.backend.python.lint.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
"pants.backend.python.mixed_interpreter_constraints",
"pants.backend.shell",
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
"pants.backend.docker",
"pants.backend.docker.lint.hadolint",
"pants.backend.experimental.go",
"pants.backend.experimental.java",
"pants.backend.experimental.java.lint.google_java_format",
"pants.backend.experimental.java.debug_goals",
"pants.backend.experimental.python",
"pants.backend.experimental.python.packaging.pyoxidizer",
"pants.backend.experimental.scala",
"pants.backend.experimental.scala.lint.scalafmt",
"pants.backend.experimental.scala.debug_goals",
"internal_plugins.releases",
"internal_plugins.test_lockfile_fixtures",
]
plugins = [
"hdrhistogram", # For use with `--stats-log`.
"toolchain.pants.plugin==0.22.0",
]
# The invalidation globs cover the PYTHONPATH by default, but we exclude some files that are on the
# path but not consumed by python, and additionally add the rust code.
pantsd_invalidation_globs.add = [
"!*_test.py",
"!BUILD",
# NB: The `target` directory is ignored via `pants_ignore` below.
"src/rust/engine/**/*.rs",
"src/rust/engine/**/*.toml",
]
# Path patterns to ignore for filesystem operations on top of the builtin patterns.
pants_ignore.add = [
# venv directories under build-support.
"/build-support/*.venv/",
# We shouldn't walk or watch the rust compiler artifacts because it is slow.
"/src/rust/engine/target",
# We want to .gitignore Java .class files, but pants should pay attention to them.
"!*.class",
# We also want to override the .gitignore'd pants.pex file
"!/pants.pex",
# Ignore node modules for docs processing tools
"/docs/node_modules",
]
build_ignore.add = [
# Disable Go targets by default so Pants developers do not need Go installed.
"testprojects/src/go/**",
]
unmatched_build_file_globs = "error"
# TODO: May cause tests which experience missing digests to hang. If you experience an
# issue, please change this to `fetch` and then report an issue on:
# https://github.com/pantsbuild/pants/issues/16096.
cache_content_behavior = "validate"
[anonymous-telemetry]
enabled = true
repo_id = "7775F8D5-FC58-4DBC-9302-D00AE4A1505F"
[cli.alias]
all-changed = "--changed-since=HEAD --changed-dependees=transitive"
run-pyupgrade = "--backend-packages=pants.backend.experimental.python.lint.pyupgrade fmt"
[source]
root_patterns = [
"src/*",
"test/*",
"tests/*",
"3rdparty/*",
"/build-support/bin",
"/build-support/flake8",
"/build-support/migration-support",
"/pants-plugins",
# For `conftest.py`
"/",
]
[environments-preview.aliases]
default_env = "//:default_env"
# TODO(#7735): Define `//:macos_local_env` after figuring out why our Build Wheels Mac job is
# failing when this is set:
# https://github.com/pantsbuild/pants/runs/8082954359?check_suite_focus=true#step:9:657
docker = "//:docker_env"
[tailor]
build_file_header = """\
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
"""
ignore_paths = [
"build-support/migration-support/BUILD",
]
ignore_adding_targets = [
"src/python/pants:__main__",
"src/python/pants/backend/docker/subsystems:dockerfile_wrapper_script",
"src/python/pants/backend/python/dependency_inference/scripts:dependency_parser0",
"src/python/pants/backend/terraform:hcl2_parser0",
]
[update-build-files]
# We use `pants.backend.build_files.fmt.black`
fmt = false
[pex]
venv_use_symlinks = true
[python]
# N.B.: When adjusting this to support new Python versions, you must update the Pants
# `python_distrobution` targets, currently:
# + src/python/pants:pants-packaged
# + src/python/pants/testutil:testutil_wheel
interpreter_constraints = [">=3.7,<3.10"]
macos_big_sur_compatibility = true
enable_resolves = true
[python.resolves]
python-default = "3rdparty/python/user_reqs.lock"
helm-post-renderer = "src/python/pants/backend/helm/subsystems/post_renderer.lock"
helm-k8s-parser = "src/python/pants/backend/helm/subsystems/k8s_parser.lock"
[python-infer]
assets = true
unowned_dependency_behavior = "error"
[docformatter]
args = ["--wrap-summaries=100", "--wrap-descriptions=100"]
[flake8]
config = "build-support/flake8/.flake8"
extra_requirements.add = [
"flake8-2020>=1.6.0,<1.7.0",
"flake8-no-implicit-concat",
"flake8-comprehensions>=3.8.0,<4.0",
]
lockfile = "3rdparty/python/flake8.lock"
source_plugins = ["build-support/flake8"]
[shellcheck]
args = ["--external-sources"]
[shfmt]
# See https://github.com/mvdan/sh/blob/master/cmd/shfmt/shfmt.1.scd#printer-flags.
args = ["-i 2", "-ci", "-sr"]
[pytest]
args = ["--no-header"]
extra_requirements.add = [
"ipdb",
"pytest-asyncio",
"pytest-html",
"pytest-icdiff",
"pygments",
]
lockfile = "3rdparty/python/pytest.lock"
[test]
extra_env_vars = [
# TODO: These are exposed to tests in order to allow for python interpreter discovery when
# Pants-tests-Pants: in particular, the [python] subsystem consumes them.
# see https://github.com/pantsbuild/pants/issues/11638
"PYENV_ROOT",
"HOME",
"PATH",
# We'd always like complete backtraces in tests.
"RUST_BACKTRACE=1",
]
timeout_default = 60
[mypy]
interpreter_constraints = [">=3.7,<3.10"]
extra_requirements.add = [
"mypy-typing-asserts",
"strawberry-graphql>=0.95.1,<0.96",
]
lockfile = "3rdparty/python/mypy.lock"
[coverage-py]
interpreter_constraints = [">=3.7,<3.10"]
[regex-lint]
config = "@build-support/regexes/config.yaml"
[generate-lockfiles]
custom_command = "build-support/bin/generate_all_lockfiles.sh"
[jvm]
default_resolve = "jvm_testprojects"
[jvm.resolves]
# A shared resolve for all testproject/example code. Because this is not shipped with Pants
# binaries, it requires no isolation.
jvm_testprojects = "3rdparty/jvm/testprojects.lockfile"
# A resolve for the java_parser, which is shipped with Pants, and invoked with its own isolated
# classpath. Consequently, we isolate it to its own lockfile.
# Note: The jvm_artifact targets in this resolve must be kept in sync with the requirements
# in `generate_java_parser_lockfile_request`.
java_parser_dev = "src/python/pants/backend/java/dependency_inference/java_parser.lock"
# Has the same isolation requirements as `java_parser`.
# Note: The jvm_artifact targets in this resolve must be kept in sync with with the requirements
# in `generate_scala_parser_lockfile_request`.
scala_parser_dev = "src/python/pants/backend/scala/dependency_inference/scala_parser.lock"
strip_jar_dev = "src/python/pants/jvm/strip_jar/strip_jar.lock"
[scala]
version_for_resolve = { "scala_parser_dev" = "2.13.8" }
[scala-infer]
force_add_siblings_as_dependencies = false
[toolchain-setup]
repo = "pants"
org = "pantsbuild"
[buildsense]
enable = false
[pants-releases.release_notes]
master = "src/python/pants/notes/master.rst"
"1.0.x" = "src/python/pants/notes/1.0.x.rst"
"1.1.x" = "src/python/pants/notes/1.1.x.rst"
"1.2.x" = "src/python/pants/notes/1.2.x.rst"
"1.3.x" = "src/python/pants/notes/1.3.x.rst"
"1.4.x" = "src/python/pants/notes/1.4.x.rst"
"1.5.x" = "src/python/pants/notes/1.5.x.rst"
"1.6.x" = "src/python/pants/notes/1.6.x.rst"
"1.7.x" = "src/python/pants/notes/1.7.x.rst"
"1.8.x" = "src/python/pants/notes/1.8.x.rst"
"1.9.x" = "src/python/pants/notes/1.9.x.rst"
"1.10.x" = "src/python/pants/notes/1.10.x.rst"
"1.11.x" = "src/python/pants/notes/1.11.x.rst"
"1.12.x" = "src/python/pants/notes/1.12.x.rst"
"1.13.x" = "src/python/pants/notes/1.13.x.rst"
"1.14.x" = "src/python/pants/notes/1.14.x.rst"
"1.15.x" = "src/python/pants/notes/1.15.x.rst"
"1.16.x" = "src/python/pants/notes/1.16.x.rst"
"1.17.x" = "src/python/pants/notes/1.17.x.rst"
"1.18.x" = "src/python/pants/notes/1.18.x.rst"
"1.19.x" = "src/python/pants/notes/1.19.x.rst"
"1.20.x" = "src/python/pants/notes/1.20.x.rst"
"1.21.x" = "src/python/pants/notes/1.21.x.rst"
"1.22.x" = "src/python/pants/notes/1.22.x.rst"
"1.23.x" = "src/python/pants/notes/1.23.x.rst"
"1.24.x" = "src/python/pants/notes/1.24.x.rst"
"1.25.x" = "src/python/pants/notes/1.25.x.rst"
"1.26.x" = "src/python/pants/notes/1.26.x.rst"
"1.27.x" = "src/python/pants/notes/1.27.x.rst"
"1.28.x" = "src/python/pants/notes/1.28.x.rst"
"1.29.x" = "src/python/pants/notes/1.29.x.rst"
"1.30.x" = "src/python/pants/notes/1.30.x.rst"
"2.0.x" = "src/python/pants/notes/2.0.x.rst"
"2.1.x" = "src/python/pants/notes/2.1.x.rst"
"2.2.x" = "src/python/pants/notes/2.2.x.md"
"2.3.x" = "src/python/pants/notes/2.3.x.md"
"2.4.x" = "src/python/pants/notes/2.4.x.md"
"2.5.x" = "src/python/pants/notes/2.5.x.md"
"2.6.x" = "src/python/pants/notes/2.6.x.md"
"2.7.x" = "src/python/pants/notes/2.7.x.md"
"2.8.x" = "src/python/pants/notes/2.8.x.md"
"2.9.x" = "src/python/pants/notes/2.9.x.md"
"2.10.x" = "src/python/pants/notes/2.10.x.md"
"2.11.x" = "src/python/pants/notes/2.11.x.md"
"2.12.x" = "src/python/pants/notes/2.12.x.md"
"2.13.x" = "src/python/pants/notes/2.13.x.md"
"2.14.x" = "src/python/pants/notes/2.14.x.md"
"2.15.x" = "src/python/pants/notes/2.15.x.md"