-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
129 lines (116 loc) · 4.78 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
[tool.poetry]
name = "empowerplan"
version = "1.1.2"
description = "EmPowerPlan"
authors = [
"Hendrik Huyskens <hendrik.huyskens@rl-institut.de>",
"Marie-Claire Gering <marie-claire.gering@rl-institut.de>",
"Josephine Stolle <josephine.stolle@rl-institut.de>",
"Josefine Hoppe <josefine.hoppe@rl-institut.de>",
"Finn Hees <finn.hees@rl-institut.de>",
"Jonathan Amme <jonathan.amme@rl-institut.de>",
]
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
gunicorn = "^22.0.0" # https://github.com/benoitc/gunicorn
rcssmin = "^1.0.6" # https://github.com/ndparker/rcssmin
argon2-cffi = "^20.1.0" # https://github.com/hynek/argon2_cffi
whitenoise = "^5.2.0" # https://github.com/evansd/whitenoise
redis = "^4.5.3" # https://github.com/antirez/redis
psycopg2 = "^2.8.6" # https://github.com/psycopg/psycopg2
coreapi = "^2.3.3" # https://github.com/core-api/python-clientgeojson = "^2.5.0"
jsonschema = "^2.5"
sentry-sdk = "^2.8.0"
# Django
# ------------------------------------------------------------------------------
django = "^4.2" # pyup: < 3.0 # https://www.djangoproject.com/
django-environ = "^0.10.0" # https://github.com/joke2k/django-environ
django-foundation-formtags = "^0.1.0"
django-compressor = "4.4" # https://github.com/django-compressor/django-compressor
django-libsass = "^0.8"
django-redis = "^4.12.1" # https://github.com/niwinz/django-redis
django-geojson = "^3.1.0"
# Custom apps
# -----------------------------------------------------------------------------poetry-
django-oemof = {git="https://github.com/rl-institut/django-oemof.git", tag="v0.18.1"}
django-mapengine = "2.2.10"
geojson = "^3.0.1"
oemof-network = "0.5.0a5"
django-template-partials = "^23.4"
django-cache-memoize = "^0.2.0"
django-markdownify = "^0.9.5"
md4mathjax = "^0.1.3"
[tool.poetry.group.dev.dependencies]
Werkzeug = "^2.0.1" # https://github.com/pallets/werkzeug
ipdb = "^0.13.7" # https://github.com/gotcha/ipdb
sphinx = "^5.3.0" # https://github.com/sphinx-doc/sphinx
sphinx-material = "^0.0.35"
m2r2 = "^0.3.3"
coverage = "^7.2.2"
django-coverage-plugin = "^3.0.0"
# Testing
# ------------------------------------------------------------------------------
# mypy = "^0.812" # https://github.com/python/mypy
pytest = ">=7.2.2" # https://github.com/pytest-dev/pytest
pytest-sugar = "^1.0.0" # https://github.com/Frozenball/pytest-sugar
# Code quality
# ------------------------------------------------------------------------------
flake8 = "^7.0.0" # https://github.com/PyCQA/flake8
pylint-django = "^2.3.0" # https://github.com/PyCQA/pylint-django # downgraded because https://github.com/PyCQA/pylint-django/issues/309
pre-commit = "^3.7.1" # https://github.com/pre-commit/pre-commit
darglint = "^1.8.1"
black = "^24.3"
# Django
# ------------------------------------------------------------------------------
django-debug-toolbar = "^3.2.1" # https://github.com/jazzband/django-debug-toolbar
django-extensions = "^3.1.3" # https://github.com/django-extensions/django-extensions
pytest-django = "^4.3.0" # https://github.com/pytest-dev/pytest-django
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 120
[tool.isort]
profile = "black"
[tool.ruff]
line-length = 120
select = ["ALL"]
exclude = [
"manage.py",
"digiplan/utils/ogr_layer_mapping.py",
"config/wsgi.py",
"digiplan/contrib/*",
"merge_local_dotenvs_in_dotenv.py",
"digiplan/utils/context_processors.py"
]
ignore = [
"I001", # Import block is un-sorted or un-formatted (done by isort)
"D203", # 1 blank line required before class docstring
"D212", # Multi-line docstring summary should start at the first line pydocstyle
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in classmethod
"ANN003", # Missing type annotation for `**kwargs`
"EM102", # Exception must not use an f-string literal, assign to variable first
"TRY003", # Avoid specifying long messages outside the exception class
"S101", # Use of `assert` detected
"UP007", # Use `X | Y` for type annotations
"B905", # `zip()` without an explicit `strict=` parameter
"FIX001", # Line contains FIXME
"FIX002", # Line contains TODO
"RET504", # Unnecessary variable assignment before `return` statement
"G004", # Logging statement uses f-string
"PD011", # Use `.to_numpy()` instead of `.values` (does not work out of the box)
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"UP038", # (non-pep604-isinstance)
]
fix = true
show-fixes = true
unfixable = ["UP007", "I001"]
[tool.ruff.per-file-ignores]
"tests/*" = [
"PLR2004", # Magic value used in comparison
"ANN201", # Missing return type annotation for public function
]
"*/__init__.py" = [
"D104", # Missing docstring in public package
]