-
Notifications
You must be signed in to change notification settings - Fork 54
/
pyproject.toml
184 lines (160 loc) · 5.4 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
[build-system]
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name = "sp_repo_review"
authors = [
{ name = "Henry Schreiner", email = "[email protected]" },
]
description = "Review repos for compliance to the Scientific-Python development guidelines"
requires-python = ">=3.10"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Environment :: WebAssembly :: Emscripten",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"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",
"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]",
]
test = [
"pytest >=7",
"repo-review >=0.10.6",
]
dev = [
"pytest >=7",
]
pyproject = [
"validate-pyproject-schema-store[all]",
]
[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.entry-points."pipx.run"]
sp-repo-review = "repo_review.__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"
[project.entry-points."repo_review.fixtures"]
workflows = "sp_repo_review.checks.github:workflows"
dependabot = "sp_repo_review.checks.github:dependabot"
precommit = "sp_repo_review.checks.precommit:precommit"
readthedocs = "sp_repo_review.checks.readthedocs:readthedocs"
ruff = "sp_repo_review.checks.ruff:ruff"
[project.entry-points."repo_review.families"]
scikit-hep = "sp_repo_review.families:get_families"
[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.ini_options]
minversion = "7.0"
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
log_cli_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.
]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"I", # isort
"ARG", # flake8-unused-arguments
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ICN", # flake8-import-conventions
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"PTH", # flake8-use-pathlib
"RET", # flake8-return
"RUF", # Ruff-specific
"SIM", # flake8-simplify
"TID251", # flake8-tidy-imports.banned-api
"T20", # flake8-print
"UP", # pyupgrade
"YTT", # flake8-2020
]
ignore = [
"PLR", # Design related pylint codes
"PT004", # Incorrect check, usefixtures is the correct way to do this
"RUF012", # Would require a lot of ClassVar's
]
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"typing.Callable".msg = "Use collections.abc.Callable instead."
"typing.Iterator".msg = "Use collections.abc.Iterator instead."
"typing.Mapping".msg = "Use collections.abc.Mapping instead."
"typing.Sequence".msg = "Use collections.abc.Sequence instead."
"typing.Set".msg = "Use collections.abc.Set instead."
"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"]
[tool.repo-review]
ignore = ["RTD103"]