-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
150 lines (130 loc) · 4.56 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
[tool.poetry]
name = "hpc-multibench"
version = "0.1.0"
description = "A tool to generate and run HPC batch computer jobs via Slurm from a YAML configuration file"
authors = ["EdmundGoodman <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/EdmundGoodman/hpc-multibench"
homepage = "https://edmundgoodman.github.io/hpc-multibench"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
hpc-multibench = "hpc_multibench.main:main"
[tool.poetry.dependencies]
python = "^3.10"
pydantic = "^2.6.1"
ruamel-yaml = "^0.18.6"
argparse = "^1.4.0"
uncertainties = "^3.1.7"
[tool.poetry.group.dev.dependencies]
pre-commit = "^2.20.0"
pre-commit-hooks = "^4.3.0"
# erdantic = "^1.0.2"
# pylint = "^3.1.0"
[tool.poetry.group.test.dependencies]
pytest = "^7.4.0"
coverage = "^7.2.7"
[tool.poetry.group.docs.dependencies]
mkdocs-material = "^9.1.18"
mkdocstrings = { extras = ["python"], version = "^0.20.0" }
# mike = "^1.1.2"
[tool.poetry.group.tui.dependencies]
textual = { extras = ["syntax"], version = "^0.51.0" }
textual-plotext = "^0.2.1"
tree-sitter-languages = "==1.10.2" # Pin for security, to avoid re-auditing
[tool.poetry.group.plot.dependencies]
matplotlib = "^3.8.3"
matplotlib-label-lines = "^0.7.0"
seaborn = "^0.13.2"
plotext = "^5.2.8"
pandas = "^2.2.1"
[tool.bandit]
exclude_dirs = [".venv/"]
skips = ["B101"]
[tool.black]
target-version = ["py310"]
[tool.isort]
profile = "black"
py_version = 310 # Latest supported, 311 is not
# src_paths = ["src/"] # This is not a supported keyword?
filter_files = true
[tool.mypy]
python_version = "3.10"
strict = true
ignore_missing_imports = true
implicit_reexport = true
warn_redundant_casts = true
warn_unused_ignores = true
# https://blog.wolt.com/engineering/2021/09/30/professional-grade-mypy-configuration/
disallow_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
show_error_codes = true
[[tool.mypy.overrides]]
module = "matplotlib.pyplot.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "plotext.*"
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "uncertainties.*"
ignore_missing_imports = true
[tool.ruff]
# Support Python 3.10+.
target-version = "py310"
src = ["src/", "tests/"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
### From https://github.com/jerry-git/pytest-split/blob/master/pyproject.toml
"ANN", # Type hints related, let mypy handle these.
"COM812", # "Trailing comma missing". If black is happy, I'm happy.
"E501", # "Line too long". If black is happy, I'm happy.
"EM101", # "Exception must not use a string literal, assign to variable first"
"EM102", # "Exception must not use an f-string literal, assign to variable first"
# "RET504", # "Unnecessary variable assignment before `return` statement"
"S101", # "Use of `assert` detected"
"SIM108", # "Use ternary operator ...". Ternary is harmful for readability in some cases.
"TRY003", # "Avoid specifying long messages outside the exception class"
# "D", # Docstrings related. We want to keep this to replace `pydocstyle`
"D203", # Disable incompatible docstring rules to avoid warnings
"D212", # "
### Edmund's preferences
"UP009", # "UTF-8 encoding declaration is unnecessary". Adding UTF-8 pragmas is best practice
"T201", # Allow print statements!
"ERA001", # Don't remove commented out code
"RUF012", # Remove for consistency with Textual types
"FIX002",
"TD", # Allow TODOs in code (controversial, I know...)
"INP001", # "Add an `__init__.py`". The `test` directory should be a namespace package (https://stackoverflow.com/a/8450858)!
"I", # Ignore import sorting, as we using `isort` instead, as it has more functionality
]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.vulture]
ignore_names = ["test_*", "fixture_*", "pytest_*"]
paths = ["src/", "tests/"]
exclude = [".venv/"]
min_confidence = 90
[tool.pytest.ini_options]
log_cli = true
log_cli_level = "DEBUG"
log_cli_format = "%(asctime)s %(levelname)s %(message)s"
log_cli_date_format = "%Y-%m-%d %H:%M:%S"
addopts = "--strict-markers"
markers = [
"integration: marks tests as medium size (deselect with '-m \"not integration\"')",
]
[tool.coverage.run]
branch = true
source = ["src/"]
omit = ["src/hpc-multibench/__main__.py"]
[tool.coverage.report]
# TODO: Revert this, but while hacking don't care about coverage...
# fail_under = 90
exclude_lines = ['if TYPE_CHECKING:', 'pragma: no cover']