forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pants.toml
245 lines (217 loc) · 7.96 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
[GLOBAL]
print_stacktrace = true
# Enable our custom loose-source plugins.
pythonpath = ["%(buildroot)s/pants-plugins"]
backend_packages.add = [
"pants.backend.python",
"pants.backend.experimental.python.lint.autoflake",
"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",
]
plugins = [
"hdrhistogram", # For use with `--stats-log`.
"toolchain.pants.plugin==0.17.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",
]
build_ignore.add = [
# Disable Go targets by default so Pants developers do not need Go installed.
"testprojects/src/go/**",
]
# NB: Users must still set `--remote-cache-{read,write}` to enable the remote cache.
remote_store_address = "grpcs://cache.toolchain.com:443"
remote_instance_name = "main"
remote_auth_plugin = "toolchain.pants.auth.plugin:toolchain_auth_plugin"
[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",
]
[tailor]
build_file_header = """\
# Copyright 2021 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/go/go_sources:bin",
"src/python/pants/backend/go/go_sources:go_sources0",
"src/python/pants/backend/go/go_sources/analyze_package:bin",
"src/python/pants/backend/go/go_sources/embedcfg:bin",
"src/python/pants/backend/go/go_sources/generate_testmain:bin",
"src/python/pants/backend/docker/subsystems:dockerfile_wrapper_script",
"src/python/pants/backend/python/dependency_inference/scripts:import_parser0",
"src/python/pants/backend/terraform:hcl2_parser0",
]
[pex]
venv_use_symlinks = true
[python]
interpreter_constraints = [">=3.7,<3.10"]
macos_big_sur_compatibility = true
resolves = { python-default = "3rdparty/python/lockfiles/user_reqs.txt" }
enable_resolves = true
[docformatter]
args = ["--wrap-summaries=100", "--wrap-descriptions=100"]
[flake8]
config = "build-support/flake8/.flake8"
extra_requirements.add = [
"flake8-pantsbuild>=2.0,<3",
"flake8-2020>=1.6.0,<1.7.0",
"flake8-no-implicit-concat",
"flake8-comprehensions>=3.8.0,<4.0",
]
lockfile = "3rdparty/python/lockfiles/flake8.txt"
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-html",
"pytest-icdiff",
"pygments",
]
lockfile = "3rdparty/python/lockfiles/pytest.txt"
timeout_default = 60
[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",
]
[mypy]
interpreter_constraints = [">=3.7,<3.10"]
extra_requirements.add = [
"mypy-typing-asserts",
]
lockfile = "3rdparty/python/lockfiles/mypy.txt"
[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.
java_parser = "src/python/pants/backend/java/dependency_inference/java_parser.lockfile"
# Has the same isolation requirements as `java_parser`.
scala_parser = "src/python/pants/backend/scala/dependency_inference/scala_parser.lockfile"
[scala]
version_for_resolve = { "scala_parser" = '2.13.7' }
[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"