-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
132 lines (111 loc) · 3.06 KB
/
Copy pathpyproject.toml
File metadata and controls
132 lines (111 loc) · 3.06 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "sparkmeter"
dynamic = ["version"]
description = "Sparkmeter"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"python-dotenv",
"uv",
"zope.component",
"future",
"packaging",
# Sentry. Both extras are needed: FlaskIntegration captures errors
# raised in the WSGI-mounted Flask app; FastApiIntegration covers
# the native FastAPI routes.
"sentry-sdk[flask,fastapi]",
# Flask
"flask",
"flask-babel",
"flask-bootstrap",
"flask-login",
"flask-security-too",
"flask-wtf",
"itsdangerous",
"wtforms",
"wtforms-sqlalchemy",
"bcrypt",
"werkzeug",
# general web
"requests",
"httpx",
# Structures raw metering-provider SSE event dicts into the local
# dataclasses in sparkmeter/metering/legacy_event_models.py.
"cattrs",
# AWS S3 — used by the historical-data feature in sparkmeter/history/.
"boto3",
# SQL
"psycopg2-binary",
"alembic",
"sqlalchemy",
"flask-sqlalchemy",
# ASGI / FastAPI
"fastapi",
"hypercorn",
"a2wsgi",
# gRPC contract for the optional meter-driver profile. The generated
# stubs come from the meter-driver-spec package (pinned to a spec tag),
# not from local codegen; protobuf/grpcio are their runtime.
"meter-driver-spec @ https://github.com/EarthSpark/meter-driver-spec/releases/download/v1.4.0/meter_driver_spec-1.4.0-py3-none-any.whl",
"protobuf",
"grpcio",
# sparkmeter.config.provider_settings catches pydantic.ValidationError
# raised by the meter-driver-spec models, so pydantic is a dependency of
# this package and not only of meter-driver-spec.
"pydantic",
"click",
# dates and times
"python-dateutil",
# phone numbers
"phonenumbers",
# data vizualization
"numpy",
"pandas",
"vincent",
# Translation
"babel",
"speaklater",
]
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.version]
source = "vcs"
# uv's build isolation invokes hatch-vcs from a temp directory that
# doesn't contain `.git/`. Without this, setuptools-scm fails with
# "unable to detect version" even though `.git` exists in the build
# context. `search-parent-directories` makes scm walk up to find it.
raw-options.search_parent_directories = true
[tool.hatch.build.hooks.vcs]
version-file = "sparkmeter/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["sparkmeter"]
[dependency-groups]
dev = [
"pytest>=7.0",
"pytest-cov",
"pytest-mock",
"pytest-xdist",
"pytest-asyncio",
"filelock",
"factory-boy",
"freezegun",
"httmock",
"testfixtures",
"html5lib",
"ruff>=0.15.21",
"pydocstyle",
"pre-commit",
"pyopenapi-gen",
"pytest-diagnose @ git+https://github.com/tescalada/pytest-diagnose.git",
"pytest-randomly>=4.1.0",
]
[tool.ruff]
line-length = 110
extend-exclude = ["test-data"]
[tool.ruff.lint]
select = ["F", "I"]
[tool.ruff.lint.isort]
known-first-party = ["sparkmeter"]