Skip to content

Commit

Permalink
tests: add columns for total diverted
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobdadams committed Sep 4, 2024
1 parent 3ea9dec commit 5ba3011
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wmrc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

COUNTIES_ITEMID = "90431cac2f9f49f4bcf1505419583753"

FACILITIES_LAYER_ITEMID = "d6736e9525274eadb7461b2fd08c426d" #: Beta version
# FACILITIES_LAYER_ITEMID = "056bbc52ff3240f6b69666750a61aeff" #: Live version
# FACILITIES_LAYER_ITEMID = "d6736e9525274eadb7461b2fd08c426d" #: Beta version
FACILITIES_LAYER_ITEMID = "056bbc52ff3240f6b69666750a61aeff" #: Live version
JOIN_COLUMN = "id_"

COUNTY_LAYER_ITEMID = "ea80c3c34bb147fba462ea100179bf09"
Expand Down
4 changes: 4 additions & 0 deletions tests/test_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ def test_state_year_over_year_happy_path(self):
"statewide_msw_landfilled_2023": [100.0],
"statewide_msw_landfilled_2022": [50.0],
"statewide_msw_landfilled_diff": [50.0],
"statewide_msw_diverted_total_pct_change": [(64 - 53) / 53 * 100],
"statewide_msw_diverted_total_2023": [64.0],
"statewide_msw_diverted_total_2022": [53.0],
"statewide_msw_diverted_total_diff": [11.0],
"statewide_msw_recycling_rate_pct_change": [recycling_rate_diff / recycling_rate_2022 * 100],
"statewide_msw_recycling_rate_2023": [recycling_rate_2023],
"statewide_msw_recycling_rate_2022": [recycling_rate_2022],
Expand Down
2 changes: 2 additions & 0 deletions tests/test_yearly.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pandas as pd

from wmrc import yearly


Expand Down Expand Up @@ -77,6 +78,7 @@ def test_statewide_metrics_removes_out_of_state_values(self):
"statewide_msw_composted": 50,
"statewide_msw_digested": 10,
"statewide_msw_landfilled": 200,
"statewide_msw_diverted_total": 100,
"statewide_msw_recycling_rate": 100 / 300 * 100,
}
)
Expand Down

0 comments on commit 5ba3011

Please sign in to comment.