-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
242 lines (209 loc) · 5.92 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
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
[tool.poetry]
name = "cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance"
version = "0.0.0"
description = "Cookiecutter Cruft Poetry Tox Pre Commit Ci Cd Instance"
authors = ["YOUR_FIRST_AND_LAST_NAME <action@github.com>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance"
homepage = "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance"
include = ["cookiecutter_cruft_poetry_tox_pre_commit_ci_cd_instance/py.typed"]
keywords = []
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python",
"Topic :: Software Development :: Libraries :: Python Modules",
]
#
[tool.poetry.build]
script = "build.py"
generate-setup-file = true
#
[tool.poetry.urls]
Changelog = "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance/releases"
[tool.poetry.dependencies]
python = "^3.8,<3.12"
# Monitoring and Observability
sentry-sdk = "^1.11.0"
structlog-sentry-logger = "^0.18.0"
#
# Jupyter Notebook
jupyter = "^1.0.0"
matplotlib = "^3.6.2"
#
#
# Type Checking and Data Validation
typeguard = "^2.13.3" # Runtime type checker; Note: Mypyc-compiled C-extensions also perform runtime type checking.
#
# Project-Specific
python-dotenv = "^0.21.0"
#
importlib-metadata = "^5.0.0"
rich = "^12.5.1"
typer = {extras = ["all"], version = ">=0.4,<0.7"}
#
[tool.poetry.group.dev.dependencies]
# Standardized Developer Workflow Orchestration
cruft = "^2.11.1" # Automated Cookiecutter template synchronization
# Type Checking and Data Validation
mypy = "^0.991" # Static type checker (includes Mypyc Python module to C-Extension compiler, enabled by standard Python type annotations)
# Testing
#
nbqa = "^1.5.3"
#
pytest = "^7.2.0"
#
pytest-benchmark = {extras = ["histogram"], version = "^4.0.0"}
#
pytest-cov = "^4.0.0"
pytest-emoji = "^0.2.0"
pytest-mock = "^3.10.0"
pytest-sugar = "^0.9.4"
pytest-xdist = "^3.0.2"
#
hypothesis = "^6.58.0"
#
#
mutmut = "^2.4.2"
#
xdoctest = {extras = ["all"], version = "^1.1.0"}
tox = "^3.27.1"
tox-wheel = "^1.0.0"
# Linting
## Code formatting
black = "^22.10.0" # see: https://black.readthedocs.io/en/stable/editor_integration.html
## Automation and management
pre-commit = "^2.20.0"
# CI/CD
tox-gh-actions = "^2.11.0"
# Documentation
darglint = "^1.8.1"
#
nodeenv = "^1.7.0" # ADR documentation Node dependency
#
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
emoji = "^2.2.0"
#
myst-parser = "^0.18.1"
pygments = "^2.13.0"
sphinx = "^5.3.0"
sphinx-autoapi = "^2.0.0"
sphinx-rtd-theme = "^1.1.1"
sphinxcontrib-confluencebuilder = "^1.9.0"
types-emoji = "^2.1.0.1" # PEP 561 compliant stub package for mypy
#
[tool.poetry.scripts]
"cookiecutter-cruft-poetry-tox-pre-commit-ci-cd-instance" = "cookiecutter_cruft_poetry_tox_pre_commit_ci_cd_instance.main:app"
#
#################################################################################
# Tooling configs #
#################################################################################
[tool.black]
line-length = 120
[tool.coverage.run]
branch = true
concurrency = ["multiprocessing"]
parallel = true
source = ["cookiecutter_cruft_poetry_tox_pre_commit_ci_cd_instance"]
[tool.coverage.report]
exclude_lines =[
"pragma: no cover",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
]
fail_under = 100
show_missing = true
skip_covered = true
[tool.cruft]
skip = [
".env",
".python-version",
"cookiecutter_cruft_poetry_tox_pre_commit_ci_cd_instance/__init__.py",
"docs/source/.env",
]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = false
fail-under = 0 # adjust `fail-under` value as quality standards permit
whitelist-regex = []
color = true
[tool.mypy]
disallow_untyped_defs = true
files = "**/*.py"
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_context = true
show_error_codes = true
#
[tool.pylint.messages_control]
disable = [
# Ignore errors resulting from Jupyter notebook-style programming
"invalid-name",
"redefined-outer-name",
"reimported",
"ungrouped-imports",
"wrong-import-order",
"wrong-import-position",
]
#
[tool.pytest.ini_options]
addopts = ["-rfsxX", "-l", "--tb=short", "--strict-markers", "-vv", "--emoji", "--xdoctest"]
xfail_strict = true
markers = [
"pure_python_only: mocker-based tests which are not compatible with compiled C extensions",
]
testpaths = ["tests",]
norecursedirs = [".*", "*.egg", "build", "dist",]
[tool.ruff]
line-length = 120
select = [
"F", # Pyflakes
"E", "W", # pycodestyle
"C90", # McCabe
"I", # isort
"UP", # pyupgrade
"PLC", "PLE", "PLR", "PLW", # Pylint
]
ignore = [
# pycodestyle:
"E501", # Line too long (covered by Black)
]
fix = true
# Group violations by containing file.
format = "grouped"
# By default, always show source code snippets.
show-source = true
# Assume Python 3.8
# Note: helps prevent breaking autofixes from, e.g., pyupgrade
target-version = "py38"
[tool.ruff.isort]
# Note: Ruff implicitly uses `profile = "black"`
combine-as-imports = true
[tool.ruff.mccabe]
# cyclomatic complexity (https://github.com/PyCQA/mccabe)
max-complexity = 10
[build-system]
requires = ["poetry-core>=1.0.0",
#
"mypy", "setuptools",
#
]
build-backend = "poetry.core.masonry.api"