-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
238 lines (215 loc) · 5.09 KB
/
pyproject.toml
File metadata and controls
238 lines (215 loc) · 5.09 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
[project]
name = "buildstock-fetch"
version = "1.6.5"
description = "This library simplifies downloading building characteristics and load curve data from NREL's ResStock and ComStock projects."
authors = [{ name = "Switchbox", email = "hello@switch.box" }]
readme = "README.md"
keywords = ['python']
requires-python = ">=3.12,<4.0"
classifiers = [
"Intended Audience :: Developers",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dependencies = [
"requests>=2.32.3",
"typer>=0.9.0",
"rich>=13.9.5",
"questionary>=1.11.0",
"polars>=0.20.0",
"tomli>=2.0.0",
"boto3>=1.33.0",
"botocore>=1.33.0",
"pyarrow>=14.0.1",
"typedload>=2.39",
"httpx>=0.28.1",
"aiofiles>=25.1.0",
"types-aioboto3[essential,s3]>=15.5.0",
"aioboto3>=15.5.0",
"xmltodict>=1.0.2",
"useful-types>=0.2.1",
"tenacity>=9.1.2",
"async-timer>=1.1.6",
"psutil>=7.2.1",
"cloudpathlib>=0.23.0",
"prek>=0.3.2",
]
[project.urls]
Homepage = "https://switchbox-data.github.io/buildstock-fetch/"
Repository = "https://github.com/switchbox-data/buildstock-fetch"
Documentation = "https://switchbox-data.github.io/buildstock-fetch/"
[project.scripts]
bsf = "buildstock_fetch.cli.main:app"
[project.optional-dependencies]
# Core testing dependencies
test = ["pytest>=7.2.0", "pytest-asyncio>=1.3.0", "pytest-recording>=0.13.4"]
# Documentation dependencies
docs = [
"mkdocs>=1.4.2",
"mkdocs-material>=8.5.10",
"mkdocstrings[python]>=0.26.1",
]
# Code quality and linting dependencies
lint = [
"mypy>=0.991",
"ruff>=0.11.5",
"deptry>=0.23.0",
"types-requests>=2.31.0",
"types-boto3>=1.33.0",
"pandas-stubs>=2.2.0",
"types-aiofiles>=25.1.0.20251011",
]
# Development utilities dependencies (only for utils/ directory)
dev-utils = [
"boto3>=1.33.0",
"botocore>=1.33.0",
"numpy>=1.26.4",
"scikit-learn>=1.6.1",
"awscli>=1.32.0",
"xmltodict>=0.14.2",
]
# All development dependencies (convenience group)
dev = ["buildstock-fetch[test,docs,lint,dev-utils]", "tox-uv>=1.11.3"]
[build-system]
requires = ["setuptools>=45", "wheel"]
build-backend = "setuptools.build_meta"
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
include = ["buildstock_fetch", "buildstock_fetch.*"]
[tool.setuptools.package-data]
"buildstock_fetch" = [
"data/buildstock_releases.json",
"data/building_data/**/*",
"data/**/*.parquet",
"data/load_curve_column_map/*.csv",
"data/buildstock_upgrades_lookup.json",
]
[tool.mypy]
files = ["buildstock_fetch"]
disallow_untyped_defs = true
disallow_any_unimported = true
no_implicit_optional = true
check_untyped_defs = true
warn_return_any = true
warn_unused_ignores = true
show_error_codes = true
[[tool.mypy.overrides]]
module = ["pyarrow.*", "psutil.*", "async_timer.*"]
ignore_missing_imports = true
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
markers = ["network"]
asyncio_mode = "auto"
[tool.ruff]
target-version = "py310"
line-length = 120
fix = true
[tool.ruff.lint]
select = [
# flake8-2020
"YTT",
# flake8-bandit
"S",
# flake8-bugbear
"B",
# flake8-builtins
"A",
# flake8-comprehensions
"C4",
# flake8-debugger
"T10",
# flake8-simplify
"SIM",
# isort
"I",
# mccabe
"C90",
# pycodestyle
"E",
"W",
# pyflakes
"F",
# pygrep-hooks
"PGH",
# pyupgrade
"UP",
# ruff
"RUF",
# tryceratops
"TRY",
]
ignore = [
# LineTooLong
"E501",
# DoNotAssignLambda
"E731",
# Random not suitable for cryptographic purposes
"S311",
# Return the negated condition directly
"SIM103",
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101"]
"tests/test_release.py" = [
"S603", # subprocess call: check for execution of untrusted input
"S607", # Starting a process with a partial executable path
"F401", # imported but unused
"B904", # Within an `except` clause, raise exceptions with `raise ... from err`
"TRY003", # Avoid specifying long messages outside the exception class
]
[tool.ruff.format]
preview = true
[tool.pyright]
reportUnknownLambdaType = false
pythonVersion = "3.13"
exclude = [".venv", "tests"]
venv = ".venv"
# Ignore dev-only dependencies that are not used in main package code
[tool.deptry]
# Exclude directories that shouldn't be analyzed
exclude = ["utils", "\\.venv"]
per_rule_ignores.DEP002 = [
# Testing framework
"pytest",
# Documentation tools
"mkdocs",
"mkdocs-material",
"mkdocstrings",
# Code quality tools
"pre-commit",
"tox-uv",
"deptry",
"mypy",
"ruff",
# Type stubs
"types-requests",
"types-boto3",
"pandas-stubs",
# Development utilities (only used in utils/)
"boto3",
"botocore",
"pyarrow",
"numpy",
"scikit-learn",
"awscli",
"xmltodict",
"tomli",
"pytest-asyncio",
"types-aioboto3",
"pytest-recording",
"types-aiofiles",
]
per_rule_ignores.DEP003 = [
"typing_extensions",
"types_aiobotocore_s3",
"aiobotocore",
]
[dependency-groups]
dev = []