forked from StackStorm/st2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpants.toml
81 lines (78 loc) · 3.27 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
[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 = "de0dea7a-9f6a-4c6e-aa20-6ba5ad969b8a"
[GLOBAL]
pants_version = "2.14.0rc1"
backend_packages = [
# python
"pants.backend.python",
"pants.backend.experimental.python", # activates twine `publish` support
"pants.backend.python.mixed_interpreter_constraints",
# shell
"pants.backend.shell",
]
# pants ignores files in .gitignore, .*/ directories, /dist/ directory, and __pycache__.
pants_ignore.add = [
# TODO: remove these once we start building wheels with pants.
"dist_utils.py",
"setup.py",
# keep tailor from using legacy requirements files (not for pants)
"contrib/examples/requirements.txt",
"contrib/hello_st2/requirements.txt",
"contrib/runners/*/in-requirements.txt",
"contrib/runners/*/requirements.txt",
"st2*/in-requirements.txt",
"st2*/requirements.txt",
"st2common/tests/fixtures/requirements-used-for-tests.txt",
"/fixed-requirements.txt",
"/test-requirements.txt",
# keep requirements.txt for now. We might ignore it if we need an alternate interrim
# file that is decoupled from our legacy requirements files generation.
# "/requirements.txt",
]
[source]
# recording each pack individually under root patterns is not great, but resolves these issues:
# - Using a /contrib/* or other glob in root_patterns is dodgy as runners & schemas are in the same dir.
# In particular, with /contrib/* in root_patterns, *_runner imports become ambiguous
# (eg `import noop_runner` should use runners/noop_runner/noop_runner not runners/noop_runner).
# - Using pack.yaml in marker_filenames prevents pants from inferring which fixture packs are
# used by which tests. We import a PACK_NAME and PACK_PATH from fixture.py in each of these
# fixture packs to enable this dependency inferrence. Having fine grained inferrence in-turn
# reduces the number of tests that need to be re-run when we change a fixture.
# - Using another marker_file, like PACK_ROOT, is also problematic because of the core pack.
# /contrib/core is symlinked to /st2tests/st2tests/fixtures/packs/core for use as a fixture.
# It is used in quite a few tests, so it needs to continue living in both places.
# But, overlapping source roots (for st2tests and the pack) make importing from the fixture
# as we do with the other fixtures impossible.
# Thus, we really do need to register each pack in contrib (but never under st2tests) separately.
# We might also need to register packs in st2tests/testpacks.
root_patterns = [
# root conftest.py
"/",
# core libs
"/st2*",
# runners
"/contrib/runners/*_runner",
# packs (list /contrib/* packs individually; see note above)
"/contrib/chatops",
"/contrib/core", # WARNING: also symlinked to st2tests/st2tests/fixtures/packs/core
"/contrib/default",
"/contrib/examples",
"/contrib/hello_st2",
"/contrib/linux",
"/contrib/packs",
"/st2tests/testpacks/checks",
"/st2tests/testpacks/errorcheck",
# odd import in examples.isprime
"/contrib/examples/lib",
# lint plugins
"/pylint_plugins",
# misc
"/scripts",
"/tools",
# benchmarks
"/st2common/benchmarks/micro",
]