-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
152 lines (137 loc) · 4.36 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
[tool.poetry]
name = "cookiecutter-cruft-poetry-tox-pre-commit-ci-cd"
version = "0.1.0"
description = "SonoSim CorSAIR-standardized Python project creation and synchronization"
authors = ["Teo Zosa <teo@sonosim.com>"]
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.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"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"
# Project boilerplate synchronizer
cruft = "^2.6.1"
# Project cookiecutter dependencies
hypothesis = "^6.2.0"
python-dotenv = "^0.15.0"
importlib-metadata = "^3.7.3"
structlog-sentry-logger = "^0.7.3"
typer = {extras = ["all"], version = "^0.3.2"}
# Documentation
myst-parser = { version = "^0.13.5", optional = true}
pygments = { version = "^2.8.1", optional = true}
sphinx = { version = "^3.5.2", optional = true}
sphinx-autodoc-typehints = { version = "^1.11.1", optional = true}
sphinx-rtd-theme = { version = "^0.5.1", optional = true}
sphinxcontrib-apidoc = { version = "^0.3.0", optional = true}
sphinxcontrib-confluencebuilder = { version = "^1.3.0", optional = true}
[tool.poetry.dev-dependencies]
# Testing
pytest = "^6.2.1"
pytest-benchmark = {extras = ["histogram"], version = "^3.2.3"}
pytest-cov = "^2.10.1"
pytest-emoji = "^0.2.0"
pytest-mock = "^3.5.1"
pytest-sugar = "^0.9.4"
pytest-xdist = "^2.2.1"
icontract = "^2.4.1"
xdoctest = "^0.15.0"
tox = "^3.21.4"
# Code formatter
# see: https://black.readthedocs.io/en/stable/editor_integration.html
black = "^20.8b1"
# Linters
flakehell = "^0.9.0"
pylint = "^2.6.2"
# Static type checker
mypy = "^0.800"
# Linting & formatting orchestrator
pre-commit = "^2.10.1"
# Documentation
darglint = "^1.5.8"
[tool.poetry.extras]
docs = [
"myst-parser",
"pygments",
"sphinx",
"sphinx-autodoc-typehints",
"sphinx-rtd-theme",
"sphinxcontrib-apidoc",
"sphinxcontrib-confluencebuilder",
]
#################################################################################
# Tooling configs #
#################################################################################
[tool.flakehell]
# specify any flake8 options
exclude = [".*"] # Ignore dotfiles
# make output nice
format = "grouped"
# show line of source code in output
show_source = true
# list of plugins and rules for them
[tool.flakehell.plugins]
# cyclomatic complexity (https://github.com/PyCQA/mccabe)
mccabe = ["+*"]
# include everything in pyflakes except F401
pyflakes = ["+*", "-F401"]
# include everything in pycodestyle except what Black covers
pycodestyle = ["+*",
"-E203", # Whitespace before ":"
"-E501", # Line too long (82 > 78 characters)
"-W503" # Line break occurred before a binary operator <- this is now considered best practice by PEP 8
]
[tool.isort]
profile = "black"
atomic = "true"
combine_as_imports = true
[tool.pylint.basic]
good-names-rgxs = ["^Test_.*$"]
[tool.pylint.messages_control]
disable = [
# Explicitly document only as needed
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
# Black & Flake8 purview
"line-too-long",
"bad-continuation",
"c-extension-no-member",
]
[tool.pylint.similarities]
# Ignore imports when computing similarities.
ignore-imports = "yes"
[tool.pytest.ini_options]
addopts = ["-rfsxX", "-l", "--tb=short", "--strict-markers", "-vv", "--emoji", "--xdoctest"]
xfail_strict = "true"
testpaths = ["tests",]
norecursedirs = [".*", "*.egg", "build", "dist",]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"