forked from ansible/django-ansible-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
132 lines (115 loc) · 4.24 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
[project.urls]
Repository = "https://github.com/ansible/django-ansible-base"
[project]
name = "django-ansible-base"
authors = [
{name = "Red Hat, Inc.", email = "[email protected]"},
{name = "John Westcott IV", email = "[email protected]"},
]
description = "A Django app used by ansible services"
readme = "README.md"
requires-python = ">=3.9"
keywords = ["ansible", "django"]
license = {text = "Apache-2.0"}
classifiers = [
"Framework :: Django",
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version", "dependencies", "optional-dependencies"]
[tool.setuptools.packages.find]
include = ["ansible_base*"]
[tool.setuptools.dynamic]
dependencies = {file = ["requirements/requirements.in"]}
optional-dependencies.all = { file = [
"requirements/requirements_activitystream.in",
"requirements/requirements_authentication.in",
"requirements/requirements_api_documentation.in",
"requirements/requirements_rest_filters.in",
"requirements/requirements_channels.in",
"requirements/requirements_jwt_consumer.in",
"requirements/requirements_testing.in",
"requirements/requirements_redis_client.in",
] }
optional-dependencies.activitystream = { file = [ "requirements/requirements_activitystream.in" ] }
optional-dependencies.authentication = { file = [ "requirements/requirements_authentication.in" ] }
optional-dependencies.api_documentation = { file = [ "requirements/requirements_api_documentation.in" ] }
optional-dependencies.rest_filters = { file = [ "requirements/requirements_rest_filters.in" ] }
optional-dependencies.rbac = { file = [ "requirements/requirements_rbac.in" ] }
optional-dependencies.channel_auth = { file = [ "requirements/requirements_channels.in" ] }
optional-dependencies.jwt_consumer = { file = [ "requirements/requirements_jwt_consumer.in" ] }
optional-dependencies.testing = { file = [ "requirements/requirements_testing.in" ] }
optional-dependencies.redis_client = { file = [ "requirements/requirements_redis_client.in" ] }
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = 'setuptools.build_meta'
[tool.setuptools_scm]
version_scheme = "calver-by-date"
[tool.black]
line-length = 160
fast = true
skip-string-normalization = true
force-exclude = '''
.*/migrations/
'''
[tool.isort]
profile = "black"
line_length = 160
extend_skip = [ "ansible_base/authentication/migrations", "ansible_base/activitystream/migrations", "test_app/migrations" ]
[tool.flake8]
max-line-length = 160
extend-ignore = [ "E203" ]
exclude = [ 'ansible_base/*/migrations/*', 'test_app/migrations/*', '.tox', 'build']
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "test_app.settings"
addopts = "--strict-markers --reuse-db --migrations -vvv"
[tool.tox]
legacy_tox_ini = """
[tox]
min_version = 4.0
no_package = true
env_list =
check
py39
py310
py311
labels =
test = py39, py310, py311, check
lint = flake8, black, isort
[testenv]
deps =
-r{toxinidir}/requirements/requirements_all.txt
-r{toxinidir}/requirements/requirements_dev.txt
allowlist_externals = sh
commands = sh -c 'make postgres && pytest -n auto --cov=. --cov-report=xml:coverage.xml --cov-report=html --cov-report=json --cov-branch {env:ANSIBLE_BASE_PYTEST_ARGS} {env:ANSIBLE_BASE_TEST_DIRS:test_app/tests} {posargs}'
[testenv:check]
deps =
-r{toxinidir}/requirements/requirements_all.txt
commands = python3 manage.py check
[testenv:flake8]
deps =
flake8
Flake8-pyproject
commands = flake8 {posargs:.}
[testenv:black]
deps =
black
commands = black {posargs:.}
[testenv:isort]
deps =
isort
commands = isort {posargs:.}
"""
[tool.coverage.run]
omit = ["test_app/*", "manage.py"]
relative_files = true