-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
208 lines (190 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
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
[build-system]
requires = [
"hatchling>=1.18",
] # TODO @davhofer: probably add some version constraints here
build-backend = "hatchling.build"
[project]
name = "py2spack"
authors = [{ name = "davhofer", email = "[email protected]" }]
readme = "README.md"
license = { text = "MIT" }
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: System :: Archiving :: Packaging",
"Topic :: Utilities",
"Typing :: Typed",
]
description = "Tool to create spack package definitions from distributable Python packages."
dynamic = ["version"]
dependencies = [
"packaging>=20",
"requests>=2.30",
"tomli>=1.2",
"cmake_parser>=0.9.2",
]
[project.optional-dependencies]
docs = [
"furo>=2021.10.0",
"linkify-it-py>=2.0",
"myst-parser>=4.0",
"sphinx>=7.4",
"sphinx-autodoc2>=0.5.0",
"sphinx-book-theme>=1.1",
"sphinx-rtd-theme>=2.0",
]
tests = ["pytest>=8.0", "pytest-cov>=5.0"]
[project.urls]
Home = "https://github.com/davhofer/py2spack/"
[project.scripts]
py2spack = "py2spack.cli:main"
[tool.hatch.version]
path = "src/py2spack/__init__.py"
[tool.ruff]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
line-length = 100
show-fixes = true
src = ["src"]
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = false
[tool.ruff.lint]
extend-safe-fixes = ["D", "TCH"]
extend-select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"I", # isort
"G", # flake8-logging-format
"N", # pep8-naming
"W", # pycodestyle-warning
"C4", # flake8-comprehensions
"C90", # mccabe
"D", # pydocstyle
"D213", # multi-line-summary-second-line (off by default in pydocstyle "google' convention)
"PT", # flake8-pytest-style
"TD", # flake8-todo
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"ERA", # eradicate
"FLY", # flynt
"ICN", # flake8-import-conventions
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
]
ignore = [
"TD003", # [missing-todo-link]
"T201", # [print]
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["py2spack"]
known-third-party = [
"packaging",
"requests",
"tomli",
"typing_extensions",
"cmake_parser",
]
lines-after-imports = 2
order-by-type = true
required-imports = ["from __future__ import annotations"]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"tests",
"local-folder",
]
[tool.ruff.lint.isort.sections]
tests = ["tests"]
[tool.ruff.lint.mccabe]
max-complexity = 12
#[tool.ruff.lint.per-file-ignores]
#"tests/**" = [
# "D", # pydocstyle
# "PLR2004", # [magic-value-comparison]
# "T10", # flake8-debugger
# "T20", # flake8-print
#]
[tool.ruff.lint.pycodestyle]
ignore-overlong-task-comments = true
max-doc-length = 88
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_defs = true
files = ["src"]
ignore_missing_imports = false
implicit_optional = false
implicit_reexport = false
install_types = true
namespace_packages = false
# pretty = true
python_version = "3.10"
show_column_numbers = true
show_error_codes = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
disallow_incomplete_defs = false
disallow_untyped_defs = false
ignore_missing_imports = true
module = ["spack.*", "cmake_parser"]
[tool.pytest.ini_options]
minversion = "6.0"
addopts = [
"-ra",
"--showlocals",
"--strict-markers",
"--strict-config",
]
testpaths = ["tests"]