-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
329 lines (291 loc) · 9.29 KB
/
pyproject.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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"
[project]
name = "firewheel"
dynamic = ["version"]
authors = [
{name = "FIREWHEEL Developers", email = "[email protected]"},
]
description = "FIREWHEEL is an experiment orchestration tool that assists a user in building, controlling, observing, and analyzing repeatable experiments of distributed network systems at any scale."
readme = "README.rst"
requires-python = ">=3.8"
keywords = [
"FIREWHEEL",
"Phenix",
"Sandia",
"Emulytics",
"emulation",
"distributed systems",
"emulation",
"experimentation",
"minimega",
]
license = {text = "Apache License (2.0)"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: Telecommunications Industry",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
"Topic :: Security",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Testing",
"Topic :: System :: Clustering",
"Topic :: System :: Distributed Computing",
"Topic :: System :: Emulators",
"Topic :: System :: Networking",
"Topic :: System :: Operating System",
]
dependencies = [
"minimega==2.9",
"colorama<=0.4.6",
"grpcio>=1.49.0,<=1.67.0",
"grpcio-tools>=1.49.0,<=1.69.0",
"Jinja2>=3.1.2,<=3.1.5",
"netaddr<=1.3.0,>=0.7.0",
"networkx>=2.3,<=3.4.2",
"protobuf>=5.0.0,<=5.29.3",
"ClusterShell<=1.9.2",
"pytest<=8.3.4",
"python-dotenv<=1.0.1",
"PyYAML<=6.0.2",
"qemu.qmp==0.0.3",
"rich>=13.6.0,<13.10",
"requests>=2.22.0,<=2.32.3",
"importlib_metadata>=3.6,<=8.5.0",
]
[project.optional-dependencies]
test = [
"tox<=4.23.2",
"coverage<=7.6.10",
"pytest-cov<=6.0.0",
]
format = [
"ruff==0.9.2", # Linting/formatting
"beautysh~=6.2.1", # Format/lint shell scripts
]
docs = [
"Sphinx",
"myst-nb",
"sphinx-rtd-theme>=1.2.0",
"sphinxcontrib-spelling",
"sphinx-copybutton",
"pyenchant",
"minimega",
"doc8",
"pip-licenses",
"sphinx-design",
]
dev = [
"firewheel[test,format,docs]",
"pre-commit",
]
[project.urls] # Optional
homepage = "https://www.sandia.gov/emulytics"
documentation = "https://sandialabs.github.io/firewheel/"
repository = "https://github.com/sandialabs/firewheel/"
issue_tracker = "https://github.com/sandialabs/firewheel/issues"
changelog = "https://sandialabs.github.io/firewheel/developer/changelog.html"
[project.scripts]
firewheel = "firewheel.cli.firewheel_cli:main"
mcg = "firewheel.control.utils.new_model_component:main"
prep_fw_tab_completion = "firewheel.cli.completion.prepare_completion_script:main"
get_fw_tab_completion_script = "firewheel.cli.completion.prepare_completion_script:print_completion_script_path"
[tool.setuptools.package-data]
# Required for tox documentation building
firewheel = ["firewheel.yaml"]
[tool.setuptools_scm]
[tool.doc8]
# Ignore line length errors. Our preferred format is to have single sentences
# on each line and to use the linewrap feature in a given text editor.
ignore = ["D001"]
[tool.mypy]
strict = true
disallow_any_unimported = true
show_traceback = true
pretty = true
python_version = "3.8"
new_type_inference = true
enable_error_code = ["ignore-without-code", "redundant-expr"]
show_error_code_links = true
disallow_untyped_calls = false
[[tool.mypy.overrides]]
module = [
"firewheel.lib.*",
"firewheel.tests.conftest",
]
disallow_untyped_defs = false
[[tool.mypy.overrides]]
module = "firewheel.lib.grpc.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.lib.discovery.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.lib.minimega.api"
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.control.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"firewheel.tests.functional.*",
"firewheel.tests.unit.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.vm_resource_manager.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.config.*"
ignore_errors = true
[[tool.mypy.overrides]]
module = "firewheel.cli.*"
ignore_errors = true
[tool.pytest.ini_options]
addopts = "--cov=src/ --cov-append --cov-report=term --cov-report=html --cov-fail-under=80"
[tool.coverage.run]
parallel = true
branch = true
source = ["firewheel"]
omit = [
"*/tests/functional/*",
"*/tests/conftest.py",
]
[tool.coverage.paths]
source = [
"src/firewheel",
".tox/*/lib/python*/site-packages/firewheel",
]
[tool.coverage.report]
show_missing = true
exclude_also = [
'if __name__ == .__main__.:',
# Omit `NotImplemented` code
'raise NotImplementedError',
]
[tool.ruff]
line-length = 88
indent-width = 4
# Assume Python 3.9
target-version = "py39"
extend-exclude = [
"test_*.py",
"firewheel_grpc_pb2*.py",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"W", # pycodestyle
"B", # flake8-bugbear
"I", # isort
"N", # pep8-naming
"D", # pydocstyle
"S", # flake8-bandit
"BLE", # flake8-blind-except
"A", # flake8-builtins
"LOG", # flake8-logging
"G", # flake8-logging-format
"RSE", # flake8-raise
"Q", # flake8-quotes
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"PLC", # Pylint Convention
"PLE", # Pylint Error
"PLR", # Pylint Refactor
"PLW", # Pylint Warning
"PERF", # Perflint
"DOC", # pydoclint
"RUF", # Ruff-specific rules
# "RET", # flake8-return
# "UP", # pyupgrade
# "PTH", # flake8-use-pathlib
# "TD", # flake8-todos
# "SIM", # flake8-simplify
# "DTZ", # flake8-datetimez
]
# We may want to adhere to D205 and D415 in the future.
ignore = [
"D100", # Missing docstring in public module
"D105", # Missing docstring in magic method
"D104", # Missing docstring in public package
"D200", # One-line docstring should fit on one line with quotes
"D202", # No blank lines allowed after function docstring
"D205", # 1 blank line required between summary line and description
"D212", # Multi-line docstring summary should start at the first line
"D415", # First line should end with a period, question mark, or exclamation point
"S403", # Ignore warnings about importing pickle
"S301", # suspicious-pickle-usage
"S603", # subprocess-without-shell-equals-true
"S404", # Ignore warnings about importing subprocess
"S311", # Ignore warnings about using random
"S608", # Ignore warning about possible SQL injection. SQL is not used in FIREWHEEL.
"PLW2901", # redefined-loop-name
"RUF100", # unused-noqa
"RUF012", # mutable-class-default
"PLR0904", # too-many-public-methods
"PLR0911", # too-many-return-statements
"PLR0912", # too-many-branches
"PLR0913", # too-many-arguments
"PLR0914", # too-many-locals
"PLR0915", # too-many-statements
"PLR1702", # too-many-nested-blocks
"PLR0917", # too-many-positional-arguments
"PLR2004", # magic-value-comparison
"PLR6301", # no-self-use
"DOC502", # docstring-extraneous-exception -- Has lots of false positives currently
"PERF203", # try-except-in-loop
"PERF401", # manual-list-comprehension
]
preview = true
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = false
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"
[tool.ruff.lint.pycodestyle]
max-doc-length = 120
max-line-length = 120
[tool.ruff.lint.isort]
length-sort = true
known-first-party = ["firewheel"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.flake8-bandit]
hardcoded-tmp-directory-extend = ["/scratch"]