Skip to content

Commit

Permalink
Transform data and update validation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
e-belfer committed Oct 10, 2024
1 parent 7320803 commit 08c2568
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
1 change: 0 additions & 1 deletion src/pudl/extract/eia923.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ def __init__(self, *args, **kwargs):

def process_raw(self, df, page, **partition):
"""Drops reserved columns."""
logger.info(df)
to_drop = [c for c in df.columns if c[:8] == "reserved"]
df = df.drop(to_drop, axis=1)
df = df.rename(columns=self._metadata.get_column_map(page, **partition))
Expand Down
2 changes: 1 addition & 1 deletion src/pudl/transform/eia923.py
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ def cooling_system_information_continuity(csi): # pragma: no cover
"monthly_total_withdrawal_volume_gallons": 0.3,
},
groupby_col="report_date",
n_outliers_allowed=1,
n_outliers_allowed=2,
)


Expand Down
12 changes: 6 additions & 6 deletions test/validate/eia_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ def test_no_null_cols_eia(pudl_out_eia, live_dbs, cols, df_name):
@pytest.mark.parametrize(
"df_name,raw_rows,monthly_rows,annual_rows",
[
("bf_eia923", 1_661_460, 1_661_460, 135_980),
("bga_eia860", 153_487, 153_487, 153_487),
("boil_eia860", 89_053, 89_053, 89_053),
("frc_eia923", 676_851, 276_108, 26_709),
("gen_eia923", None, 5_753_883, 479_379),
("bf_eia923", 1_670_698, 1_670_698, 136_757),
("bga_eia860", 154_378, 154_378, 154_378),
("boil_eia860", 89_121, 89_121, 89_121),
("frc_eia923", 681_764, 277_763, 26_781),
("gen_eia923", None, 5_756_595, 479_605),
("gens_eia860", 591_645, 591_645, 591_645),
("gf_eia923", 3_074_782, 3_074_782, 260_840),
("gf_eia923", 3_105_223, 3_105_223, 263_056),
("own_eia860", 95_118, 95_118, 95_118),
("plants_eia860", 216_513, 216_513, 216_513),
("pu_eia860", 215_596, 215_596, 215_596),
Expand Down
10 changes: 5 additions & 5 deletions test/validate/mcoe_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def test_no_null_rows_mcoe(pudl_out_mcoe, live_dbs, df_name, thresh):
@pytest.mark.parametrize(
"df_name,monthly_rows,annual_rows",
[
("hr_by_unit", 413_173, 34_427),
("hr_by_gen", 644_616, 53_707),
("fuel_cost", 644_616, 53_707),
("capacity_factor", 5_753_883, 479_379),
("mcoe", 5_753_954, 479_383),
("hr_by_unit", 415_117, 34_589),
("hr_by_gen", 648_072, 53_995),
("fuel_cost", 648_072, 53_995),
("capacity_factor", 5_756_595, 479_605),
("mcoe", 5_756_666, 479_609),
],
)
def test_minmax_rows_mcoe(pudl_out_mcoe, live_dbs, monthly_rows, annual_rows, df_name):
Expand Down

0 comments on commit 08c2568

Please sign in to comment.