-
Notifications
You must be signed in to change notification settings - Fork 31
/
pyproject.toml
209 lines (172 loc) · 6.14 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
[project]
name = "django-tools"
dynamic = ["version"]
description = "miscellaneous tools for Django based projects"
license = {text = "GPL-3.0-or-later"}
readme = "README.md"
authors = [
{name = 'Jens Diemer', email = 'django-tools@jensdiemer.de'}
]
requires-python = ">=3.11"
dependencies = [
"django",
"colorlog", # https://github.com/borntyping/python-colorlog
"gunicorn", # https://github.com/benoimyproject.wsgitc/gunicorn
"icdiff", # https://github.com/jeffkaufman/icdiff
"pprintpp", # https://github.com/wolever/pprintpp
"bleach",
"bx_py_utils", # https://github.com/boxine/bx_py_utils
"bx_django_utils", # https://github.com/boxine/bx_django_utils
]
[project.optional-dependencies]
dev = [
"rich", # https://github.com/Textualize/rich/
"django-parler",
"beautifulsoup4",
"Pillow", # https://github.com/python-pillow/Pillow/
"django-debug-toolbar", # http://django-debug-toolbar.readthedocs.io/en/stable/changes.html
"manage_django_project", # https://github.com/jedie/manage_django_project
"tblib", # https://github.com/ionelmc/python-tblib
"pip-tools", # https://github.com/jazzband/pip-tools/
"tox", # https://github.com/tox-dev/tox
"coverage", # https://github.com/nedbat/coveragepy
"autopep8", # https://github.com/hhatto/autopep8
"pyupgrade", # https://github.com/asottile/pyupgrade
"flake8", # https://github.com/pycqa/flake8
"pyflakes", # https://github.com/PyCQA/pyflakes
"codespell", # https://github.com/codespell-project/codespell
"EditorConfig", # https://github.com/editorconfig/editorconfig-core-py
"pip-audit", # https://github.com/pypa/pip-audit
"mypy", # https://github.com/python/mypy
"twine", # https://github.com/pypa/twine
"typeguard", # https://github.com/agronholm/typeguard/
"pre-commit", # https://github.com/pre-commit/pre-commit
# https://github.com/akaihola/darker
# https://github.com/ikamensh/flynt
# https://github.com/pycqa/isort
# https://github.com/pygments/pygments
"darker[flynt, isort, color]",
"model_bakery", # https://github.com/model-bakers/model_bakery
"requests-mock",
"django-override-storage", # https://github.com/danifus/django-override-storage
# Work-a-round for: https://github.com/jazzband/pip-tools/issues/1866
# backports.tarfile is needed for python <3.12
'backports.tarfile', # via jaraco-context -> keyring -> twine
]
django41=["django>=4.1,<4.2"]
django42=["django>=4.2,<4.3"]
django51=["django>=5.1,<5.2"]
[project.urls]
Documentation = "https://github.com/jedie/django-tools/"
Source = "https://github.com/jedie/django-tools/"
[project.scripts]
django_tools_project = "django_tools_project.__main__:main"
[manage_django_project]
module_name="django_tools_project"
# Django settings used for all commands except test/coverage/tox:
local_settings='django_tools_project.settings.local'
# Django settings used for test/coverage/tox commands:
test_settings='django_tools_project.settings.tests'
[tool.cli_base]
version_module_name = "django_tools" # Used by update_readme_history()
[tool.cli_base.pip_audit]
requirements=["requirements.dev.txt"]
strict=true
require_hashes=true
ignore-vuln=[
# "CVE-2019-8341", # Jinja2: Side Template Injection (SSTI)
]
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm>=7.1"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["."]
include = ["django_tools*", "django_tools_project*"]
[tool.setuptools.dynamic]
version = {attr = "django_tools.__version__"}
[tool.darker]
src = ['.']
revision = "origin/main..."
line_length = 119
color = true
skip_string_normalization = true
diff = false
check = false
stdout = false
isort = true
lint = [
"flake8",
]
log_level = "INFO"
[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/config_files/#pyprojecttoml-preferred-format
atomic=true
profile='black'
skip_glob=['.*', '*/htmlcov/*','*/migrations/*']
known_first_party=['django_tools']
line_length=119
lines_after_imports=2
[tool.coverage.run] # https://coverage.readthedocs.io/en/latest/config.html#run
branch = true
parallel = true
concurrency = ["multiprocessing"]
source = ['.']
command_line = '-m django_tools_project test --shuffle --parallel --buffer'
[tool.coverage.report]
omit = ['.*', '*/tests/*', '*/migrations/*']
skip_empty = true
fail_under = 30
show_missing = true
exclude_lines = [
'if self.debug:',
'pragma: no cover',
'raise NotImplementedError',
'if __name__ == .__main__.:',
]
[tool.tox] # https://tox.wiki/en/latest/config.html#pyproject-toml
legacy_tox_ini = """
[tox]
isolated_build = True
envlist = py{312,311}-django{51,42,41}
skip_missing_interpreters = True
[testenv]
passenv = *
skip_install = true
commands_pre =
pip install -U pip
pip install -U pip-tools
django41: pip-sync requirements.django41.txt
django42: pip-sync requirements.django42.txt
django51: pip-sync requirements.django51.txt
commands =
django41: {envpython} -m coverage run --context='{envname}'
django42: {envpython} -m coverage run --context='{envname}'
django51: {envpython} -m coverage run --context='{envname}'
"""
[tool.mypy]
warn_unused_configs = true
ignore_missing_imports = true
allow_redefinition = true # https://github.com/python/mypy/issues/7165
show_error_codes = true
plugins = []
exclude = ['.venv', 'tests', 'migrations']
[manageprojects] # https://github.com/jedie/manageprojects
initial_revision = "53a7e85"
initial_date = 2023-04-10T19:08:56+02:00
cookiecutter_template = "https://github.com/jedie/cookiecutter_templates/"
cookiecutter_directory = "managed-django-project"
applied_migrations = [
"52669d0", # 2024-08-02T15:47:04+02:00
"3084867", # 2024-08-25T14:35:25+02:00
]
[manageprojects.cookiecutter_context.cookiecutter]
full_name = "Jens Diemer"
github_username = "jedie"
author_email = "django-tools@jensdiemer.de"
project_name = "django-tools"
package_name = "django_tools"
package_version = "0.55.0"
package_description = "miscellaneous tools for Django based projects"
package_url = "https://github.com/jedie/django-tools/"
license = "GPL-3.0-or-later"
_template = "https://github.com/jedie/cookiecutter_templates/"