-
Notifications
You must be signed in to change notification settings - Fork 2
/
pyproject.toml
130 lines (117 loc) · 5 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
[tool.poetry]
name = "digiplan"
version = "1.1.0"
description = "Digiplan"
authors = [
"Hendrik Huyskens <[email protected]>",
"Marie-Claire Gering <[email protected]>",
"Josephine Stolle <[email protected]>",
"Josefine Hoppe <[email protected]>",
"Finn Hees <[email protected]>",
"Jonathan Amme <[email protected]>",
]
[tool.poetry.dependencies]
python = ">=3.9,<3.12"
gunicorn = "^20.0.4" # 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"
crispy-bootstrap5 = "^0.6"
jsonschema = "^2.5"
sentry-sdk = "^1.17.0"
# Django
# ------------------------------------------------------------------------------
django = "^3.2.20" # pyup: < 3.0 # https://www.djangoproject.com/
django-environ = "^0.10.0" # https://github.com/joke2k/django-environ
django-allauth = "^0.44.0" # https://github.com/pennersr/django-allauth
django-foundation-formtags = "^0.1.0"
django-compressor = "^2.4.1" # https://github.com/django-compressor/django-compressor
django-libsass = "^0.8"
django-redis = "^4.12.1" # https://github.com/niwinz/django-redis
django-distill = "^2.6"
django-crispy-forms = "^1.11.2"
django-geojson = "^3.1.0"
# Custom apps
# ------------------------------------------------------------------------------
django-oemof = {git = "https://github.com/rl-institut/django-oemof.git", rev = "v0.18.0"}
django-mapengine = {git = "https://github.com/rl-institut/django-mapengine.git", tag="v0.18.3"}
geojson = "^3.0.1"
oemof-network = "0.5.0a1"
oemof-tabular = {git = "https://github.com/oemof/oemof-tabular.git", rev = "0b17194eedf4940aa3abdbdb53cdcddb81880d12"}
[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 = "^0.9.4" # https://github.com/Frozenball/pytest-sugar
# Code quality
# ------------------------------------------------------------------------------
flake8 = "^5.0.4" # 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 = "^2.13.0" # https://github.com/pre-commit/pre-commit
darglint = "^1.8.1"
black = "^21.12b0"
# 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
]