Skip to content

Commit

Permalink
WIP: Initial refactor for pydantic v2
Browse files Browse the repository at this point in the history
* import missing modules, remove unused demonstration asset module.
* Import working; syntax issues fixed; real unit tests broken.
  • Loading branch information
zaneselvans committed Nov 22, 2023
1 parent fd0f525 commit cf8d4f1
Show file tree
Hide file tree
Showing 18 changed files with 302 additions and 389 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
docs/data_dictionaries/pudl_db.rst
.ipynb_checkpoints/
.cache/
.ruff_cache/
.mypy_cache/
.pytest_cache/*
.DS_Store
build/
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ dependencies = [
"pandera>=0.17.2",
"pre-commit>=3",
"pyarrow>=14.0.1", # pandas[parquet]
"pydantic>=1.10,<2",
# Required after pandera-core is retired and we switch to pydantic v2
#"pydantic>=2.4",
#"pydantic-settings>=2",
"pydantic>=2.4",
"pydantic-settings>=2",
"pytest>=7.4",
"pytest-cov>=4.1",
"pytest-console-scripts>=1.4",
Expand Down Expand Up @@ -220,10 +218,6 @@ exclude = ["migrations/versions/*"]
"test/*" = ["D"]
"migrations/*" = ["D", "Q"]

[tool.ruff.pep8-naming]
# Allow Pydantic's `@validator` decorator to trigger class method treatment.
classmethod-decorators = ["pydantic.validator", "pydantic.root_validator"]

[tool.ruff.isort]
known-first-party = ["pudl"]

Expand Down
1 change: 1 addition & 0 deletions src/pudl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
convert,
etl,
extract,
ferc_to_sqlite,
glue,
helpers,
io_managers,
Expand Down
1 change: 1 addition & 0 deletions src/pudl/etl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from pudl.settings import EtlSettings

from . import (
check_foreign_keys,
eia_bulk_elec_assets,
epacems_assets,
glue_assets,
Expand Down
34 changes: 0 additions & 34 deletions src/pudl/etl/analysis_assets.py

This file was deleted.

Loading

0 comments on commit cf8d4f1

Please sign in to comment.