-
Notifications
You must be signed in to change notification settings - Fork 3
/
pyproject.toml
154 lines (136 loc) · 3.96 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
authors = [
{email = "thomas@gibfest.dk"},
{name = "Thomas Steen Rasmussen"}
]
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
]
dependencies = [
"demoji==1.1.0",
"Django==5.1.3",
"django-allauth[socialaccount]==65.2.0",
"django-bootstrap5==24.3",
"django-cors-headers==4.6.0",
"django-decorator-include==3.2",
"django-filter==24.3",
"django-guardian==2.4.0",
"django-htmx==1.21.0",
"django-ninja==1.3.0",
"django-oauth-toolkit==3.0.1",
"django-pictures==1.3.3",
"django-polymorphic==3.1.0",
"django-stubs-ext==5.1.1",
"django-tables2==2.7.0",
"django-taggit==6.1.0",
"environs[django]==11.1.0",
"fontawesomefree==6.6.0",
"orjson==3.10.11",
"psycopg2-binary==2.9.10",
]
name = "bma"
description = "BornHack Media Archive Django project"
readme = "README.md"
requires-python = ">=3.11"
dynamic = ["version"]
[project.scripts]
"manage.py" = "bma.manage:main"
[project.optional-dependencies]
dev = [
"pre-commit==4.0.1",
"setuptools_scm==8.1.0",
]
test = [
"beautifulsoup4==4.12.3",
"coverage==7.6.5",
"django-debug-toolbar==4.4.6",
"factory-boy==3.3.1",
"pytest-django==4.9.0",
"pytest-cov==6.0.0",
"pytest-randomly==3.16.0",
"tox==4.23.2",
]
[project.urls]
homepage = "https://github.com/bornhack/bma"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
[tool.ruff]
target-version = "py311"
extend-exclude = [
".git",
"__pycache__",
"*/migrations/*.py"
]
lint.select = ["ALL"]
lint.ignore = [
"G004", # https://docs.astral.sh/ruff/rules/logging-f-string/
"ANN101", # https://docs.astral.sh/ruff/rules/missing-type-self/
"ANN102", # https://docs.astral.sh/ruff/rules/missing-type-cls/
"EM101", # https://docs.astral.sh/ruff/rules/raw-string-in-exception/
"EM102", # https://docs.astral.sh/ruff/rules/f-string-in-exception/
"COM812", # missing-trailing-comma (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"ISC001", # single-line-implicit-string-concatenation (https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules)
"ARG001", # https://docs.astral.sh/ruff/rules/unused-function-argument/
"ARG002", # https://docs.astral.sh/ruff/rules/unused-method-argument/
"ARG004", # https://docs.astral.sh/ruff/rules/unused-static-method-argument/
]
line-length = 120
[tool.ruff.lint.isort]
force-single-line = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"tests.py" = [
"S101", # https://docs.astral.sh/ruff/rules/assert/
"PLR2004", # https://docs.astral.sh/ruff/rules/magic-value-comparison/
"PT009", # https://docs.astral.sh/ruff/rules/pytest-unittest-assertion/
"S106", # https://docs.astral.sh/ruff/rules/hardcoded-password-func-arg/
"PLR0912", # https://docs.astral.sh/ruff/rules/too-many-branches/
"C901", # https://docs.astral.sh/ruff/rules/complex-structure/
]
"*/migrations/*" = [
"D" # https://docs.astral.sh/ruff/rules/#pydocstyle-d
]
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "bma.settings"
python_files = ["tests.py"]
log_cli = 1
log_cli_level = "DEBUG"
filterwarnings = [
"error",
# https://github.com/vitalik/django-ninja/issues/1093
"ignore::DeprecationWarning",
]
[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 = "bma.settings"
[tool.mypy_django_plugin]
ignore_missing_model_attributes = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py311
skipsdist = True
[testenv]
changedir = src/
deps =
pytest
pytest-cov
pytest-randomly
-e.[test]
commands = pytest --cov=. --cov-report=xml --cov-report=html
"""