-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
175 lines (153 loc) · 4.58 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
[tool.poetry]
name = "sentry-dynamic-sampling-controller"
version = "0.1.0"
description = "This project aims to provide dynamic sampling without relying on Sentry Dynamic Sampling."
authors = ["jeanloup.monnier <[email protected]>"]
readme = "README.md"
packages = [{ include = "controller" }]
[tool.poetry.dependencies]
python = "^3.9"
Django = "^4.2.0"
django-admin-action-tools = "1.1.6-alpha.3"
djangorestframework = "^3.14.0"
gunicorn = "^20.1.0"
psycopg2-binary = "^2.9.5"
redis = "^4.3.5"
gevent = "^22.10.2"
django-object-actions = "^4.1.0"
django-better-admin-arrayfield = "^1.4.2"
django-json-widget = "^1.1.1"
mozilla-django-oidc = "^3.0.0"
django-durationwidget2 = "^1.0.6"
pytest = "^7.2.1"
pytest-django = "^4.5.2"
pytest-xdist = "^3.1.0"
undecorated = "^0.3.0"
django-health-check = "^3.17.0"
celery = "^5.2.7"
sentry-dynamic-sampling-lib = "^1.2.0-alpha.2"
# sentry-dynamic-sampling-lib = { path = "../sentry-dynamic-sampling-lib/", develop = true }python = "^3.9"
sentry-sdk = "^1.25"
django-nonrelated-inlines = "^0.2"
python-dateutil = "^2.8.2"
django-vendor-files = "^0.3"
requests = "^2.29.0"
[tool.poetry.group.dev.dependencies]
bandit = "^1.7.4"
black = "^23.0.0"
coverage = "^7"
parameterized = "^0.9.0"
pre-commit = "^3.0.0"
pylama = "^8.4.1"
pylint = "^2.15.6"
pylint-django = "^2.5.3"
tblib = "^1.7.0"
toml = "^0.10.2"
numpy = "^1.24.2"
matplotlib = "^3.6.3"
pytest-xdist = "^3.2.0"
sphinx = "^5"
sphinxcontrib-django = "^2.0"
sphinxcontrib-httpdomain = "^1.8.1"
sphinxcontrib-mermaid = "^0.9"
sphinx-rtd-theme = "^1.2.0"
m2r2 = "^0.3"
mistune = "0.8.4"
sphinx-nested-apidoc = "^1.2.2"
mypy = "^1.3"
django-stubs = { extras = ["compatible-mypy"], version = "^4.2" }
# see https://github.com/klen/pylama/issues/232
pydocstyle = "6.1.1"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.black]
exclude = '''
(
/(
\.git
|\.tox
|migrations
)/
)
'''
include = '\.pyi?$'
line-length = 119
[tool.pylama]
format = "pycodestyle"
linters = "pycodestyle,pyflakes,pylint,mccabe,eradicate,pydocstyle"
max_line_length = 119
skip = ".pytest_cache,.venv/*,*/migrations/*,tests/*,*/tests/*,docs/*,manage.py,config.py"
[tool.pylama.linter.pycodestyle]
max_line_length = 119
ignore = "E203"
[tool.pylama.linter.pydocstyle]
convention = "google"
[tool.pylama.linter.pylint]
disable = "W0108,W0511,W0602,W0603,W0703,C0206,C0209,C0114,C0115,C0116,R0903,R0913,R0914,R0901,E1101,E1130,E1136,W0212"
load-plugins = "pylint_django"
django-settings-module = "controller.settings"
# Ignored rules:
# - W0108: Lambda may not be necessary
# - W0511: fixme, todo
# - W0602: global-variable-not-assigned
# - W0603: global-statement
# - W0703: Catching too general exception
# - C0114: missing-module-docstring
# - C0115: missing-class-docstring
# - C0116: missing-function-docstring
# - C0206: consider-using-dict-items
# - C0209: consider-using-f-string
# - R0903: too-few-public-methods
# - R0913: too-many-arguments
# - R0914: too-many-locals
# - R0901: max-parents: Maximum number of parents for a class
# - E1101: generated-members
# List of members which are set dynamically and missed by pylint inference system,
# and so shouldn't trigger E1101 when accessed.
# - E1130: invalid-unary-operand-type
# Emitted when a unary operand is used on an object which does not support this type of operation.
# - E1136: unsubscriptable-object
# Value '%s' is unsubscriptable Emitted when a subscripted value doesn't support subscription
# - W0212: protected-access: Access to a protected member of a client class
[tool.coverage.run]
command_line = "-m pytest"
relative_files = true
omit = [
'*/apps.py',
'*/tests/*',
'*/settings.py',
'*/migrations/*',
"controller/urls.py",
"controller/wsgi.py",
"controller/celery.py",
]
source = ["controller"]
branch = true
[tool.coverage.report]
fail_under = 100
omit = [
'*/apps.py',
'*/tests/*',
'*/settings.py',
'*/migrations/*',
"controller/urls.py",
"controller/wsgi.py",
"controller/celery.py",
]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "controller.settings"
addopts = "--doctest-modules -ra -l --tb=short --show-capture=all --color=yes --create-db"
markers = ["admin_site"]
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
check_untyped_defs = false
disallow_untyped_defs = false
ignore_missing_imports = true
python_version = "3.9"
show_error_codes = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.django-stubs]
django_settings_module = "controller.settings"