-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathpyproject.toml
More file actions
187 lines (160 loc) · 4.7 KB
/
pyproject.toml
File metadata and controls
187 lines (160 loc) · 4.7 KB
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
########## METADATA ##########
[project]
name = "bornhack-website"
description = "Django project to power Bornhack."
readme = "README.md"
requires-python = ">=3.11"
dynamic = ["version"]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
########## DEPENDENCIES ##########
dependencies = [
"Django==5.2.11",
"channels==4.3.2",
"channels-redis==4.3.0",
"commonmark==0.9.1",
"conference-scheduler==3.0.1",
"django-allauth[mfa]==65.14.0",
"django-bootstrap5==26.1",
"django-colorfield==0.14.0",
"django-cors-headers==4.9.0",
"django-filter==25.2",
"django-leaflet==0.33.0",
"django-jsonview==2.0.0",
"django-otp==1.7.0",
"django-oauth-toolkit==3.2.0",
"django-prometheus==2.4.1",
"django-reversion==6.1.0",
"django_stubs_ext==5.2.9",
"django-tables2==2.8.0",
"django-taggit==6.1.0",
"django-weasyprint==2.4.0",
"icalendar==6.3.2",
"irc3==1.1.10",
"lxml==6.0.2",
"nh3==0.3.2",
"openpyxl==3.1.5", # used to import excel files in economy backoffice
"pandas==3.0.0",
"psycopg2-binary==2.9.11",
"python-magic==0.4.27",
"quickpay-api-client==2.0.1",
"Unidecode==1.4.0",
# pillow is only here to make old migrations run
"Pillow==12.1.0",
"weasyprint==68.1",
]
[project.optional-dependencies]
bootstrap = [
"factory_boy==3.3.3",
]
dev = [
"bornhack-website[bootstrap]",
"bornhack-website[test]",
"django-debug-toolbar==6.2.0",
"pipdeptree==2.30.0",
"pre-commit==4.5.1",
"setuptools_scm==9.2.2",
]
test = [
"bornhack-website[bootstrap]",
"pytest==9.0.2",
"pytest-xdist==3.8.0",
"pytest-django==4.11.1",
"beautifulsoup4==4.14.3",
"coverage==7.13.3",
"hypothesis==6.151.5",
"tblib==3.2.2", # used to see backtraces in unit tests
"unittest-xml-reporting==4.0.0",
]
[project.urls]
homepage = "https://github.com/bornhack/bornhack-website"
[project.scripts]
"manage.py" = "src.manage:main"
########## SETUPTOOLS ##########
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
########## RUFF ##########
[tool.ruff]
target-version = "py311"
extend-exclude = [
".git",
"__pycache__",
]
line-length = 120
[tool.ruff.lint]
select = ["ALL"]
ignore = [
"G004", # Logging statement uses f-string
"ANN002", # *args annotations
"ANN003", # **kwargs annotations
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ARG002", # Unused method argument
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use a f-string literal, assign to variable first
]
[tool.ruff.lint.per-file-ignores]
"**/test*.py" = [
"ARG", # Unused function args -> fixtures nevertheless are functionally relevant...
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"PLR2004", # Magic value used in comparison, ...
"ANN001", # Missing type annotation for function argument ...
"ANN201", # Missing return type annotation for public function ...
"S101", # Allow use of assert
"S105", # Allow PASSWORD as password in tests
"S106", # Allow passwords in tests
"S113", # Probable use of requests call without timeout
"E501", # Line too long
"D104", # Missing docstring in public package
"D415", # First line should end with a period
"SLF001", # Private member accessed
"PLR", # Magic value used in comparison
"N", # PEP naming conventions
]
"**/migrations/*.py" = [
"C405", # Unnecessary list literal
"D", # https://docs.astral.sh/ruff/rules/#pydocstyle-d
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
[tool.ruff.lint.isort]
force-single-line = true
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.pydocstyle]
convention = "google"
########## MYPY ##########
[tool.mypy]
plugins = [
"mypy_django_plugin.main"
]
mypy_path = "src"
ignore_missing_imports = true
disallow_subclassing_any = false
strict = true
[tool.django-stubs]
django_settings_module = "bornhack.settings"
[tool.mypy_django_plugin]
ignore_missing_model_attributes = true
########## COVERAGE.PY ##########
[tool.coverage.run]
omit = [
"*/tests.py",
"*/tests/test_*.py",
"*/migrations/*.py",
]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING",
]
############ PYTEST ############
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "bornhack.settings"
python_files = "tests.py test_*.py"
pythonpath = ". src"