Skip to content

Commit

Permalink
Merge pull request #1940 from catalyst-cooperative/fix-crosswalk-indu…
Browse files Browse the repository at this point in the history
…ced-build-fails

Fix build error for `epacamd_eia_test`
  • Loading branch information
aesharpe authored Sep 22, 2022
2 parents 2ddd197 + 8dd15ed commit e46494e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions test/validate/eia_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def test_no_null_cols_eia(pudl_out_eia, live_dbs, cols, df_name):
("gf_nonuclear_eia923", 2_646_290, 2_646_290, 226_602),
("gf_nuclear_eia923", 24_617, 24_617, 2_058),
("own_eia860", 84_364, 84_364, 84_364),
("plants_eia860", 185_071, 185_071, 185_071),
("pu_eia860", 184_260, 184_260, 184_260),
("utils_eia860", 119_158, 119_158, 119_158),
("plants_eia860", 185_069, 185_069, 185_069),
("pu_eia860", 184_258, 184_258, 184_258),
("utils_eia860", 119_156, 119_156, 119_156),
],
)
def test_minmax_rows(
Expand Down
14 changes: 6 additions & 8 deletions test/validate/epacamd_eia_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@

import pytest

from pudl.validate import check_unique_rows
from pudl.validate import check_max_rows, check_min_rows

logger = logging.getLogger(__name__)


def test_unique_ids(pudl_out_eia, live_dbs):
def test_minmax_rows(pudl_out_orig, live_dbs):
"""Test whether the EIA plants and EPA unit pairings are unique."""
if not live_dbs:
pytest.skip("Data validation only works with a live PUDL DB.")
# Should I add these args to the pudl.validate module?
check_unique_rows(
pudl_out_eia.epacamd_eia,
["plant_id_eia", "emissions_unit_id_epa"],
"epacamd_eia",
)

pudl_out_orig.epacamd_eia().pipe(
check_min_rows, expected_rows=6407, margin=0.0, df_name="epacamd_eia"
).pipe(check_max_rows, expected_rows=6407, margin=0.0, df_name="epacamd_eia")

0 comments on commit e46494e

Please sign in to comment.