generated from ITProKyle/generic-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
218 lines (196 loc) · 5.77 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
209
210
211
212
213
214
215
216
217
218
[tool.poetry]
name = "f-cli"
version = "0.0.0"
authors = ["Kyle Finley <[email protected]>"]
classifiers = [
"Environment :: Console",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
]
description = "CLI created by Kyle Finley, for Kyle Finley."
documentation = "https://f-cli.readthedocs.io"
homepage = "https://f-cli.readthedocs.io"
keywords = ["cli"]
license = "Apache-2.0"
maintainers = []
packages = [
{include = "f_cli"},
]
readme = "README.md"
repository = "https://github.com/finleyfamily/f-cli"
[tool.poetry.dependencies]
python = "^3.12"
click = "^8.1.7"
f-lib = "^0.4.2"
rich = "^13.7.1"
rich-click = "^1.8.3"
[tool.poetry.group.dev.dependencies]
pre-commit = "^4.0.1"
[tool.poetry.group.docs.dependencies]
doc8 = "^1.1.2"
furo = "^2024.8.6"
sphinx = "^8.1.3"
sphinx-autobuild = "^2024.10.3"
sphinx-click = "^6.0.0"
sphinx-copybutton = "^0.5.2"
sphinx-design = "^0.6.1"
sphinxcontrib-apidoc = "^0.5.0"
sphinxcontrib-jquery = "^4.1"
sphinxcontrib-programoutput = "^0.17"
[tool.poetry.group.lint.dependencies]
black = "^24.10.0"
ruff = "^0.8.4"
[tool.poetry.group.test.dependencies]
coverage = "^7.6.9"
pytest = "^8.3.4"
pytest-cov = "^6.0.0"
pytest-mock = "^3.14.0"
pytest-sugar = "^1.0.0"
pytest-xdist = "^3.6.1"
[tool.poetry.scripts]
f = "f_cli._cli.main:cli"
[[tool.poetry.source]]
name = "PyPI"
priority = "primary"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/finleyfamily/f-lib/issues"
[tool.black]
force-exclude = '''
/(
\.eggs
| \.git
| \.venv
| _build
| build
| dist
| node_modules
)/
'''
include = '\.pyi?$'
line-length = 88
target-version = ["py312"]
[tool.coverage.report]
exclude_lines = [
"@overload",
"cov: ignore", # standard exclude comment
"if TYPE_CHECKING:", # excluded blocks
"if __name__ == .__main__.:",
"raise AssertionError", # defensive exceptions
"raise NotImplementedError",
]
fail_under = 95 # TODO (kyle): raise to 100
precision = 2
show_missing = true
[tool.coverage.run]
branch = false # not correctly reported - https://github.com/nedbat/coveragepy/issues/605
omit = [
"*/__main__.py",
"*/type_defs.py",
]
[tool.doc8]
ignore = [
"D001", # Line too long
]
[tool.poetry-dynamic-versioning] # poetry self add "poetry-dynamic-versioning[plugin]"
bump = true
enable = true
fix-shallow-repository = true
metadata = false
strict = true
style = "pep440"
[tool.pyright]
exclude = [
"**/.eggs",
"**/.git",
"**/.venv",
"**/__pycache__",
"**/docs",
"**/node_modules",
"**/typings",
]
pythonPlatform = "All"
pythonVersion = "3.12"
reportDuplicateImport = "none"
reportImportCycles = "none"
reportIncompatibleMethodOverride = "warning"
reportMissingTypeStubs = "none"
reportPrivateUsage = "none"
reportUnknownMemberType = "none"
reportUnnecessaryIsInstance = "warning"
reportUnnecessaryTypeIgnoreComment = "error"
reportUnusedImport = "none"
reportUnusedVariable = "none"
strictParameterNoneValue = false
typeCheckingMode = "strict"
useLibraryCodeForTypes = true
venv = ".venv"
[tool.pytest.ini_options]
addopts = [
"--cov-config=pyproject.toml",
]
filterwarnings = [
"ignore::pytest_mock.PytestMockWarning",
]
markers = [
"wip: isolate tests currently being worked on.",
]
python_classes = ["Test*"]
python_files = ["test_*.py"]
python_functions = ["test_*"]
testpaths = ["tests"]
[tool.ruff] # https://docs.astral.sh/ruff/settings/#top-level
force-exclude = true
line-length = 120
show-fixes = true
target-version = "py312"
[tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint
ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"COM812", # Trailing comma missing
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"D215", # Section underline is over-indented
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D408", # Section underline should be in the line following the section's name
"D409", # Section underline should match the length of its name
"ERA001", # Found commented-out code # NOTE (kyle): incorrectly detects cspell
"FIX002", # Line contains TODO
"TD003", # Missing issue link on the line following this TODO
"TID252", # Relative imports from parent modules are banned
]
select = ["ALL"]
[tool.ruff.lint.extend-per-file-ignores] # https://docs.astral.sh/ruff/settings/#lintextend-per-file-ignores
"*.py" = [
"PYI024", # Use `typing.NamedTuple` instead of `collections.namedtuple` - should only apply to pyi
]
"tests/*" = [
"FBT001", # Boolean positional arg in function definition - this is fine here
"FBT003", # Boolean positional value in function call - this is fine here
"PT004", # Fixture does not return anything, add leading underscore
"S101", # Use of `assert` detected - this is fine here
"S108", # Probable insecure usage of temporary file or directory
"S604", # Function call with `shell=True` parameter identified - this is fine here
"SLF001", # Private member accessed - fine in tests
]
[tool.ruff.lint.pydocstyle] # https://docs.astral.sh/ruff/settings/#lintpydocstyle
convention = "google"
[tool.ruff.lint.pylint] # https://docs.astral.sh/ruff/settings/#lintpylint
allow-magic-value-types = ["bytes", "int", "str"]
max-args = 15
max-returns = 10
[tool.tomlsort]
all = true
in_place = true
sort_first = ["tool", "tool.poetry"]
spaces_before_inline_comment = 2
trailing_comma_inline_array = true
overrides."tool.poetry".first = ["name", "version"]
overrides."tool.poetry.dependencies".first = ["python"]
[build-system]
build-backend = "poetry_dynamic_versioning.backend"
requires = ["poetry-core", "poetry-dynamic-versioning>=1.2.0,<2.0.0"]