-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpyproject.toml
executable file
·166 lines (149 loc) · 3.61 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
[build-system]
requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "django_virtual_models"
[project]
name = "django-virtual-models"
description = "Improve performance and maintainability with a prefetching layer in your Django / Django REST Framework project"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["django", "prefetch", "performance", "optimization"]
license = {file = "LICENSE"}
authors = [
{ name = "Flávio Juvenal (Vinta Software)", email = "[email protected]" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dependencies = [
"django >=3.2",
"djangorestframework >=3.13.1",
"typing-extensions >=4.3.0",
]
dynamic = ["version"]
[project.urls]
Homepage = "https://github.com/vintasoftware/django-virtual-models"
Documentation = "https://vintasoftware.github.io/django-virtual-models/"
[project.optional-dependencies]
doc = [
"mkdocs-material==8.5.6",
]
dev = [
"mypy ==1.3.0 ",
"autoflake >=2.1.1,<3.0.0",
"flake8 >=6.0.0,<7.0.0",
"black ==23.3.0",
"isort >=5.12.0,<6.0.0",
"pre-commit >=3.3.2,<4.0.0",
]
test = [
"pytest >=7.3.1,<8.0.0",
"pytest-cov[toml] >=4.1.0,<5.0.0",
"pytest-django >=4.5.2,<5.0.0",
"tox >=4.5.2,<5.0.0",
"model_bakery >=1.11.0,<2.0.0",
]
example = [
"django >= 3.2,<4.0",
"pyyaml >= 6.0,<7.0",
]
[tool.black]
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
| settings
| migrations
)/
)
'''
include = '\.pyi?$'
line-length = 100
target-version = ['py38']
[tool.isort]
profile = 'black'
known_django = 'django'
known_drf = 'rest_framework'
line_length = 100
sections = ['FUTURE', 'STDLIB', 'DJANGO', 'DRF', 'THIRDPARTY', 'FIRSTPARTY', 'LOCALFOLDER']
skip = ['./venv', './env', 'migrations']
[tool.bandit]
exclude_dirs = ["tests","settings"]
[tool.pytest.ini_options]
addopts = [
"--strict-config",
"--strict-markers",
]
xfail_strict = true
junit_family = "xunit2"
testpaths = [
"tests",
]
# filterwarnings = [
# "ignore::django.utils.deprecation.RemovedInDjango50Warning",
# ]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = {linux}-py{38,39,310,311}-django{32,40,41,42}
isolated_build = True
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311
[gh-actions:env]
OS =
ubuntu-latest: linux
DJANGO =
3.2: django32
4.0: django40
4.1: django41
4.2: django42
[testenv]
deps =
django32: django~=3.2
django40: django~=4.0
django41: django~=4.1
django42: django~=4.2
.[test]
commands =
coverage run -m pytest --basetemp={envtmpdir}
coverage xml
"""
[tool.coverage.run]
branch = true
omit = ["tests/*"]
[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
# Have to re-enable the standard pragma
'pragma: no cover',
# Don't complain if tests don't hit defensive assertion code:
'raise AssertionError',
'raise NotImplementedError',
# Don't complain if non-runnable code isn't run:
'if 0:',
'if __name__ == .__main__.:',
# Don't complain about abstract methods, they aren't run:
'@(abc\.)?abstractmethod',
]