-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathpyproject.toml
More file actions
160 lines (141 loc) · 4.25 KB
/
pyproject.toml
File metadata and controls
160 lines (141 loc) · 4.25 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
# --- PROJECT CONFIGURATION --- #
[build-system]
requires = ["setuptools>=67", "wheel", "setuptools-git-versioning>=2.0,<3"]
build-backend = "setuptools.build_meta"
# Metadata (see https://peps.python.org/pep-0621/)
[project]
name = "site-forecast-app"
dynamic = ["version"] # Set automtically using git: https://setuptools-git-versioning.readthedocs.io/en/stable/
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = "==3.11.*"
license = { file = "LICENSE" }
authors = [
{ name = "Open Climate Fix team", email = "info@openclimatefix.org" },
{ name = "Peter Dudfield" },
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
]
dependencies = [
"click==8.1.7",
"pvsite-datamodel==1.2.0",
"pandas==2.2.3",
"pvnet==5.3.7",
"pvnet_summation==1.2.1",
"numpy==1.26.4",
"huggingface-hub==0.20.3",
"ocf-data-sampler==1.0.9",
"pyproj==3.6.0", # 3.7.1 seems to cause an error at the moment
"pyogrio==0.8.0", # 0.9.0 seems to cause an error at the moment
"torchvision==0.17.2",
"torch @ https://download.pytorch.org/whl/cpu/torch-2.3.1-cp312-none-macosx_11_0_arm64.whl ; platform_system == 'Darwin' and platform_machine == 'arm64'",
"torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.18.1-cp312-cp312-macosx_11_0_arm64.whl ; platform_system == 'Darwin' and platform_machine == 'arm64'",
"torch @ https://download.pytorch.org/whl/cpu/torch-2.3.1%2Bcpu-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and platform_machine == 'x86_64'",
"torchvision @ https://download.pytorch.org/whl/cpu/torchvision-0.18.1%2Bcpu-cp312-cp312-linux_x86_64.whl ; platform_system == 'Linux' and platform_machine == 'x86_64'",
"sentry-sdk==2.1.1",
"pvlib==0.12.0",
"betterproto>=2.0.0b7",
"grpclib>=0.4.7",
"dp-sdk",
"gcsfs==2025.10.0",
]
[dependency-groups]
dev = [
# Testing
"pytest",
"pytest-asyncio",
"ruff >= 0.9.2",
# LSP Support
"python-lsp-server",
"python-lsp-ruff",
"testcontainers",
"freezegun",
]
[project.urls]
repository = "https://github.com/openclimatefix/site-forecast-app"
[tool.setuptools]
license-files = []
[tool.setuptools.packages.find]
where = ["."]
exclude = ["test*"]
[tool.setuptools.package-data]
"*" = ["*.csv", "*.yaml"]
[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.12"
strict = true
warn_unreachable = true
warn_return_any = true
disallow_untyped_defs = true
plugins = [
"numpy.typing.mypy_plugin",
]
[[tool.mypy.overrides]]
# Ignore missing imports for libraries that don't have them.
# If they are ever made, remove from here!
module = [
"fsspec",
"s3fs",
"zarr",
]
ignore_missing_imports = true
# Ruff configuration
# * See https://beta.ruff.rs/docs/
[tool.ruff]
line-length = 100
indent-width = 4
exclude = ["__init__.py"]
[tool.ruff.lint]
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
]
fixable = ["ALL"]
ignore = [
"D203", "D213", "D215", "D400", "D401", "D404", "D406",
"D407", "D408", "D409", "D413",
]
[tool.ruff.lint.per-file-ignores]
"test*" = ["D", "ANN", "S101"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
docstring-code-format = true
docstring-code-line-length = 100
[tool.uv.sources]
torch = [
{ index = "pytorch-cpu" },
]
torchvision = [
{ index = "pytorch-cpu" },
]
dp-sdk = { url = "https://github.com/openclimatefix/data-platform/releases/download/v0.21.2/dp_sdk-0.21.2-py3-none-any.whl" }
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true