-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
129 lines (116 loc) · 3.12 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
[project]
authors = [
{name = "Mikołaj Nowak", email = "[email protected]"},
]
dependencies = [
"click>=8.1.7",
"nats-py[nkeys]>=2.9.0",
"httpx>=0.27.2",
"msgspec>=0.18.6",
"pyyaml>=6.0.2",
"aiohttp>=3.10.10",
"pydantic>=2.9.1",
]
description = "Narzędzia Rowerowych Gmin"
license = {text = "Apache-2.0"}
name = "rowerowe_gminy"
readme = "README.md"
requires-python = ">=3.12"
version = "0.0.1"
[project.optional-dependencies]
all = ["rowerowe_gminy[scrap,geo]"]
api = [
"pyjwt>=2.9.0",
"fastapi[standard]>=0.115.6",
"faststream[nats,otel]>=0.5.33",
"rowerowe_gminy[db-common, otel]",
]
db = ["alembic>=1.13.2", "rowerowe_gminy[db-common]"]
db-common = ["SQLAlchemy>=2.0.34", "psycopg[binary]>=3.2.1"]
geo = [
"geopandas>=1.0.1",
"topojson>=1.9",
"rowerowe_gminy[geobase]",
]
geobase = [
"duckdb>=1.1.3",
"polyline>=2.0.2",
"geojson>=3.1.0",
"aiofiles>=24.1.0",
]
otel = [
"opentelemetry-distro>=0.48b0",
"opentelemetry-exporter-otlp>=1.27.0",
"opentelemetry-sdk>=1.28.2",
]
scrap = ["pandas>=2.2.2", "lxml>=5.3.0", "beautifulsoup4>=4.12.3"]
wha = [
"litestar[standard, opentelemetry]>=2.11.0",
"nats-py[nkeys]>=2.9.0",
"rowerowe_gminy[db-common, otel]",
]
wkk = [
"polyline>=2.0.2",
"beautifulsoup4>=4.12.3",
"rowerowe_gminy[db-common]",
"lxml>=5.3.0",
"types-lxml>=2024.9.16",
]
worker = [
"faststream[nats, otel]>=0.5.25",
"click>=8.1.7",
"nats-py[nkeys,aiohttp]>=2.9.0",
"rowerowe_gminy[geobase, otel]",
]
[build-system]
build-backend = "pdm.backend"
requires = ["pdm-backend"]
[tool.autopep8]
max_line_length = 120
[tool.pdm]
distribution = true
[tool.pdm.build]
includes = ["src/rg_app/"]
[tool.pdm.dev-dependencies]
dev = [
"ruff>=0.6.3",
"pyright>=1.1.382.post1",
]
[tool.pdm.scripts]
format = {cmd = "ruff format --check src tests"}
format-fix = {cmd = "ruff format src tests"}
lint = {cmd = "ruff check src tests"}
lint-fix = {cmd = "ruff check --fix src tests"}
pimp = {composite = ["lint-fix", "format-fix"]}
types = {cmd = "pyright"}
db-revision = {cmd = "cd src/rg_app/db && alembic revision --autogenerate"}
migrate-db = {cmd = "rg-db migrate postgresql+psycopg://postgres:postgres@localhost/postgres"}
migrate-nats = {cmd = "rg-nats-defs nats://localhost local --dev"}
mk-data = {composite = ["scripts/download_gml.py", "scripts/gml_to_json.py"]}
openapi = {cmd = "rg-api openapi -j -o openapi.json"}
_start-compose = {cmd = "docker compose up -d"}
start-compose = {composite = ["stop-compose", "_start-compose"]}
stop-compose = {cmd = "docker compose down"}
[project.scripts]
rg-api = "rg_app.api:__main__.main"
rg-db = "rg_app.db:__main__.main"
rg-geo = "rg_app.geo:__main__.main"
rg-nats-defs = "rg_app.nats_defs:__main__.main"
rg-scrapping = "rg_app.scrapping:__main__.main"
rg-wha = "rg_app.wha:__main__.main"
rg-wkk = "rg_app.wkk:__main__.main"
rg-worker = "rg_app.worker:__main__.main"
[tool.ruff]
line-length = 120
target-version = "py312"
[tool.ruff.lint]
extend-select = ["I001"]
fixable = ["ALL"]
[tool.pyright]
exclude = [
"**/__pycache__",
]
include = ["src", "tests"]
pythonPlatform = "Linux"
pythonVersion = "3.12"
reportMissingImports = "error"