-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
139 lines (124 loc) · 4.15 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
[tool.poetry]
name = "Sith"
version = "3"
description = "Le web Sith de l'AE"
authors = [
"Skia <skia@hya.sk>",
"klmp200 <antoine@bartuccio.fr>",
"Krophil <pierre.brunet@krophil.fr>",
"Maréchal <thgirod@hotmail.com>",
"Och <francescowitz68@gmail.com>",
"tleb <tleb@openmailbox.org>",
"Soldat <ryan-68@live.fr>",
"Nabos <gnikwo@hotmail.com>",
"Terre <jbaptiste.lenglet+git@gmail.com>",
"Lo-J <renaudg779@gmail.com>",
"Vial <robin.trioux@utbm.fr>"
]
documentation = "https://sith-ae.readthedocs.io/"
homepage = "https://ae.utbm.fr/"
license = "GPL-3.0-only"
[tool.poetry.dependencies]
python = "^3.12"
Django = "^4.2.14"
django-ninja = "^1.3.0"
django-ninja-extra = "^0.21.4"
Pillow = "^10.4.0"
mistune = "^3.0.2"
django-jinja = "^2.11"
cryptography = "^43.0.0"
django-phonenumber-field = "^8.0.0"
phonenumbers = "^8.13"
reportlab = "^4.2"
django-haystack = "^3.2.1"
xapian-haystack = "^3.0.1"
libsass = "^0.23"
django-ordered-model = "^3.7"
django-simple-captcha = "^0.6.0"
python-dateutil = "^2.8.2"
sentry-sdk = "^2.16.0"
Jinja2 = "^3.1"
django-countries = "^7.6.1"
dict2xml = "^1.7.3"
Sphinx = "^5" # Needed for building xapian
tomli = "^2.0.1"
django-honeypot = "^1.2.1"
# When I introduced pydantic-extra-types, I needed *right now*
# the PhoneNumberValidator class which was on the master branch but not released yet.
# Once it's released, switch this to a regular version.
pydantic-extra-types = { git = "https://github.com/pydantic/pydantic-extra-types.git", rev = "58db4b0" }
[tool.poetry.group.prod.dependencies]
# deps used in prod, but unnecessary for development
# The C extra triggers compilation against sytem libs during install.
# Removing it would switch psycopg to a slower full-python implementation
psycopg = {extras = ["c"], version = "^3.2.1"}
redis = {extras = ["hiredis"], version = "^5.0.8"}
[tool.poetry.group.prod]
optional = true
[tool.poetry.group.dev.dependencies]
# deps used for development purposes, but unneeded in prod
django-debug-toolbar = "^4.4.6"
ipython = "^8.26.0"
pre-commit = "^4.0.1"
ruff = "^0.6.9" # Version used in pipeline is controlled by pre-commit hooks in .pre-commit.config.yaml
djhtml = "^3.0.6"
faker = "^30.3.0"
rjsmin = "^1.2.2"
[tool.poetry.group.tests.dependencies]
# deps used for testing purposes
freezegun = "^1.5.1" # used to test time-dependent code
pytest = "^8.3.2"
pytest-cov = "^5.0.0"
pytest-django = "^4.9.0"
model-bakery = "^1.20.0"
[tool.poetry.group.docs.dependencies]
# deps used to work on the documentation
mkdocs = "^1.6.1"
mkdocs-material = "^9.5.40"
mkdocstrings = "^0.26.2"
mkdocstrings-python = "^1.12.0"
mkdocs-include-markdown-plugin = "^6.2.2"
[tool.poetry.group.docs]
optional = true
[tool.xapian]
version = "1.4.25"
[tool.ruff]
output-format = "concise" # makes ruff error logs easier to read
[tool.ruff.lint]
select = [
"A", # shadowing of Python builtins
"B",
"C4", # use comprehensions when possible
"DJ", # django-specific rules,
"E", # pycodestyle (https://docs.astral.sh/ruff/rules/#pycodestyle-e-w)
"ERA", # commented code
"F", # pyflakes (https://docs.astral.sh/ruff/rules/#pyflakes-f)
"FBT", # boolean trap
"FLY", # f-string instead of str.join
"FURB", # https://docs.astral.sh/ruff/rules/#refurb-furb
"I", # isort
"INT", # gettext
"PERF", # performance
"PLW", # pylint warnings (https://docs.astral.sh/ruff/rules/#pylint-pl)
"RUF", # Ruff specific rules
"SIM", # simplify (https://docs.astral.sh/ruff/rules/#flake8-simplify-sim)
"T100", # breakpoint()
"T2", # print statements
"TCH", # type-checking block
"UP008", # Use super() instead of super(__class__, self)
"UP009", # utf-8 encoding declaration is unnecessary
]
ignore = [
"DJ001", # null=True in CharField/TextField. this one would require a migration
"E501", # line too long. The rule is too harsh, and the formatter deals with it in most cases
"RUF012" # mutable class attributes. This rule doesn't integrate well with django
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE = "sith.settings"
python_files = ["tests.py", "test_*.py", "*_tests.py"]
markers = ["slow"]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"