-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (176 loc) · 5.69 KB
/
pyproject.toml
File metadata and controls
201 lines (176 loc) · 5.69 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
190
191
192
193
194
195
196
197
198
199
200
201
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "sp_repo_review"
authors = [
{ name = "Henry Schreiner", email = "henryfs@princeton.edu" },
]
description = "Review repos for compliance to the Scientific-Python development guidelines"
requires-python = ">=3.10"
license = "BSD-3-Clause"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: WebAssembly :: Emscripten",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
"Typing :: Typed",
]
dynamic = ["version", "readme"]
dependencies = [
"pyyaml",
"repo-review",
"tomli; python_version<'3.11'",
]
[project.optional-dependencies]
cli = [
"repo-review[cli]",
]
pyproject = [
"validate-pyproject-schema-store[all]",
]
all = [
"sp-repo-review[cli,pyproject]",
]
[project.urls]
Guide = "https://learn.scientific-python.org/development"
Homepage = "https://github.com/scientific-python/cookie"
Preview = "https://scientific-python-cookie.readthedocs.io"
Source = "https://github.com/scientific-python/cookie"
[project.scripts]
sp-repo-review = "repo_review.__main__:main"
"sp-ruff-checks" = "sp_repo_review.ruff_checks.__main__:main"
[project.entry-points."repo_review.checks"]
general = "sp_repo_review.checks.general:repo_review_checks"
pyproject = "sp_repo_review.checks.pyproject:repo_review_checks"
precommit = "sp_repo_review.checks.precommit:repo_review_checks"
ruff = "sp_repo_review.checks.ruff:repo_review_checks"
mypy = "sp_repo_review.checks.mypy:repo_review_checks"
github = "sp_repo_review.checks.github:repo_review_checks"
readthedocs = "sp_repo_review.checks.readthedocs:repo_review_checks"
setupcfg = "sp_repo_review.checks.setupcfg:repo_review_checks"
noxfile = "sp_repo_review.checks.noxfile:repo_review_checks"
[project.entry-points."repo_review.fixtures"]
dependabot = "sp_repo_review.checks.github:dependabot"
noxfile = "sp_repo_review.checks.noxfile:noxfile"
precommit = "sp_repo_review.checks.precommit:precommit"
pytest = "sp_repo_review.checks.pyproject:pytest"
readthedocs = "sp_repo_review.checks.readthedocs:readthedocs"
ruff = "sp_repo_review.checks.ruff:ruff"
setupcfg = "sp_repo_review.checks.setupcfg:setupcfg"
workflows = "sp_repo_review.checks.github:workflows"
[project.entry-points."repo_review.families"]
scikit-hep = "sp_repo_review.families:get_families"
[dependency-groups]
dev = [
{ include-group = "test" },
{ include-group = "cog" },
"repo-review[cli]",
"validate-pyproject-schema-store[all]",
]
test = [
"pytest >=9",
"repo-review >=0.10.6",
]
cog = [
"cogapp",
"cookiecutter",
"tomlkit",
]
[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "src/sp_repo_review/_version.py"
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
start-after = "<!-- sp-repo-review -->"
[tool.pytest]
minversion = "9.0"
addopts = ["-ra"]
strict = true
log_level = "INFO"
filterwarnings = [
'error',
]
norecursedirs = ['{{cookiecutter.project_name}}']
testpaths = ["tests"]
[tool.mypy]
mypy_path = ["src"]
files = ["src", "tests"]
python_version = "3.10"
warn_unused_configs = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
[[tool.mypy.overrides]]
module = "sp_repo_review.*"
disallow_untyped_defs = true
disallow_incomplete_defs = true
[tool.pylint]
master.py-version = "3.10"
master.ignore-paths= ["src/sp_repo_review/_version.py"]
reports.output-format = "colorized"
similarities.ignore-imports = "yes"
messages_control.disable = [
"design",
"fixme",
"line-too-long",
"wrong-import-position",
"redefined-builtin",
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"invalid-name",
"redefined-outer-name",
"no-member", # better handled by mypy, etc.
"arguments-differ", # better handled by mypy, etc.
]
[tool.ruff]
show-fixes = true
extend-exclude = ["\\{\\{cookiecutter.project_name\\}\\}"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"A002", # Okay for arguments to shadow builtins
"A004", # Okay for imports to shadow builtins (like print)
"COM812", # Trailing commas teach the formatter
"D", # Docstrings
"E501", # Line too long
"FBT", # Boolean args fine
"N", # Naming
"PLR", # Design related pylint codes
"RUF012", # Would require a lot of ClassVar's
"S101", # Assert is used by mypy and pytest
"S310", # Okay to open URL
"TID252", # Relative imports are fine
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"importlib.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead."
"importlib.resources.abc".msg = "Use sp_repo_review._compat.importlib.resources.abc instead."
[tool.ruff.lint.per-file-ignores]
"src/sp_repo_review/_compat/**.py" = ["TID251"]
"src/sp_repo_review/checks/*.py" = ["ERA001"]
"tests/**" = ["ANN", "INP001", "S607"]
"helpers/**" = ["INP001", "FIX004"]
"helpers/extensions.py" = ["ANN"]
[tool.repo-review.ignore]
RTD103 = "Using Ruby instead of Python for docs"
[tool.typos.default.extend-words]
nd = "nd"
sur = "sur"
CPY = "CPY"