-
Notifications
You must be signed in to change notification settings - Fork 122
/
Copy pathpyproject.toml
227 lines (196 loc) · 5.06 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "relate-courseware"
version = "2024.1"
description = "RELATE courseware"
authors = [{ name = "Andreas Kloeckner", email = "inform@tiker.net" }]
requires-python = ">=3.10,<4"
readme = "README.rst"
license = "MIT"
dependencies = [
"django>=5.1.5,<6",
"django-crispy-forms>=1.13.0",
"crispy-bootstrap5~=2024.10",
"jsonfield>=1.4.0",
"django-yamlfield",
"markdown~=3.7",
"minijinja>=2.7.0,<3",
"pymbolic>=2024.2.2",
"sympy>=1.13.3",
"pyyaml>=6.0.2",
"dulwich>=0.22.6,<0.23",
"paramiko>=3.5.1",
"slixmpp>=1.8.3,<2",
"docker>=7.1.0,<8",
"pygments>=2.6.1,<3",
"unicodecsv>=0.14.1,<0.15",
"pysaml2>=7.4.2,<8",
"djangosaml2>=1.7.0,<2",
"attrs>=19",
"python-memcached~=1.59",
"celery>=5.2.2,<6",
"kombu>=5.4.2,<6",
"django-celery-results>=2.4.0,<3",
"django_select2>=8.2.1,<9",
"bleach~=6.2",
"html5lib~=1.1",
"pytools>=2024.1.8",
"colorama>=0.4.6",
"cryptography>=3.2.1",
"social-auth-app-django>=5.4.1,<6",
"urllib3>=2.3.0,<3",
]
[project.optional-dependencies]
postgres = ["psycopg2>=2.9.10,<3"]
memcache = ["pylibmc>=1.6.0,<2"]
[project.urls]
Repository = "/~https://github.com/inducer/relate"
Documentation = "https://documen.tician.de/relate/"
[project.scripts]
relate = "relate.bin.relate:main"
[dependency-groups]
dev = [
"factory_boy>=3.3.1,<4",
"ruff>=0,<1",
"django-stubs[compatible-mypy]==5.1.*",
"pytest>=8,<9",
"pytest-django>=4.5.2,<5",
"pytest-factoryboy>=2.6.0,<3",
"pytest-pudb>=0.7,<0.8",
"safety>=3.2.11,<4",
"sphinx>=8.1.3,<9",
"furo>=2024.8.6,<2025",
"sphinx-copybutton>=0.5.2,<0.6",
"django-upgrade>=1.22.1,<2",
"pyright>=1,<2",
"types-bleach>=6.2.0,<7",
"types-paramiko>=3.5.0,<4",
"types-Markdown~=3.7",
"types-PyYAML>=6.0.12,<7",
"numpy~=2.1",
"yamllint>=1.32.0,<2",
]
[tool.uv]
[tool.uv.sources]
django-yamlfield = { git = "/~https://github.com/bakatrouble/django-yamlfield.git", rev = "c92d0373d12a02d1e52fb09b44010f156111d7ea" }
[tool.hatch.build.targets.sdist]
include = [
"course",
"accounts",
"relate",
]
[tool.hatch.build.targets.wheel]
include = [
"course",
"accounts",
"relate",
]
[tool.ruff]
preview = true
target-version = "py310"
exclude = ["contrib/jupyterlite"]
[tool.ruff.lint]
extend-select = [
"B", # flake8-bugbear
"C", # flake8-comprehensions
"E", # pycodestyle
"F", # pyflakes
"I", # flake8-isort
"N", # pep8-naming
"NPY", # numpy
"Q", # flake8-quotes
"W", # pycodestyle
"RUF",
"UP",
# "DJ",
]
extend-ignore = [
"C90", # McCabe complexity
"E221", # multiple spaces before operator
"E226", # missing whitespace around arithmetic operator
"E241", # multiple spaces after comma
"E242", # tab after comma
"E402", # module level import not at the top of file
"N818", # error suffix in exception names
# TODO
"B904", # raise in except needs from
"B028", # stacklevel
"RUF012", # mutable class atttributes
"UP031", # %-format
]
allowed-confusables = ["‐", "–"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.ruff.lint.per-file-ignores]
"course/mdx_mathjax.py" = ["N802"]
# config file, no type annotations, avoid scaring users
"local_settings_example.py" = ["I002"]
# copy-pasted from elsewhere, not our problem
"saml-config/attribute-maps/*.py" = ["Q", "E231", "W292", "W291", "E501", "I002"]
# mostly generated
"*/migrations/*.py" = ["Q", "E501", "RUF012", "F401", "I002", "UP"]
# TODO
"tests/**/*.py" = ["F841", "RUF012"]
[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2
required-imports = ["from __future__ import annotations"]
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
strict_optional = true
ignore_missing_imports = true
disallow_untyped_calls = "true"
# wishful thinking :)
# disallow_untyped_defs= "true"
show_error_codes = true
untyped_calls_exclude = [
"dulwich",
]
[tool.django-stubs]
django_settings_module = "relate.settings"
strict_settings = false
[[tool.mypy.overrides]]
module = [
"course.migrations.*",
]
ignore_errors = true
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "relate.settings"
python_files = [
"tests.py",
"test_*.py",
"*_tests.py",
]
markers = [
"slow: marks tests as slow (run with '--slow')",
"postgres: mark test as postgres specific",
]
[tool.typos.default]
extend-ignore-re = [
"(?Rm)^.*(#|//)\\s*spellchecker:\\s*disable-line"
]
[tool.typos.default.extend-words]
# opps as in 'grading opportunities'
opps = "opps"
# fre, short for flow rule exception
fre = "fre"
# short for 'stipulation'
stip = "stip"
# as in documen.tician.de
documen = "documen"
# like sur_name in SAML
sur = "sur"
[tool.typos.files]
extend-exclude = [
"locale/**/*.po",
# migrations reflect the past, don't attempt to alter them.
"*/migrations/**/*.py",
# not ours
"saml-config/**/*.py",
"contrib/jupyterlite/mamba-root",
]
# vim: foldmethod=marker