-
-
Notifications
You must be signed in to change notification settings - Fork 142
Expand file tree
/
Copy pathpyproject.toml
More file actions
689 lines (622 loc) · 22.8 KB
/
Copy pathpyproject.toml
File metadata and controls
689 lines (622 loc) · 22.8 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
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
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[tool.hatch.build.targets.wheel]
packages = ["src/pudl"]
[tool.hatch.version]
source = "vcs"
# Use CalVer-style versioning: YYYY.MM.PATCH (years 2000-2099)
# Only consider tags matching v20*.*.* to avoid nightly and other non-version tags
tag-pattern = "^v(?P<version>20\\d{2}\\.\\d{1,2}\\.\\d{1,2})$"
fallback-version = "0.0.0.dev0"
[tool.hatch.version.raw-options]
# Tell git to only consider version tags, not nightly-* or other tags
git_describe_command = [
"git",
"describe",
"--tags",
"--long",
"--match",
"v20*",
]
# Disable local version identifier (no +g1234567 suffix)
local_scheme = "no-local-version"
[tool.hatch.build.hooks.vcs]
version-file = "src/pudl/_version.py"
[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.13,<3.14.0a0"
dynamic = ["version"]
license = "MIT"
# Dependencies are managed via pixi, so they're installed from conda-forge if available.
# See tool.pixi.dependencies and tool.pixi.pypi-dependencies below.
dependencies = []
[project.urls]
"Homepage" = "https://github.com/catalyst-cooperative/pudl"
"Source" = "https://github.com/catalyst-cooperative/pudl"
"Documentation" = "https://docs.catalyst.coop/pudl"
"Issue Tracker" = "https://github.com/catalyst-cooperative/pudl/issues"
"Support" = "https://github.com/catalyst-cooperative/pudl/discussions"
"Funding" = "https://opencollective.com/pudl/"
[tool.pixi.workspace]
name = "catalystcoop.pudl"
platforms = ["linux-aarch64", "linux-64", "osx-64", "osx-arm64"]
channels = ["conda-forge"]
channel-priority = "strict"
preview = ["pixi-build"]
# This is an expansive listing of all PUDL dependencies that are available via
# conda-forge. It includes development, testing, and run-time dependencies.
# For any dependency with an upper bound on the version, please add a
# comment explaining why it's necessary.
[tool.pixi.dependencies]
alembic = ">=1.17"
boto3 = ">=1.35"
bottleneck = ">=1.5.0"
"catalystcoop.dbfread" = ">=3.0,<3.1"
"catalystcoop.ferc_xbrl_extractor" = ">=1.10,<1.11"
click = ">=8.4"
coloredlogs = ">=14.0"
coverage = ">=7.15"
curl = ">=8.17"
dagster = ">=1.13"
dagster-dbt = ">=1!0.29"
dagster-dg-cli = ">=1.13"
dagster-gcp = ">=1!0.29"
dagster-webserver = ">=1.13"
dbt-core = ">=1.11.11"
dbt-duckdb = ">=1.9.4"
deepdiff = ">=8"
doc8 = ">=1.1"
email-validator = ">=1.0.3"
filelock = ">=3.29"
frictionless = ">=5,<6"
fsspec = ">=2026"
gcsfs = ">=2026"
gdal = ">=3.13.1"
geoarrow-pyarrow = ">=0.2"
geopandas = ">=1.1.4"
google-cloud-sdk = ">=535"
# grpcio packages all need to have same version to avoid conflicts.
# They are also compiled and finnicky. Check compatibility before upgrading.
grpcio = "==1.78.1"
grpcio-health-checking = "==1.78.1"
grpcio-status = "==1.78.1"
hypothesis = ">=6.123"
jellyfish = ">=1"
jinja2 = ">=3.1"
jupyter = ">=1.1"
jupyter-lsp = ">=2.3"
jupyter-resource-usage = ">=1.2"
jupyterlab = ">=4.6"
jupyterlab-lsp = ">=5.2"
matplotlib-base = ">=3.11"
memray = ">=1.18.0"
mlflow = ">=3.13"
nbconvert = ">=7"
nbformat = ">=5.10"
networkx = ">=3.6"
nodejs = ">=26"
numba = ">=0.65"
numexpr = ">=2.10"
numpy = ">=2.4"
packaging = ">=25"
pandas = ">=2.3"
pandoc = ">=3.7"
pandera-polars = ">=0.31"
parallel = ">=20250822"
pint = ">=0.25.3"
polars = ">=1.42" # v1.41.2 fixed a big memory leak
prek = ">=0.4.8"
# potentially unresolveable breaking changes in prettier 4.x
prettier = ">=3.8,<4"
proj = ">=9.8.1"
# pyarrow upgrade blocked by stale geopandas 0.14 in Kaggle environment
pyarrow = ">=24"
pydantic = ">=2.13"
pydantic-settings = ">=2.13"
pydata-sphinx-theme = ">=0.20"
pygraphviz = ">=1"
pytest = ">=9"
pytest-console-scripts = ">=1.4"
pytest-cov = ">=7"
pytest-mock = ">=3.15"
pytest-order = ">=1.3"
pytest-xdist = ">=3.8"
python-calamine = ">=0.6.1"
python-dotenv = ">=1"
python-duckdb = ">=1.5,<1.6"
pytz = ">=2025"
pyyaml = ">=6"
requests = ">=2.32"
responses = ">=0.25"
ruff = ">=0.15"
ruff-lsp = ">=0.0.62"
s3fs = ">=2026"
scikit-learn = ">=1.9"
scipy = ">=1.18"
shapely = ">=2.1.1"
sphinx = ">=9"
sphinx-autoapi = ">=3.8"
sphinx-design = ">=0.7.0"
sphinx-issues = ">=5"
sphinx-llm = ">=0.4.1"
sphinx-reredirects = ">=1"
sphinxcontrib-bibtex = ">=2.6"
sphinxcontrib-googleanalytics = ">=0.4"
sphinxcontrib-mermaid = ">=2.0"
splink = ">=4.0.14"
sqlalchemy = ">=2"
sqlite = ">=3.53"
taplo = "==0.9.3" # Pinned to match version in VS Code extension
terraform = ">=1.14"
timezonefinder = ">=8"
typos = ">=1.47"
universal-pathlib = ">=0.3.10"
urllib3 = ">=2.7"
usaddress = ">=0.5.16,<0.6"
uv = ">=0.11"
xlsxwriter = ">=3.2"
zip = ">=3.0"
gh = ">=2.96.0,<3"
[tool.pixi.pypi-dependencies]
# Install the local package in editable mode. Assume dependencies are specified either
# above in [tools.pixi.dependenccies] (for conda packages) or in this section, if they
# happen to only be available via PyPI.
"catalystcoop.pudl" = { path = ".", editable = true }
detect-secrets = ">=1.5"
[tool.pixi.feature.dev.dependencies]
duckdb-cli = ">=1.5,<1.6"
jq = ">=1.8" # Primarily for agent skills use
marimo = ">=0.13"
matplotx = ">=0.3.10"
plotly = ">=6.6"
ripgrep = ">=15" # Primarily for agent skills use
ty = ">=0.0.55" # Experimental, also for agent skills use
[tool.pixi.environments]
dev = { features = ["dev"], solve-group = "default" }
[tool.pixi.activation.env]
# Reusable variables for pixi tasks
DG_FULL_CONFIG = "src/pudl/package_data/settings/dg_full.yml"
DG_NIGHTLY_CONFIG = "src/pudl/package_data/settings/dg_nightly.yml"
########################################################################################
# Pixi task definitions. These are used by pixi to run various tasks in a consistent
# environment. They can be run with `pixi run <task-name>`, and can depend on each other
# to create complex workflows. See the pixi documentation for more details:
########################################################################################
[tool.pixi.tasks]
# Documentation tasks
[tool.pixi.tasks.docs-clean]
cmd = """
bash -c 'shopt -s nullglob; rm -rf \
docs/_build \
docs/autoapi \
docs/data_dictionaries/pudl_db.rst \
docs/data_dictionaries/codes_and_labels.rst \
docs/data_dictionaries/code_csvs \
docs/data_sources/census*.rst \
docs/data_sources/eia*.rst \
docs/data_sources/epacems*.rst \
docs/data_sources/epacamd*.rst \
docs/data_sources/ferc*.rst \
docs/data_sources/gridpathratoolkit*.rst \
docs/data_sources/nrelatb*.rst \
docs/data_sources/phmsagas*.rst \
docs/data_sources/rus*.rst \
docs/data_sources/sec10k*.rst \
docs/data_sources/vcerare*.rst'
"""
description = "Remove all generated documentation files"
[tool.pixi.tasks.docs-build]
cmd = """
doc8 docs/ README.rst && \
python -m sphinx --jobs auto -W -b html docs docs/_build/html
"""
depends-on = ["docs-clean"]
description = "Build PUDL docs using Sphinx"
[tool.pixi.tasks.toml-format]
cmd = "taplo fmt"
description = "Format TOML files with Taplo"
[tool.pixi.tasks.toml-format-check]
cmd = "taplo fmt --check"
description = "Check TOML formatting with Taplo"
[tool.pixi.tasks.toml-check]
cmd = "taplo check"
description = "Validate TOML files with Taplo"
[tool.pixi.tasks.docs-check]
cmd = """
doc8 docs/ README.rst && \
PUDL_DOCS_DISABLE_INTERSPHINX=1 coverage run --append -m sphinx --jobs auto -W -b dummy docs docs/_build/dummy
"""
depends-on = ["docs-clean"]
description = "Run a fast validation-only Sphinx docs check"
[tool.pixi.tasks.docs-linkcheck]
cmd = """
sphinx-build --jobs auto -W -b linkcheck docs docs/_build/linkcheck
"""
depends-on = ["docs-clean"]
description = "Check external links in the PUDL docs using Sphinx linkcheck"
# Testing tasks
[tool.pixi.tasks.coverage-erase]
cmd = "coverage erase"
description = "Clear coverage data"
[tool.pixi.tasks.pytest-unit]
cmd = "pytest --cov-fail-under=0 --doctest-modules src/pudl tests/unit"
description = "Run unit tests and doctests"
[tool.pixi.tasks.pytest-integration]
cmd = "pytest --cov-fail-under=0 tests/integration tests/validate/data_test.py"
description = "Run integration and (non-row-count) validation tests."
env = { PUDL_INTEGRATION_TESTS = "true" }
[tool.pixi.tasks.pytest-validate]
cmd = "pytest -n auto --no-cov --live-pudl-output tests/validate/data_test.py"
description = "Run data validation tests (FK checks and dbt, no row counts) against existing PUDL_OUTPUT"
[tool.pixi.tasks.pytest-unit-nightly]
cmd = "pytest -n auto --no-cov --dg-config $DG_NIGHTLY_CONFIG --doctest-modules src/pudl tests/unit"
description = "Run nightly-build unit tests with the nightly Dagster config"
[tool.pixi.tasks.pytest-integration-nightly]
cmd = "pytest -n auto --no-cov --live-pudl-output --dg-config $DG_NIGHTLY_CONFIG tests/integration"
description = "Run nightly-build integration tests against live nightly-style outputs"
[tool.pixi.tasks.pytest-validate-nightly]
cmd = "pytest -n auto --no-cov --live-pudl-output --dg-config $DG_NIGHTLY_CONFIG tests/validate/data_test.py"
description = "Run nightly-build data validation tests (FK checks and dbt, excluding row counts) against live nightly-style outputs"
[tool.pixi.tasks.pytest-validate-row-counts-nightly]
cmd = "pytest --no-cov --live-pudl-output --dg-config $DG_NIGHTLY_CONFIG tests/validate/row_counts_test.py"
description = "Run nightly-build dbt row count checks as a separate stage against live nightly-style outputs"
[tool.pixi.tasks.pytest-nightly]
cmd = "true"
depends-on = [
"pytest-unit-nightly",
"pytest-integration-nightly",
"pytest-validate-nightly",
"pytest-validate-row-counts-nightly",
]
description = "Run the nightly-build pytest stages using the nightly Dagster config"
[tool.pixi.tasks.pytest-ci]
cmd = "coverage report"
depends-on = [
"coverage-erase",
"docs-check",
"pytest-unit",
"pytest-integration",
]
description = "Run all CI tests and report test coverage"
[tool.pixi.tasks.pytest-jupyter]
cmd = "pytest --live-pudl-output tests/integration/notebooks_test.py"
description = "Test Jupyter notebooks"
# Build the FERC 1 and PUDL DBs.
# Identify any plant or utility IDs in the DBs that haven't yet been mapped
# These outputs should be turned into normal dagster assets. See issue #4338
[tool.pixi.tasks.unmapped-ids]
cmd = """
pytest \
--save-unmapped-ids
--dg-config $DG_FULL_CONFIG \
tests/integration/glue/glue_test.py
"""
description = "Identify unmapped plant and utility IDs"
# Dagster tasks
[tool.pixi.tasks.ferc-to-sqlite-clean]
cmd = """
bash -c 'shopt -s nullglob; rm -f \
$PUDL_OUTPUT/ferc*.sqlite \
$PUDL_OUTPUT/ferc*.duckdb \
$PUDL_OUTPUT/ferc*_xbrl_datapackage.json \
$PUDL_OUTPUT/ferc*_xbrl_taxonomy_metadata.json'
"""
description = "Remove raw FERC SQLite databases and related outputs"
[tool.pixi.tasks.ferc-to-sqlite]
cmd = "dg launch --job ferc_to_sqlite --config $DG_FULL_CONFIG"
depends-on = ["ferc-to-sqlite-clean"]
description = "Build FERC databases from scratch"
[tool.pixi.tasks.pudl-clean]
cmd = "bash -c 'shopt -s nullglob; rm -f $PUDL_OUTPUT/pudl.sqlite'"
description = "Remove PUDL SQLite database"
[tool.pixi.tasks.pudl]
cmd = """
alembic upgrade head && \
dg launch --job pudl --config $DG_FULL_CONFIG
"""
depends-on = ["pudl-clean"]
description = "Run the full PUDL ETL without rebuilding raw FERC SQLite databases"
[tool.pixi.tasks.pudl-with-ferc-to-sqlite]
cmd = """
alembic upgrade head && \
dg launch --job pudl_with_ferc_to_sqlite --config $DG_FULL_CONFIG
"""
depends-on = ["ferc-to-sqlite-clean", "pudl-clean"]
description = "Run the full PUDL ETL including rebuilding raw FERC SQLite databases"
[tool.pixi.tasks.pudl-with-ferc-to-sqlite-nightly]
cmd = """
alembic upgrade head && \
dg launch --job pudl_with_ferc_to_sqlite --config $DG_NIGHTLY_CONFIG
"""
depends-on = ["ferc-to-sqlite-clean", "pudl-clean"]
description = "Run the full PUDL ETL (including FERC) using the nightly Dagster config"
# Code quality tasks
[tool.pixi.tasks.prek-run]
cmd = "prek run --all-files"
description = "Run all pre-commit hooks"
[tool.pixi.tasks.prek-install]
cmd = "prek install"
description = "Install pre-commit hooks"
# Dependency Update tasks
[tool.pixi.tasks.prek-update]
cmd = "prek update"
description = "Update pre-commit hook versions"
[tool.pixi.tasks.dbt-deps-upgrade]
cmd = "dbt deps --upgrade"
cwd = "dbt"
description = "Update dbt dependencies"
[tool.pixi.tasks.devcontainer-install]
cmd = """
pixi install --frozen --locked \
&& pixi run install-skills
"""
description = "Set up the dev container: install pixi environment, skills, and agent CLIs (run once after first start)"
[tool.pixi.tasks.devcontainer-rebuild]
cmd = """
npx -y @devcontainers/cli build --workspace-folder . --log-level info
"""
description = "Rebuild devcontainer image metadata (workspace .pixi and caches are now separate volumes)"
# Coding agent environment
# NOTE (2026-03-17): We're using the `experimental_install` command
# which is the workaround for "restoring from a lockfile" - see
# https://github.com/vercel-labs/skills/issues/549 - we probably want to switch to
# `npx skills install` whenever that actually becomes a thing.
[tool.pixi.tasks.install-skills]
cmd = "npx skills experimental_install"
description = "Install skills from lockfile"
[project.scripts]
auto_match_utilities = "pudl.scripts.auto_match_utilities:main"
metadata_to_rst = "pudl.scripts.metadata_to_rst:main"
pudl_check_fks = "pudl.scripts.pudl_check_fks:main"
pudl_datastore = "pudl.scripts.pudl_datastore:main"
pudl_deploy = "pudl.scripts.pudl_deploy:main"
pudl_check_for_build = "pudl.scripts.pudl_check_for_build:main"
pudl_service_territories = "pudl.scripts.pudl_service_territories:main"
dbt_helper = "pudl.scripts.dbt_helper:main"
dghome = "pudl.scripts.dghome:main"
check_path_permissions = "pudl.scripts.check_path_permissions:main"
generate_pudl_duckdb = "pudl.scripts.generate_pudl_duckdb:main"
pudl_null_cols = "pudl.scripts.pudl_null_cols:main"
resource_description = "pudl.scripts.resource_description:main"
update_zenodo_dois = "pudl.scripts.update_zenodo_dois:main"
zenodo_data_release = "pudl.scripts.zenodo_data_release:main"
generate_ferc_provenance = "pudl.scripts.generate_ferc_provenance:main"
[tool.ruff]
# Configurations that apply to both the `format` and `lint` subcommands.
target-version = "py313"
line-length = 88
indent-width = 4
# Don't touch autogenerated alembic migrations and ignore notebooks for now
exclude = ["migrations/versions", "*.ipynb"]
[tool.ruff.format]
# Configuration specfic to the `format` subcommand.
# We use black compatible formatting.
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint]
# Configurations that apply to the `lint` subcommand.
preview = true # Required for NPY201
explicit-preview-rules = true # and ONLY NPY201
select = [
"A", # flake8-builtins
"B", # flake8-bugbear
"C", # Limit cyclomatic complexity using mccabe
"C4", # flake8-comprehensions
"D", # pydocstyle errors
"E", # pycodestyle errors
"EXE", # executable file issues
"F", # pyflakes
"I", # isort
"ICN", # flake8 import conventions
"N", # pep8-naming
"NPY", # NumPy specific checks
"PD", # pandas checks
"PGH", # pygrep-hooks
"PIE", # flake8-pie miscellaneous linting
"PTH", # use pathlib
"Q", # flake8-quotes
"RET", # check return values
"RSE", # unnecessary parenthises on raised exceptions
"S", # flake8-bandit
"SIM", # flake8-simplify
"UP", # pyupgrade (use modern python syntax)
"W", # pycodestyle warnings
# These rules would be good, but will require more effort:
# "ANN", # identify missing type annotations
# "ARG", # find unused arguments
# "DTZ", # datetime / timzeone issues flake8-datetimez
# "ERA", # eradicate: finds commented out code
# "FURB", # refurb: general code quality/modernization. Still in preview.
# "PERF", # performance issues
# "PT", # pytest style
# "PL", # PyLint (lots of rules)
# "RUF", # Ruff specific rules
# "T", # Find print statements that should probably be logging
]
ignore = [
"B006", # Don't use mutable data structures for argument defaults. TODO: FIX
"B008", # Don't perform function calls in argument defaults. TODO: FIX
"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
"PD010", # Use of df.stack()
"PD013", # Use of df.unstack()
"PD015", # Use of pd.merge() rather than df.merge()
"RET504", # Ignore unnecessary assignment before return
"RUF005", # Unpack iterables instead of concatenation
"S101", # Use of assert
]
extend-select = ["NPY201"] # preview rule to easy migration to Numpy 2.0
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Ignore unused imports
"tests/*" = ["D"]
"migrations/*" = ["D", "Q"]
[tool.ruff.lint.isort]
known-first-party = ["pudl"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
inline-quotes = "double"
multiline-quotes = "double"
[tool.doc8]
max-line-length = 88
ignore-path = ["docs/ferc/form1", "docs/_build", "docs/data_sources/phmsagas"]
[tool.pytest]
minversion = "9.0"
testpaths = ["./"]
filterwarnings = [
"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:datetime.datetime.utcnow() is deprecated:DeprecationWarning",
"ignore:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning:dbt_common[.*]",
"ignore:The Shapely GEOS version:UserWarning:geopandas[.*]",
"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:Pydantic V1 style `@validator` validators are deprecated:pydantic.PydanticDeprecatedSince20:mlflow.gateway.config",
"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:The behavior of DataFrame concatenation with empty or all-NA entries is deprecated.:FutureWarning",
"once:Valid config keys have changed in V2:UserWarning",
"once:AssetExecutionContext.op_config is deprecated:DeprecationWarning",
"ignore:unclosed database:ResourceWarning",
"ignore:Specifying a partitions_def on an AssetCheckSpec is currently in preview",
"ignore:No path_separator found in configuration:DeprecationWarning:alembic",
"ignore:Extension type 'geoarrow.wkb' is not registered:UserWarning",
"ignore:invalid escape sequence:SyntaxWarning:stringcase",
"ignore:invalid escape sequence:SyntaxWarning:parsedatetime",
]
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]
# must not end with `--cov` since that will treat the first argument you pass
# to pytest as a coverage source! see
# https://github.com/catalyst-cooperative/pudl/issues/3609
addopts = [
"--verbose",
"--cov",
"--cov-append",
"--cov-config=pyproject.toml",
"--cov-report=",
"--durations=20",
]
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 = "INFO"
doctest_optionflags = [
"NORMALIZE_WHITESPACE",
"IGNORE_EXCEPTION_DETAIL",
"ELLIPSIS",
]
[tool.coverage.run]
source = ["src/pudl/", "tests/integration/", "tests/unit/", "tests/validate/"]
omit = ["src/pudl/_version.py"]
relative_files = true
[tool.coverage.report]
precision = 2
sort = "miss"
skip_empty = true
fail_under = 92
exclude_lines = [
# Have to re-enable the standard pragma
"pragma: no cover",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Stuff that's not expected to run normally...
"logger.debug",
]
[tool.dagster]
modules = [{ type = "module", name = "pudl.definitions" }]
[tool.dg]
directory_type = "project"
[tool.dg.project]
root_module = "pudl"
defs_module = "pudl.dagster"
code_location_target_module = "pudl.definitions"
registry_modules = ["pudl.dagster"]
[tool.typos.default]
# Ignore spellchecking all lines with # spellchecker:ignore
extend-ignore-re = ["(?Rm)^.*(#|//)\\s*spellchecker:ignore$"]
[tool.typos.default.extend-words]
# Add words that should be excepted from spell-checking
ACI = "ACI"
AER = "AER"
AKS = "AKS"
BA = "BA"
BCK = "BCK"
consit = "consit"
cll = "cll"
EDE = "EDE"
fillin = "fillin"
formate = "formate"
ISO = "ISO"
LaMoure = "LaMoure"
Kake = "Kake"
MAPE = "MAPE"
MAPP = "MAPP"
MER = "MER"
Moure = "Moure"
ND = "ND"
OT = "OT"
othr = "othr"
PADD = "PADD"
PN = "PN"
PUDL = "PUDL"
PudlTabl = "PudlTabl"
RTO = "RTO"
ser = "ser"
Tabl = "Tabl"
TOU = "TOU"
TRE = "TRE"
Worchester = "Worchester"
wrk = "wrk"
[tool.typos.files]
extend-exclude = [
"*.yml",
"*.toml",
"*.bib",
"*.csv",
"*.html",
"*.json",
".github/skills/pudl-dev/references/datapackage.schema.json",
"src/pudl/metadata/codes.py",
"migrations/",
"notebooks/",
"devtools/",
"tests/",
"src/pudl/transform/params/ferc1.py",
"src/pudl/package_data/ferc1/*_categories.yaml",
]
[tool.ty.environment]
python = ".pixi/envs/default/bin/python"
python-version = "3.13"
python-platform = "all"
root = ["./src"]