forked from catalyst-cooperative/pudl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
302 lines (281 loc) · 9.87 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
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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=66", "setuptools_scm[toml]>=3.5.0", "wheel"]
[project]
name = "catalystcoop.pudl"
description = "An open data processing pipeline for US energy data"
readme = { file = "README.rst", content-type = "text/x-rst" }
authors = [{ name = "Catalyst Cooperative", email = "pudl@catalyst.coop" }]
requires-python = ">=3.11,<3.12"
dynamic = ["version"]
license = { file = "LICENSE.txt" }
dependencies = [
"addfips>=0.4",
"alembic>=1.12",
"boto3>=1.28.55",
"bottleneck>=1.3.4", # pandas[performance]
"build>=1.0",
"catalystcoop.dbfread>=3.0,<3.1",
"catalystcoop.ferc-xbrl-extractor>=1.2.0,<2",
"click>=8.1",
"coloredlogs>=14.0", # Dagster requires 14.0
"conda-lock>=2.5.1",
"coverage>=7",
"dagster>=1.5.6",
"dagster-postgres>=0.21.6,<1", # Update when dagster-postgres graduates to 1.x
"dask>=2023",
"datapackage>=1.15,<2", # Transition datastore to use frictionless.
"datasette>=0.64",
"doc8>=1.1",
"email-validator>=1.0.3", # pydantic[email]
"fsspec>=2023",
"furo>=2022.4.7",
"gcsfs>=2023",
"geopandas>=0.14",
"grpcio==1.59.2", # Required by dagster, binary dependencies are flaky
"grpcio-health-checking==1.59.2", # Required by dagster, binary dependencies are flaky
"grpcio-status==1.59.2", # Required by dagster, binary dependencies are flaky
"hypothesis>=6.87",
"jinja2>=3.1",
"jupyter",
"matplotlib>=3.8",
"nbconvert>=7",
"nbformat>=5.9",
"networkx>=3.2",
"numba>=0.58", # pandas[performance]
"numexpr>=2.8.0", # pandas[performance]
"numpy>=1.26,<2.0a0",
"openpyxl>=3.0.10", # pandas[excel]
"pandas>=2.1",
"pandera>=0.17.2",
"pre-commit>=3",
"pyarrow>=14.0.1", # pandas[parquet]
"pydantic>=2.4",
"pydantic-settings>=2",
"pytest>=7.4",
"pytest-cov>=4.1",
"pytest-console-scripts>=1.4",
"pytest-mock>=3.11",
"pytest-xdist>=3.3",
"python-dotenv>=1",
"pyxlsb>=1.0.9", # pandas[excel]
"pyyaml>=6",
"readthedocs-sphinx-ext>=2",
"recordlinkage",
"responses>=0.23",
"ruff>=0.1",
"scikit-learn>=1.3",
"scipy>=1.11",
"Shapely>=2",
"sphinx-autoapi>=3",
"sphinx-issues>=1.2",
"sphinx-reredirects>=0.1.2",
"sphinx>=7",
"sphinxcontrib_bibtex>=2.6",
"sqlalchemy>=2",
"timezonefinder>=6.2",
"xlrd>=2.0.1", # pandas[excel]
"xlsxwriter>=3.1", # pandas[excel]
]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
keywords = [
"analysis",
"climate change",
"coal",
"data",
"economics",
"eia 860",
"eia 861",
"eia 923",
"electricity",
"emissions",
"energy",
"epa ampd",
"epa cems",
"ferc form 1",
"ferc form 2",
"ferc form 6",
"ferc form 60",
"ferc form 714",
"finance",
"fossil fuel",
"natural gas",
"oil",
"policy",
"utility",
]
[project.scripts]
metadata_to_rst = "pudl.convert.metadata_to_rst:main"
epacems_to_parquet = "pudl.convert.epacems_to_parquet:main"
ferc_to_sqlite = "pudl.ferc_to_sqlite.cli:main"
pudl_datastore = "pudl.workspace.datastore:main"
pudl_etl = "pudl.cli.etl:main"
pudl_setup = "pudl.workspace.setup_cli:main"
state_demand = "pudl.analysis.state_demand:main"
pudl_check_fks = "pudl.etl.check_foreign_keys:main"
# pudl_territories currently blows up memory usage to 100+ GB.
# See https://github.com/catalyst-cooperative/pudl/issues/1174
# pudl_territories = "pudl.analysis.service_territory:main"
[project.urls]
"Homepage" = "https://catalyst.coop/pudl/"
"Source" = "https://github.com/catalyst-cooperative/pudl"
"Documentation" = "https://catalystcoop-pudl.readthedocs.io"
"Release Notes" = "https://catalystcoop-pudl.readthedocs.io/en/latest/release_notes.html"
"Issue Tracker" = "https://github.com/catalyst-cooperative/pudl/issues"
"Support" = "https://github.com/catalyst-cooperative/pudl/discussions"
"Funding" = "https://catalyst.coop/support-the-pudl-project/"
[project.optional-dependencies]
dev = [
"dagster-webserver>=1.5.6",
"jupyterlab>3.2",
"jupyter-resource-usage",
"pygraphviz",
]
[tool.setuptools]
include-package-data = true
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
[tool.ruff]
select = [
"A", # flake8-builtins
# "ARG", # unused arguments
# "B", # flake8-bugbear
"C", # Limit cyclomatic complexity using mccabe
"D", # pydocstyle errors
"E", # pycodestyle errors
"EXE", # executable file issues
# "ERA", # eradicate: find commented out code
"F", # pyflakes
"I", # isort
"ISC", # implicit string concatenation
"N", # pep8-naming
"NPY", # NumPy specific checks
"PD", # pandas checks
"PGH", # pygrep-hooks
# "PL", # pylint
# "PT", # pytest style
"PTH", # use pathlib
"Q", # flake8-quotes
"RET", # check return values
"RSE", # unnecessary parenthises on raised exceptions
"S", # flake8-bandit
"SIM", # flake8-simplify
# "T", # print statements found
"UP", # pyupgrade (use modern python syntax)
"W", # pycodestyle warnings
]
ignore = [
"D401", # Require imperative mood in docstrings.
"D417",
"E501", # Overlong lines.
"E203", # Space before ':' (black recommends to ignore)
"E226", # Missing whitespace around arithmetic operator
"E266", # Too many leading `#` before block comment
"PD003", # Use of isna rather than isnull
"PD004", # Use of notna rather than notnull
"PD008", # Use of df.at[] rather than df.loc[]
"PD010", # Use of df.stack()
"PD013", # Use of df.unstack()
"PD015", # Use of pd.merge() rather than df.merge()
"PD901", # df as variable name
"RET504", # Ignore unnecessary assignment before return
"S101", # Use of assert
]
# Assume Python 3.11
target-version = "py311"
line-length = 88
# Don't automatically concatenate strings -- sometimes we forget a comma!
unfixable = ["ISC"]
[tool.ruff.format]
quote-style = "double"
exclude = ["migrations/versions/*"]
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports
"test/*" = ["D"]
"migrations/*" = ["D", "Q"]
[tool.ruff.isort]
known-first-party = ["pudl"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 10
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.doc8]
max-line-length = 88
ignore-path = ["docs/ferc/form1", "docs/_build"]
[tool.pytest.ini_options]
testpaths = "./"
filterwarnings = [
"ignore:distutils Version classes are deprecated:DeprecationWarning",
"ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning",
"ignore:Deprecated call to.*declare_namespace:DeprecationWarning:pkg_resources",
"ignore:Deprecated call to:DeprecationWarning:google.rpc",
"ignore:Feature names only support names:FutureWarning:sklearn.utils.validation",
"ignore:In a future version, the Index constructor:FutureWarning:pandas.core.reshape.merge",
"ignore:Integration of FERC 714:UserWarning:pudl.extract.ferc714",
"ignore:Integration of EIA 861:UserWarning:pudl.extract.eia861",
"ignore:pkg_resources is deprecated as an API.:DeprecationWarning",
"ignore:Subclassing validator classes is not intended to be part of their public API.:DeprecationWarning",
"ignore:Subclassing validator classes:DeprecationWarning:tableschema",
"ignore:The Shapely GEOS version:UserWarning:geopandas[.*]",
"ignore:Unknown extension:UserWarning:openpyxl.worksheet[.*]",
"ignore:The `__fields__` attribute is deprecated:pydantic.PydanticDeprecatedSince20:unittest.mock",
"ignore:The `__fields_set__` attribute is deprecated:pydantic.PydanticDeprecatedSince20:unittest.mock",
"ignore:The `__fields__` attribute is deprecated:pydantic.PydanticDeprecatedSince20:pydantic.main",
"ignore:The `__fields_set__` attribute is deprecated:pydantic.PydanticDeprecatedSince20:pydantic.main",
"ignore:The `update_forward_refs` method is deprecated:pydantic.PydanticDeprecatedSince20:pydantic.main",
"ignore:Support for class-based `config` is deprecated:pydantic.PydanticDeprecatedSince20:pydantic._internal._config",
"ignore:Pydantic V1 style `@validator` validators are deprecated:pydantic.PydanticDeprecatedSince20:ferc_xbrl_extractor.instance",
"ignore:The `update_forward_refs` method is deprecated:pydantic.PydanticDeprecatedSince20:ferc_xbrl_extractor.taxonomy",
"once:Could not infer format, so each element will be parsed individually, falling back to `dateutil`.:UserWarning:pudl.extract.eia_bulk_elec",
"once:In a future version:FutureWarning:pudl.helpers",
"once:open_binary is deprecated:DeprecationWarning:pudl.glue.ferc1_eia",
"once:open_text is deprecated:DeprecationWarning:pudl.glue.ferc1_eia",
"once:The behavior of DataFrame concatenation with empty or all-NA entries is deprecated.:FutureWarning",
]
addopts = "--verbose --pdbcls=IPython.terminal.debugger:TerminalPdb"
log_format = "%(asctime)s [%(levelname)8s] %(name)s:%(lineno)s %(message)s"
log_date_format = "%Y-%m-%d %H:%M:%S"
log_cli = "true"
log_cli_level = "DEBUG"
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
[tool.conda-lock]
channels = ["conda-forge", "defaults"]
platforms = [
# "linux-aarch64",
"linux-64",
"osx-64",
"osx-arm64",
# "win-64",
]
channel-priority = "strict"
name = "pudl-dev"
[tool.conda-lock.dependencies]
google-cloud-sdk = ">=452"
nodejs = ">=20"
pandoc = ">=2"
pip = ">=23"
prettier = ">=3.0"
python = ">=3.11,<3.12"
sqlite = ">=3.43"
curl = ">=8.4.0"