-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
215 lines (198 loc) · 7.46 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
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.commitizen]
version = "5.0.0"
version_files = ["calcipy/__init__.py:^__version", "pyproject.toml:^version"]
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
enable_error_code = ["ignore-without-code", "possibly-undefined", "redundant-expr", "truthy-bool"]
extra_checks = true
files = ["calcipy", "tests"]
no_implicit_reexport = true
plugins = [
]
python_version = "3.9"
show_column_numbers = true
show_error_codes = true
strict_equality = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.poetry]
authors = ["Kyle King <dev.act.kyle@gmail.com>"]
classifiers = [
"Development Status :: 4 - Beta",
"Framework :: Pytest",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.9",
"Topic :: Software Development :: Libraries",
"Topic :: Utilities",
] # https://pypi.org/classifiers/
description = "Python package to simplify development"
documentation = "https://calcipy.kyleking.me"
keywords = ["calcipy_template"]
license = "MIT"
maintainers = []
name = "calcipy"
readme = "docs/README.md"
repository = "https://github.com/kyleking/calcipy"
version = "5.0.0"
[tool.poetry.dependencies]
python = "^3.9.13"
arrow = {optional = true, version = ">=1.3.0"} # tags
beartype = ">=0.19.0"
commitizen = {optional = true, version = ">=3.29.1"} # doc
corallium = ">=2.0.1"
griffe = {optional = true, version = ">=1.3.2"} # experimental
invoke = ">=2.2.0"
mkdocs = {optional = true, version = ">=1.6.1"} # doc
mkdocs-gen-files = {optional = true, version = ">=0.5.0"} # doc
mkdocs-material = {optional = true, version = ">=9.5.39"} # doc
mkdocstrings = {extras = ["python"], optional = true, version = ">=0.26.1"} # doc
mypy = {optional = true, version = ">=1.11.2"} # types
nox-poetry = {optional = true, version = ">=1.0.3"} # test
pymdown-extensions = {optional = true, version = ">=10.11.2"} # docs
pytest = {optional = true, version = ">=8.3.3"} # test
pytest-cov = {optional = true, version = ">=5.0.0"} # test
pytest-randomly = {optional = true, version = ">=3.15.0"} # test
pytest-watcher = {optional = true, version = ">=0.4.3"} # test
python-box = {optional = true, version = ">=7.2.0"} # ddict
pyyaml = {optional = true, version = ">=6.0.2"} # docs
ruff = {optional = true, version = ">=0.8.2"} # lint
semver = {optional = true, version = ">=3.0.2"} # experimental
virtualenv = {optional = true, version = ">=20.26.6"} # tags: nox. Prevents 'scripts' KeyError with Python 3.12
[tool.poetry.extras]
ddict = ["python-box"]
doc = [
"commitizen",
"mkdocs",
"mkdocs-gen-files",
"mkdocs-material",
"mkdocstrings",
"pymdown-extensions",
]
experimental = [
"griffe",
"semver",
]
lint = ["ruff"]
nox = ["nox-poetry", "virtualenv"]
tags = [
"arrow",
"pyyaml", # Required for get_doc_subdir
]
test = [
"pytest",
"pytest-cov",
"pytest-randomly",
"pytest-watcher",
]
types = ["mypy"]
[tool.poetry.group.dev.dependencies]
# pytest-benchmark = ">=3.4.1" # Provides the benchmark fixture
hypothesis = {extras = ["cli"], version = ">=6.112.4"} # Use CLI with: "poetry run hypothesis write calcipy.dot_dict.ddict"
pytest-asyncio = ">=0.24.0"
pytest-subprocess = ">=1.5.2"
syrupy = ">=4.7.2"
types-pyyaml = ">=6.0.12.20240917"
types-setuptools = ">=75.1.0.20240917"
[tool.poetry.scripts]
calcipy = "calcipy.scripts:start"
calcipy-docs = "calcipy.scripts:start_docs"
calcipy-lint = "calcipy.scripts:start_lint"
calcipy-pack = "calcipy.scripts:start_pack"
calcipy-tags = "calcipy.scripts:start_tags"
calcipy-test = "calcipy.scripts:start_test"
calcipy-types = "calcipy.scripts:start_types"
[tool.poetry.urls]
"Bug Tracker" = "https://github.com/kyleking/calcipy/issues"
"Changelog" = "https://github.com/kyleking/calcipy/blob/main/docs/docs/CHANGELOG.md"
[tool.pyright]
include = ["calcipy", "tests"]
pythonVersion = "3.9"
[tool.ruff]
# Docs: https://github.com/charliermarsh/ruff
# Tip: poetry run python -m ruff rule RUF100
line-length = 120
target-version = 'py39'
[tool.ruff.lint]
ignore = [
'ANN002', # Missing type annotation for `*args`
'ANN003', # Missing type annotation for `**kwargs`
'ANN401', # Dynamically typed expressions (typing.Any) are disallowed in `pop_key`
'BLE001', # Do not catch blind exception: `Exception`
'CPY001', # Missing copyright notice at top of file
'D203', # "1 blank line required before class docstring" (Conflicts with D211)
'D213', # "Multi-line docstring summary should start at the second line" (Conflicts with D212)
'DOC201', # PLANNED: finish updating docstrings for Returns
'DOC501', # Raised exception `RuntimeError` missing from docstring
'EM101', # Exception must not use a string literal, assign to variable first
'FIX001', # Line contains FIXME
'FIX002', # Line contains TODO
'FIX004', # Line contains HACK
'PLR0913', # Too many arguments in function definition (6 > 5)
'TC001', # Move application import `tail_jsonl.config.Config` into a type-checking block (Conflicts with Beartype)
'TC002', # Move third-party import `rich.console.Console` into a type-checking block (Conflicts with Beartype)
'TC003', # Move standard library import `argparse` into a type-checking block (Conflicts with Beartype)
'TD001', # Invalid TODO tag: `FIXME`
'TD002', # Missing author in TODO; try: `# TODO(<author_name>): ...`
'TD003', # Missing issue link on the line following this TODO
'TRY003', # Avoid specifying long messages outside the exception class
]
preview = true
select = ['ALL']
unfixable = [
'ERA001', # Commented out code
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = 'single'
[tool.ruff.lint.flake8-tidy-imports.banned-api]
'invoke.collection.Collection'.msg = 'Use calcipy.collection.Collection instead.'
'invoke.tasks.task'.msg = 'Use calcipy.cli.task instead.'
'typing.Callable'.msg = 'Use "from collections.abc" instead.'
'typing.Dict'.msg = 'Use "from __future__ import annotations"'
'typing.List'.msg = 'Use "from __future__ import annotations"'
'typing.Optional'.msg = 'Use "from __future__ import annotations"'
'typing.Protocol'.msg = 'Use "from beartype.typing" instead.'
[tool.ruff.lint.isort]
known-first-party = ['calcipy']
[tool.ruff.lint.per-file-ignores]
'./calcipy/../*.py' = [
'INP001', # File `/<>.py` is part of an implicit namespace package. Add an `__init__.py`.
]
'__init__.py' = [
'D104', # Missing docstring in public package
]
'scripts/*.py' = [
'INP001', # File `scripts/*.py` is part of an implicit namespace package. Add an `__init__.py`.
]
'scripts/check_imports.py' = [
'F401', # imported but unused; consider adding to __all__ or using a redundant alias
]
'tests/*.py' = [
'ANN001', # Missing type annotation for function argument
'ANN201', # Missing return type annotation for public function
'ANN202', # Missing return type annotation for private function `test_make_diffable`
'ARG001', # Unused function argument: `line`
'D100', # Missing docstring in public module
'D103', # Missing docstring in public function
'PLC2701', # Private name import `_<>` from external module
'PT004', # flake8-pytest-style: fixture does not return
'S101', # Use of `assert` detected
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.tomlsort]
all = true
in_place = true
sort_first = ["python"]
trailing_comma_inline_array = true