-
-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (122 loc) · 3.51 KB
/
pyproject.toml
File metadata and controls
141 lines (122 loc) · 3.51 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
# --- PROJECT CONFIGURATION --- #
[build-system]
requires = ["setuptools>=69", "wheel", "setuptools-git-versioning>=1.13.3"]
build-backend = "setuptools.build_meta"
# Metadata (see https://peps.python.org/pep-0621/)
[project]
name = "quartz-api"
dynamic = ["version"] # Set automatically using git: https://setuptools-git-versioning.readthedocs.io/en/stable/
description = "Quartz API for wind and solar data"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.11.0, <3.14"
license = {text = "MIT License"}
authors = [
{ name = "Sol Cotton", email = "sol@openclimatefix.org"},
{ name = "Open Climate Fix", email = "info@openclimatefix.org"}
]
classifiers = ["Programming Language :: Python :: 3"]
dependencies = [
"cryptography >= 41.0.0",
"dp-sdk",
"fastapi>=0.105.0",
"pvsite-datamodel == 1.2.3",
"pyjwt >= 2.8.0",
"pyproj >= 3.3.0",
"pytz >= 2023.3",
"uvicorn >= 0.24.0",
"numpy >= 1.25.0",
"sentry-sdk >= 2.1.1",
"pyhocon>=0.3.61",
"sqlalchemy>=2.0.44",
"apitally[fastapi]>=0.22.3",
"auth0-fastapi-api>=1.0.0b5",
"fastapi-cache2[memcache]>=0.2.2",
"slowapi>=0.1.9",
"grpc-requests>=0.1.21",
"gunicorn>=25.3.0",
"jinja2>=3.1.6",
]
[dependency-groups]
dev = [
"unittest-xml-reporting >= 3.2.0",
"pytest >= 8.0.0",
"pytest-cov >= 4.1.0",
"pytest-asyncio",
"testcontainers >= 3.7.1",
"ruff >= 0.1.7",
"ruff-lsp >= 0.0.48",
"python-lsp-server>=1.9.0",
"pylsp-mypy>=0.6.8",
"types-pytz>=2025.2.0.20251108",
"pandas-stubs>=2.3.2.250926",
"pytest-asyncio>=1.3.0",
"types-grpcio>=1.0.0.20251009",
"sqlalchemy-stubs>=0.4",
"psycopg2-binary>=2.9.11",
"freezegun>=1.5.5",
"ty>=0.0.25",
"pyinstrument>=5.1.2",
]
[tool.uv.sources]
dp-sdk = { url = "https://github.com/openclimatefix/data-platform/releases/download/v0.24.5/dp_sdk-0.24.5-py3-none-any.whl" }
[project.urls]
repository = "https://github.com/openclimatefix/quartz-api"
[project.scripts]
quartz-api = "quartz_api.cmd.main:run"
[tool.setuptools]
include-package-data = true
[tool.setuptools.package-data]
"*" = ["*.conf", "*.ico", "*.png", "*.html", "*.js"]
[tool.setuptools-git-versioning]
enabled = true
dirty_template = "{tag}"
# --- LINTING AND TYPING CONFIGURATION --- #
# MyPy configuration
# * See https://mypy.readthedocs.io/en/stable/index.html
[tool.mypy]
python_version = "3.11"
warn_return_any = true
disallow_untyped_defs = true
[tool.pylsp-mypy]
enabled = true
dmypy = true
# Ruff configuration
# * See https://beta.ruff.rs/docs/
[tool.ruff]
line-length = 100
indent-width = 4
# Use pydocstyle Google convention
# See https://www.pydocstyle.org/en/stable/error_codes.html
exclude = ["__init__.py"]
[tool.ruff.lint]
fixable = ["ALL"]
ignore = [
"D203", "D213", "D215", "D400", "D401", "D404", "D406",
"D407", "D408", "D409", "D413",
]
select = [
"F", # pyflakes
"E", # pycodestyle
"W", # whitespace and newlines
"I", # isort
"UP", # modernize
"ANN", # flake8 type annotations
"S", # flake8 bandit
"B", # flake8 bugbear
"C4", # flake8 comprehensions
"COM", # flake8 commas
"T20", # flake8 print
"SIM", # flake8 simplify
"ARG", # flake8 unused arguments
"DTZ", # flake8 datetimes
"Q", # flake8 quotes
"TCH", # flake8 typecheck
"D", # pydocstyle
"RUF", # ruff-specific rules
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
"test*" = ["D", "ANN", "S"]