Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- bump: patch
- bump: minor
changes:
fixed:
- Versioning workflow checkout for push events
added:
- tests to verify SparseMatrixBuilder correctly calculates variables and constraints into the calibration matrix.
1 change: 0 additions & 1 deletion policyengine_us_data/datasets/cps/cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from microimpute.models.qrf import QRF
import logging


test_lite = os.environ.get("TEST_LITE") == "true"
print(f"TEST_LITE == {test_lite}")

Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/datasets/cps/enhanced_cps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from pathlib import Path
import logging


try:
import torch
except ImportError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
StateCode,
)


# State/Geographic Mappings
STATE_CODES = {
1: "AL",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
create_target_groups,
)


logger = logging.getLogger(__name__)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,20 +199,12 @@ def build_matrix(
):
mask[:] = False
else:
try:
values = state_sim.calculate(
c["variable"], map_to="household"
).values
mask &= apply_op(
values, c["operation"], c["value"]
)
except Exception as e:
# Variable may not exist or may not be
# calculable at household level - skip
logger.debug(
f"Could not evaluate constraint "
f"{c['variable']}: {e}"
)
values = state_sim.calculate(
c["variable"], map_to="household"
).values
mask &= apply_op(
values, c["operation"], c["value"]
)

if not mask.any():
continue
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/datasets/puf/puf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
create_policyengine_uprating_factors_table,
)


rng = np.random.default_rng(seed=64)

# Get Qualified Business Income simulation parameters ---
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/datasets/puf/uprate_puf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import numpy as np
from policyengine_us_data.storage import STORAGE_FOLDER


ITMDED_GROW_RATE = 0.02 # annual growth rate in itemized deduction amounts

USE_VARIABLE_SPECIFIC_POPULATION_GROWTH_DIVISORS = False
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/db/create_database_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from policyengine_us_data.storage import STORAGE_FOLDER


logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/db/etl_age.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
)
from policyengine_us_data.utils.census import get_census_docs, pull_acs_table


LABEL_TO_SHORT = {
"Estimate!!Total!!Total population!!AGE!!Under 5 years": "0-4",
"Estimate!!Total!!Total population!!AGE!!5 to 9 years": "5-9",
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/db/etl_irs_soi.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
get_district_mapping,
)


"""See the 22incddocguide.docx manual from the IRS SOI"""
# Let's make this work with strict inequalities
# Language in the doc: '$10,000 under $25,000'
Expand Down
1 change: 0 additions & 1 deletion policyengine_us_data/db/validate_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import pandas as pd
from policyengine_us.system import system


conn = sqlite3.connect("policyengine_us_data/storage/policy_data.db")

stratum_constraints_df = pd.read_sql("SELECT * FROM stratum_constraints", conn)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
STATE_NAME_TO_ABBREV,
)


STATE_NAME_TO_FIPS = {
"Alabama": "01",
"Alaska": "02",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
LOCAL_FOLDER,
)


# Sample data that mimics the format from census.gov
SAMPLE_CENSUS_DATA = """STATE|STATEFP|COUNTYFP|COUNTYNAME
AL|01|001|Autauga County
Expand Down
Loading