-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpants.toml
120 lines (104 loc) · 3.21 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
[anonymous-telemetry]
# This is opt-in by default, but we explicitly disable here as well.
enabled = false
# repo_id here allows individuals to opt-in on their machine
# To opt-in, use ~/.pants.rc or envrc to set [anonymous-telemetry].enabled=true
repo_id = "b56223e2-4201-4a35-9044-4114390a8646"
# uuid generated by https://www.uuidgenerator.net/
[GLOBAL]
pants_version = "2.7.1rc1"
#pythonpath = ["%(buildroot)s/pants-plugins"]
backend_packages = [
# python
"pants.backend.python",
"pants.backend.python.mixed_interpreter_constraints",
"pants.backend.python.lint.bandit",
"pants.backend.python.lint.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.flake8",
"pants.backend.python.lint.isort",
# mypy is slow. enable after this is fixed:
# https://github.com/pantsbuild/pants/issues/10864
#"pants.backend.python.typecheck.mypy",
# pylint is slow and painful. don't bother.
# shell
"pants.backend.shell",
"pants.backend.shell.lint.shfmt",
"pants.backend.shell.lint.shellcheck",
# docker
"pants.backend.experimental.docker",
"pants.backend.experimental.docker.lint.hadolint",
# internal plugins in pants-plugins/
# ...
]
[source]
root_patterns = [
"/",
"src",
]
[python-setup]
# since pants v2.5, only pip-2020-resolver is supported
# experimental_lockfile = "lockfiles/opsdroid-st2"
interpreter_constraints = [
# OpsDroid requires python 3.7 or 3.8
# StackStorm requires python 3.6 or 3.8
# so we only target 3.8 here.
"CPython==3.8.*",
]
[python-infer]
inits = true
[bandit]
lockfile = "build-support/lockfiles/bandit"
version = "bandit>=1.7.0,<1.8"
#config = "pyproject.toml"
args = [
"--quiet",
]
[black]
lockfile = "build-support/lockfiles/black"
version = "black==21.5b2"
[flake8]
lockfile = "build-support/lockfiles/flake8"
version = "flake8>=3.9.2,<4.0"
extra_requirements = [
"flake8-bugbear",
# license check plugin
#"st2flake8==0.1.0",
]
# flake8 doesn't support pyproject.toml
# https://flake8.pycqa.org/en/latest/user/configuration.html
config = "build-support/.flake8"
[isort]
lockfile = "build-support/lockfiles/isort"
version = "isort[colors]>=5.5.1,<5.6"
[docformatter]
lockfile = "build-support/lockfiles/docformatter"
version = "docformatter>=1.4,<1.5"
[pytest]
lockfile = "build-support/lockfiles/pytest"
version = "pytest>=6.2.4,<6.3"
extra_requirements.add = [
"pytest-benchmark[histogram]==3.4.1",
#"pytest-timer[colorama]", # report test timing (--with-timer ala nose-timer)
"pytest-icdiff", # make diff output easier to read
"pygments", # highlight code in tracebacks
# other possible plugins
#"pytest-timeout", # time limit on tests
#"pytest-cov", # coverage (pants installs this by default)
#"pytest-mock", # more convenient mocking
# do not add: xdist (pants runs tests in parallel already)
]
args = [
"--no-header", # don't print pytest version for every tested file
]
execution_slot_var = "ST2TESTS_PARALLEL_SLOT"
[subprocess-environment]
env_vars.add = [
# vars to trigger injecting pydevd-pycharm
"ST2_PYCHARM_DEBUG",
"ST2_PYCHARM_DEBUG_HOST",
"ST2_PYCHARM_DEBUG_PORT",
# For users testing with python from XCode, make sure to export ARCHFLAGS
# see: https://github.com/pantsbuild/pants/pull/11733
"ARCHFLAGS",
]