-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpyproject.toml
More file actions
190 lines (170 loc) · 4.22 KB
/
pyproject.toml
File metadata and controls
190 lines (170 loc) · 4.22 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
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
[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "ramble"
version = "0.6.0"
description = "A multi-platform experimentation framework written in python."
readme = "README.md"
requires-python = ">=3.6"
license = "Apache-2.0 OR MIT"
license-files = ["LICENSE-APACHE", "LICENSE-MIT"]
classifiers = [
"Programming Language :: Python :: 3",
]
dynamic = ["dependencies"]
[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
[tool.setuptools]
package-dir = { "" = "." }
include-package-data = true
[tool.setuptools.packages.find]
where = ["."]
include = ["lib*", "etc*", "var*", "bin*", "share*"]
namespaces = true
[tool.setuptools.package-data]
"*" = ["*"]
[tool.black]
line-length = 99
# Older versions of black (like the ones compatible with py3.7)
# don't recognize newer python versions like py312.
target-version = ["py36", "py37", "py38", "py39", "py310"]
include = '''
\.pyi?$
'''
force-exclude = '''
/(
\.git
| etc
| share
| var
| lib/ramble/external
| lib/ramble/spack
| lib/ramble/llnl
| __pycache__
)/
'''
[tool.isort]
profile = "black"
line_length = 99
filter_files = true
skip_glob = [
"**/lib/ramble/external/**",
"**/lib/ramble/llnl/**",
"**/lib/ramble/spack/**",
]
sections = [
"FUTURE",
"STDLIB",
"THIRDPARTY",
"LLNL",
"FIRSTPARTY",
"SPACK",
"LOCALFOLDER",
]
known_first_party = "ramble"
known_spack = "spack"
known_llnl = "llnl"
known_third_party = ["ruamel", "jsonschema"]
[tool.coverage.run]
parallel = true
# subprocess assumes parallel=true
# This patch allows coverage.py to accurately capture
# subprocess calls.
patch = ["subprocess"]
data_file = "./tests-coverage/.coverage"
include = [
"**/bin/ramble",
"**/bin/ramble-python",
"**/lib/ramble/ramble/**",
"**/lib/ramble/ramble/schema/**",
"**/lib/ramble/ramble/cmd/**",
"**/var/ramble/repos/builtin/base_classes/**",
]
omit = [
"**/spack/lib/**",
"**/spack/var/**",
"lib/ramble/spack/**",
"lib/ramble/external/**",
"lib/ramble/llnl/**",
"share/**",
# Perf tests don't run in the coverage CI build, so exclude them here.
# They do run in a separate CI build though.
"**/lib/ramble/ramble/test/end_to_end/perf_tests/**",
]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain about missing debug-only code:
'def __repr__',
'if self\.debug',
# Don't complain if tests don't hit defensive assertion code:
'raise AssertionError',
'raise NotImplementedError',
# Don't complain if non-runnable code isn't run:
'if 0:',
'if False:',
'if __name__ == .__main__.:',
]
ignore_errors = true
include = [
"**/bin/ramble",
"**/bin/ramble-python",
"**/lib/ramble/ramble/**",
"**/lib/ramble/ramble/schema/**",
"**/lib/ramble/ramble/cmd/**",
]
omit = [
"**/spack/lib/**",
"**/spack/var/**",
"lib/ramble/spack/**",
"lib/ramble/external/**",
"lib/ramble/llnl/**",
"share/**",
]
[tool.coverage.html]
directory = "htmlcov"
[tool.mypy]
# Use a common version (3.10 is the lowest supported version)
# Otherwise mypy uses the running python's version
python_version = "3.10"
# TODO: Add in more files for type-checking
# For now, only type-check the util directory
files = [
"lib/ramble/ramble/**/*.py",
]
ignore_errors = true
ignore_missing_imports = true
allow_redefinition = true
[[tool.mypy.overrides]]
# Only enable ramble modules
module = "ramble.*"
ignore_errors = false
[[tool.mypy.overrides]]
# TODO: Add more modules here for exhaustive type-checking
module = [
"ramble.util.*",
"ramble.error",
"ramble.paths",
"ramble.filters",
]
check_untyped_defs = true
# TODO: Add ruff into `ramble style` once it reaches v1.
# For now, the ruff check can be invoked manually with `ruff check`.
[tool.ruff]
extend-include = ["bin/ramble"]
extend-exclude = [
"lib/ramble/external",
"lib/ramble/spack",
"lib/ramble/llnl",
]
[tool.ruff.lint]
preview = true
# B905 requires Python 3.9 or up.
ignore = ["B905"]
extend-select = ["B", "C4", "F401"]
[tool.ruff.lint.per-file-ignores]
"lib/ramble/ramble/*kit.py" = ["F403"]
"var/ramble/repos/**/*.py" = ["F403", "F405"]