-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
145 lines (124 loc) · 3.71 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
[tool.poetry]
name = "cookiecutter-cruft-poetry-tox-pre-commit-ci-cd"
version = "0.7.0"
description = "Standardized Python project creation and synchronization"
authors = ["Teo Zosa <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd"
homepage = "https://github.com/TeoZosa/cookiecutter-cruft-poetry-tox-pre-commit-ci-cd"
keywords = [
"Cookiecutter",
"Cruft",
"Dependabot",
"GitHub Actions",
"Poetry",
"Pre-commit",
"Python",
"Release Drafter",
"Tox"]
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",
]
# Dummy package for `pip install .` compatibility
packages = [
{ include = "{{cookiecutter.package_name}}", from = "{{cookiecutter.project_slug}}" },
]
[tool.poetry.dependencies]
python = "^3.8,<3.12"
# Project boilerplate synchronizer
cruft = "^2.15.0"
# Project cookiecutter dependencies
hypothesis = "^6.100.5"
python-dotenv = "^1.0.1"
importlib-metadata = "^7.1.0"
structlog-sentry-logger = "^1.4.0"
typer = {extras = ["all"], version = "^0.12.3"}
[tool.poetry.group.dev.dependencies]
# Type Checking and Data Validation
mypy = "^1.10" # Static type checker
# Testing
pytest = "^8.2.0"
pytest-benchmark = "^3.4.1"
pytest-cov = "^5.0.0"
pytest-emoji = "^0.2.0"
pytest-mock = "^3.14.0"
pytest-sugar = "^1.0.0"
pytest-xdist = "^3.6.1"
xdoctest = "^1.2.0"
tox = "^4.15.0"
# Linting
## Code formatting
black = "^24.4.2" # see: https://black.readthedocs.io/en/stable/editor_integration.html
## Automation and management
pre-commit = "^3.5.0"
# Documentation
darglint = "^1.8.1"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
emoji = "^2.11.1"
myst-parser = "^2.0.0"
pygments = "^2.18.0"
sphinx = "^7.1.2"
sphinx-autodoc-typehints = "^1.23.4"
sphinx-rtd-theme = "^2.0.0"
sphinxcontrib-apidoc = "^0.5.0"
types-emoji = "^2.1.0"
#################################################################################
# Tooling configs #
#################################################################################
[tool.black]
line-length = 120
[mypy]
ignore_missing_imports = true
pretty = true
show_column_numbers = true
show_error_context = true
show_error_codes = true
[tool.pytest.ini_options]
addopts = ["-rfsxX", "-l", "--tb=short", "--strict-markers", "-vv", "--emoji", "--xdoctest"]
xfail_strict = true
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"]
build-backend = "poetry.core.masonry.api"