-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
171 lines (151 loc) · 3.59 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
[build-system]
requires = [
"phosphorus>=0.8",
]
build-backend = "phosphorus.construction.api"
[project]
name = "yamk"
dynamic = [
"version",
]
authors = [
{ name = "Stephanos Kuma", email = "[email protected]" },
]
license = { text = "BSD-3-Clause" }
readme = "docs/README.md"
description = "Yet another make"
keywords = [
"make",
"build",
"cli",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: BSD License",
"Intended Audience :: Developers",
"Topic :: Software Development :: Build Tools",
]
requires-python = ">=3.9"
dependencies = [
"dj_settings~=6.0",
"pyutilkit~=0.10",
]
[project.urls]
homepage = "https://yamk.readthedocs.io/en/stable/"
repository = "https://github.com/spapanik/yamk"
documentation = "https://yamk.readthedocs.io/en/stable/"
[project.scripts]
yamk = "yamk.__main__:main"
yam = "yamk.__main__:main"
[tool.phosphorus.dev-dependencies]
dev = [
"ipdb~=0.13",
"ipython~=8.18",
]
lint = [
"black~=24.10",
"mypy~=1.13",
"ruff~=0.8",
"typing-extensions~=4.12", # upgrade: py3.10: use typing module
]
test = [
"pytest~=8.3",
"pytest-cov~=6.0",
]
docs = [
"mkdocs~=1.6",
"mkdocs-material~=9.5",
"mkdocs-material-extensions~=1.3",
"pygments~=2.18",
"pymdown-extensions~=10.12",
]
[tool.phosphorus.dynamic]
version = { file = "src/yamk/__version__.py" }
[tool.black]
target-version = [
"py39",
]
[tool.mypy]
check_untyped_defs = true
disallow_any_decorated = true
disallow_any_explicit = true
disallow_any_expr = false # many builtins are Any
disallow_any_generics = true
disallow_any_unimported = true
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
extra_checks = true
ignore_missing_imports = true
no_implicit_reexport = true
show_column_numbers = true
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unused_configs = true
warn_unused_ignores = true
warn_unreachable = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_any_decorated = false # mock.MagicMock is Any
[tool.ruff]
src = [
"src",
]
target-version = "py39"
[tool.ruff.lint]
select = [
"ALL",
]
ignore = [
"C901", # Adding a limit to complexity is too arbitrary
"COM812", # Avoid magic trailing commas
"D10", # Not everything needs a docstring
"D203", # Prefer `no-blank-line-before-class` (D211)
"D213", # Prefer `multi-line-summary-first-line` (D212)
"E501", # Avoid clashes with black
"PLR09", # Adding a limit to complexity is too arbitrary
]
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"FBT001", # Test arguments are handled by pytest
"PLR2004", # Tests should contain magic number comparisons
"S101", # Pytest needs assert statements
]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"
[tool.ruff.lint.flake8-tidy-imports.banned-api]
"mock".msg = "Use unittest.mock"
"pytz".msg = "Use zoneinfo"
[tool.ruff.lint.isort]
combine-as-imports = true
forced-separate = [
"tests",
]
split-on-trailing-comma = false
[tool.pytest.ini_options]
addopts = "-ra -v"
testpaths = "tests"
[tool.coverage.run]
branch = true
source = [
"src/",
]
data_file = ".cov_cache/coverage.dat"
omit = [
"src/yamk/lib/types.py",
]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
fail_under = 90
precision = 2
show_missing = true
skip_covered = true
skip_empty = true