Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
184 lines (165 loc) · 4.53 KB
/
Copy pathpyproject.toml
File metadata and controls
184 lines (165 loc) · 4.53 KB
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
[project]
name = "ocpdb"
version = "2.16.1"
description = "Open ChargePoint DataBase - aggregates EV charging station data from multiple sources."
requires-python = ">= 3.13"
dependencies = [
"gunicorn~=26.2.0",
"Flask~=3.1.3",
"Flask-Failsafe~=0.2.0",
"Flask-SQLAlchemy~=3.1.1",
"Flask-Celery-Helper~=1.1.0",
"Flask-Migrate~=4.1.0",
"Flask-CORS~=6.0.5",
"SQLAlchemy~=2.0.55",
"requests~=2.34.2",
"alembic~=1.20.1",
"lxml~=6.1.3",
"mercantile~=1.2.1",
"psycopg2-binary~=2.9.13",
"python-dotenv~=1.2.4",
"click~=8.5.0",
"pymysql~=1.2.3",
"pyyaml~=6.0.3",
"validataclass~=0.13.1",
"SQLAlchemy-Utc~=0.14.0",
"openpyxl~=3.1.5",
"pycountry~=26.2.16",
"ngram~=4.0.3",
"geopy~=2.5.0",
"celery~=5.6.3",
"kombu~=5.6.2",
"mapbox-vector-tile~=2.2.0",
"urllib3~=2.8.0",
# binary butterfly shared libraries (https://git.binary-butterfly.de/public_libraries)
# flask-openapi and butterfly_pubsub are served from the private index (see [tool.uv.sources]);
# validataclass-search-queries is published on PyPI.
"flask-openapi~=2.4.0",
"validataclass-search-queries~=0.6.1",
"butterfly_pubsub~=3.0.0",
"orjson~=3.13.0",
]
# Development and test dependencies (PEP 735 dependency group, installed by `uv sync`).
[dependency-groups]
dev = [
"pytest~=9.1.1",
"pytest-cov~=7.1.0",
"requests-mock~=1.12.1",
"ruff~=0.17.2",
"openapi-core~=0.23.1",
]
[tool.uv]
# This is a deployable application, not a distributable package, so uv should not
# try to build/install the project itself - only its dependencies.
package = false
# flask-openapi and butterfly_pubsub are only published on binary butterfly's private package
# index. The index is marked `explicit`, so it is consulted only for the packages that opt in via
# [tool.uv.sources] below; everything else (including validataclass-search-queries) resolves from
# PyPI. This avoids dependency-confusion between the two indexes.
[[tool.uv.index]]
name = "binary-butterfly"
url = "https://git.binary-butterfly.de/api/v4/groups/262/-/packages/pypi/simple"
explicit = true
[tool.uv.sources]
flask-openapi = { index = "binary-butterfly" }
butterfly_pubsub = { index = "binary-butterfly" }
[tool.pytest.ini_options]
minversion = 6.0
addopts = """
-ra
--import-mode=importlib
"""
python_files = [
"test_*.py",
"*_test.py",
"*Test.py"
]
python_classes = ["*Test"]
testpaths = [
"tests/unit",
"tests/integration"
]
# Ignore DeprecationWarnings in external libraries (because we can't do anything about them)
filterwarnings = [
"error",
"ignore::DeprecationWarning:dns.*",
"ignore::DeprecationWarning:kombu.*",
"ignore::DeprecationWarning:.*blinker.*",
"ignore::DeprecationWarning:.*pyparsing.*",
"ignore::DeprecationWarning:.*celery.*",
"ignore::DeprecationWarning:.*flask.testing",
"ignore::DeprecationWarning:.*werkzeug.urls.*",
]
[tool.ruff]
lint.select = [
"F", # pyflakes
"I", # isort
"S", # flake8-bandit
"ASYNC", # flake8-async
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"INP", # flake8-no-pep420 (missing __init__.py)
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"TID", # flake8-tidy-imports
"FLY", # flynt (use f-string instead of static join)
]
# Enable preview rules since a lot of basic pycodestyle rules are in preview mode for some reason
preview = true
lint.ignore = [
"B008", # do not perform function calls in argument defaults
"C901", # too complex
"ISC001", # single-line-implicit-string-concatenation - conflicts with formatter
]
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
line-length = 120
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"]
"tests/*" = [
# Allow assert
"S101",
# Ignore unsafe practices like hardcoded passwords
"S101", "S105", "S106",
# Don't require __init__.py files
"INP",
]
"migrations/*" = [
# Don't require __init__.py files
"INP",
]
"dev/*" = [
# Don't require __init__.py files
"INP",
# Allow print in helper scripts
"T201",
# Token URLs are no passwords
"S105",
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "single"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "single"