From c6c55d5894f45d1c2543bff5ee28349fffded44d Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 10 Apr 2024 15:12:20 -0600 Subject: [PATCH 1/9] move calculators to state folders --- programs/programs/__init__.py | 62 +----- programs/programs/co/__init__.py | 56 +++++ .../basic_cash_assistance/__init__.py | 0 .../basic_cash_assistance/calculator.py | 0 .../programs/{ => co}/cash_back/__init__.py | 0 .../programs/{ => co}/cash_back/calculator.py | 0 .../child_care_assistance/__init__.py | 0 .../child_care_assistance/calculator.py | 0 .../{ => co}/connect_for_health/__init__.py | 0 .../{ => co}/connect_for_health/calculator.py | 0 .../{ => co}/connect_for_health/tests.py | 0 .../dental_health_care_seniors/__init__.py | 0 .../dental_health_care_seniors/calculator.py | 0 .../dental_health_care_seniors/tests.py | 0 .../denver_preschool_program/__init__.py | 0 .../denver_preschool_program/calculator.py | 0 .../denver_preschool_program/tests.py | 0 .../{ => co}/energy_assistance/__init__.py | 0 .../{ => co}/energy_assistance/calculator.py | 0 .../energy_resource_center/__init__.py | 0 .../energy_resource_center/calculator.py | 0 .../{ => co}/energy_resource_center/tests.py | 0 .../{ => co}/every_day_eats/__init__.py | 0 .../{ => co}/every_day_eats/calculator.py | 0 .../programs/{ => co}/every_day_eats/tests.py | 0 .../low_wage_covid_relief}/__init__.py | 0 .../low_wage_covid_relief/calculator.py | 0 .../adult_with_disability}/__init__.py | 0 .../adult_with_disability/calculator.py | 0 .../child_with_disability}/__init__.py | 0 .../child_with_disability/calculator.py | 0 .../medicaid/emergency}/__init__.py | 0 .../{ => co}/medicaid/emergency/calculator.py | 0 .../family_planning_services}/__init__.py | 0 .../family_planning_services/calculator.py | 0 .../family_planning_services/tests.py | 0 .../my_spark}/__init__.py | 0 .../programs/{ => co}/my_spark/calculator.py | 0 .../mydenver}/__init__.py | 0 .../programs/{ => co}/mydenver/calculator.py | 0 programs/programs/{ => co}/nfp/calculator.py | 0 .../{my_spark => co/omnisalud}/__init__.py | 0 .../programs/{ => co}/omnisalud/calculator.py | 0 programs/programs/{ => co}/omnisalud/tests.py | 0 programs/programs/co/pe/__init__.py | 22 ++ programs/programs/co/pe/member.py | 61 ++++++ .../{mydenver/__init__.py => co/pe/spm.py} | 0 .../calculators/programs => co/pe}/tax.py | 32 +-- .../property_credit_rebate}/__init__.py | 0 .../property_credit_rebate/calculator.py | 0 .../{ => co}/property_credit_rebate/tests.py | 0 .../rental_assistance_grant}/__init__.py | 0 .../rental_assistance_grant/calculator.py | 0 .../reproductive_health_care}/__init__.py | 0 .../reproductive_health_care/calculator.py | 0 .../reproductive_health_care/tests.py | 0 .../rtdlive}/__init__.py | 0 .../programs/{ => co}/rtdlive/calculator.py | 0 .../{rtdlive => co/tabor}/__init__.py | 0 .../programs/{ => co}/tabor/calculator.py | 0 .../programs/{ssdi => co/trua}/__init__.py | 0 programs/programs/{ => co}/trua/calculator.py | 0 .../universal_preschool}/__init__.py | 0 .../universal_preschool/calculator.py | 0 .../{trua => co/utility_bill_pay}/__init__.py | 0 .../{ => co}/utility_bill_pay/calculator.py | 0 .../weatherization_assistance}/__init__.py | 0 .../weatherization_assistance/calculator.py | 0 programs/programs/federal/__init__.py | 10 + .../head_start}/__init__.py | 0 .../{ => federal}/head_start/calculator.py | 2 +- .../head_start/eligible_zipcodes.py | 0 .../{ => federal}/head_start/tests.py | 0 .../medicare_savings}/__init__.py | 0 .../medicare_savings/calculator.py | 0 programs/programs/federal/pe/__init__.py | 31 +++ programs/programs/federal/pe/member.py | 119 +++++++++++ .../programs => federal/pe}/spm.py | 9 +- programs/programs/federal/pe/tax.py | 27 +++ programs/programs/federal/ssdi/__init__.py | 0 .../programs/{ => federal}/ssdi/calculator.py | 0 programs/programs/nc/__init__.py | 0 programs/programs/nc/pe/__init__.py | 13 ++ programs/programs/nc/pe/member.py | 13 ++ .../policyengine/calculators/__init__.py | 31 ++- .../programs/policyengine/calculators/base.py | 38 +++- .../calculators/programs/__init__.py | 29 --- .../calculators/programs/member.py | 192 ------------------ .../programs/policyengine/policy_engine.py | 6 +- screener/views.py | 20 +- 90 files changed, 427 insertions(+), 346 deletions(-) create mode 100644 programs/programs/co/__init__.py rename programs/programs/{ => co}/basic_cash_assistance/__init__.py (100%) rename programs/programs/{ => co}/basic_cash_assistance/calculator.py (100%) rename programs/programs/{ => co}/cash_back/__init__.py (100%) rename programs/programs/{ => co}/cash_back/calculator.py (100%) rename programs/programs/{ => co}/child_care_assistance/__init__.py (100%) rename programs/programs/{ => co}/child_care_assistance/calculator.py (100%) rename programs/programs/{ => co}/connect_for_health/__init__.py (100%) rename programs/programs/{ => co}/connect_for_health/calculator.py (100%) rename programs/programs/{ => co}/connect_for_health/tests.py (100%) rename programs/programs/{ => co}/dental_health_care_seniors/__init__.py (100%) rename programs/programs/{ => co}/dental_health_care_seniors/calculator.py (100%) rename programs/programs/{ => co}/dental_health_care_seniors/tests.py (100%) rename programs/programs/{ => co}/denver_preschool_program/__init__.py (100%) rename programs/programs/{ => co}/denver_preschool_program/calculator.py (100%) rename programs/programs/{ => co}/denver_preschool_program/tests.py (100%) rename programs/programs/{ => co}/energy_assistance/__init__.py (100%) rename programs/programs/{ => co}/energy_assistance/calculator.py (100%) rename programs/programs/{ => co}/energy_resource_center/__init__.py (100%) rename programs/programs/{ => co}/energy_resource_center/calculator.py (100%) rename programs/programs/{ => co}/energy_resource_center/tests.py (100%) rename programs/programs/{ => co}/every_day_eats/__init__.py (100%) rename programs/programs/{ => co}/every_day_eats/calculator.py (100%) rename programs/programs/{ => co}/every_day_eats/tests.py (100%) rename programs/programs/{head_start => co/low_wage_covid_relief}/__init__.py (100%) rename programs/programs/{ => co}/low_wage_covid_relief/calculator.py (100%) rename programs/programs/{low_wage_covid_relief => co/medicaid/adult_with_disability}/__init__.py (100%) rename programs/programs/{ => co}/medicaid/adult_with_disability/calculator.py (100%) rename programs/programs/{medicaid/adult_with_disability => co/medicaid/child_with_disability}/__init__.py (100%) rename programs/programs/{ => co}/medicaid/child_with_disability/calculator.py (100%) rename programs/programs/{medicaid/child_with_disability => co/medicaid/emergency}/__init__.py (100%) rename programs/programs/{ => co}/medicaid/emergency/calculator.py (100%) rename programs/programs/{medicaid/emergency => co/medicaid/family_planning_services}/__init__.py (100%) rename programs/programs/{ => co}/medicaid/family_planning_services/calculator.py (100%) rename programs/programs/{ => co}/medicaid/family_planning_services/tests.py (100%) rename programs/programs/{medicaid/family_planning_services => co/my_spark}/__init__.py (100%) rename programs/programs/{ => co}/my_spark/calculator.py (100%) rename programs/programs/{medicare_savings => co/mydenver}/__init__.py (100%) rename programs/programs/{ => co}/mydenver/calculator.py (100%) rename programs/programs/{ => co}/nfp/calculator.py (100%) rename programs/programs/{my_spark => co/omnisalud}/__init__.py (100%) rename programs/programs/{ => co}/omnisalud/calculator.py (100%) rename programs/programs/{ => co}/omnisalud/tests.py (100%) create mode 100644 programs/programs/co/pe/__init__.py create mode 100644 programs/programs/co/pe/member.py rename programs/programs/{mydenver/__init__.py => co/pe/spm.py} (100%) rename programs/programs/{policyengine/calculators/programs => co/pe}/tax.py (60%) rename programs/programs/{omnisalud => co/property_credit_rebate}/__init__.py (100%) rename programs/programs/{ => co}/property_credit_rebate/calculator.py (100%) rename programs/programs/{ => co}/property_credit_rebate/tests.py (100%) rename programs/programs/{property_credit_rebate => co/rental_assistance_grant}/__init__.py (100%) rename programs/programs/{ => co}/rental_assistance_grant/calculator.py (100%) rename programs/programs/{rental_assistance_grant => co/reproductive_health_care}/__init__.py (100%) rename programs/programs/{ => co}/reproductive_health_care/calculator.py (100%) rename programs/programs/{ => co}/reproductive_health_care/tests.py (100%) rename programs/programs/{reproductive_health_care => co/rtdlive}/__init__.py (100%) rename programs/programs/{ => co}/rtdlive/calculator.py (100%) rename programs/programs/{rtdlive => co/tabor}/__init__.py (100%) rename programs/programs/{ => co}/tabor/calculator.py (100%) rename programs/programs/{ssdi => co/trua}/__init__.py (100%) rename programs/programs/{ => co}/trua/calculator.py (100%) rename programs/programs/{tabor => co/universal_preschool}/__init__.py (100%) rename programs/programs/{ => co}/universal_preschool/calculator.py (100%) rename programs/programs/{trua => co/utility_bill_pay}/__init__.py (100%) rename programs/programs/{ => co}/utility_bill_pay/calculator.py (100%) rename programs/programs/{universal_preschool => co/weatherization_assistance}/__init__.py (100%) rename programs/programs/{ => co}/weatherization_assistance/calculator.py (100%) create mode 100644 programs/programs/federal/__init__.py rename programs/programs/{utility_bill_pay => federal/head_start}/__init__.py (100%) rename programs/programs/{ => federal}/head_start/calculator.py (95%) rename programs/programs/{ => federal}/head_start/eligible_zipcodes.py (100%) rename programs/programs/{ => federal}/head_start/tests.py (100%) rename programs/programs/{weatherization_assistance => federal/medicare_savings}/__init__.py (100%) rename programs/programs/{ => federal}/medicare_savings/calculator.py (100%) create mode 100644 programs/programs/federal/pe/__init__.py create mode 100644 programs/programs/federal/pe/member.py rename programs/programs/{policyengine/calculators/programs => federal/pe}/spm.py (92%) create mode 100644 programs/programs/federal/pe/tax.py create mode 100644 programs/programs/federal/ssdi/__init__.py rename programs/programs/{ => federal}/ssdi/calculator.py (100%) create mode 100644 programs/programs/nc/__init__.py create mode 100644 programs/programs/nc/pe/__init__.py create mode 100644 programs/programs/nc/pe/member.py delete mode 100644 programs/programs/policyengine/calculators/programs/__init__.py delete mode 100644 programs/programs/policyengine/calculators/programs/member.py diff --git a/programs/programs/__init__.py b/programs/programs/__init__.py index 25d71b5d..f2f2c433 100644 --- a/programs/programs/__init__.py +++ b/programs/programs/__init__.py @@ -1,62 +1,8 @@ -from .rtdlive.calculator import RtdLive -from .child_care_assistance.calculator import ChildCareAssistance -from .mydenver.calculator import MyDenver -from .cash_back.calculator import CashBack -from .energy_assistance.calculator import EnergyAssistance -from .energy_resource_center.calculator import EnergyResourceCenter -from .omnisalud.calculator import OmniSalud -from .dental_health_care_seniors.calculator import DentalHealthCareSeniors -from .reproductive_health_care.calculator import ReproductiveHealthCare -from .connect_for_health.calculator import ConnectForHealth -from .medicaid.family_planning_services.calculator import FamilyPlanningServices -from .denver_preschool_program.calculator import DenverPreschoolProgram -from .head_start.calculator import HeadStart -from .every_day_eats.calculator import EveryDayEats -from .property_credit_rebate.calculator import PropertyCreditRebate -from .universal_preschool.calculator import UniversalPreschool -from .my_spark.calculator import MySpark -from .ssdi.calculator import Ssdi -from .low_wage_covid_relief.calculator import LowWageCovidRelief -from .medicaid.child_with_disability.calculator import MedicaidChildWithDisability -from .medicaid.adult_with_disability.calculator import MedicaidAdultWithDisability -from .medicaid.emergency.calculator import EmergencyMedicaid -from .medicare_savings.calculator import MedicareSavings -from .basic_cash_assistance.calculator import BasicCashAssistance -from .weatherization_assistance.calculator import WeatherizationAssistance -from .tabor.calculator import Tabor -from .trua.calculator import Trua -from .utility_bill_pay.calculator import UtilityBillPay +from .co import co_calculators +from .federal import federal_calculators from .calc import ProgramCalculator -from .rental_assistance_grant.calculator import RentalAssistanceGrant calculators: dict[str, type[ProgramCalculator]] = { - 'rtdlive': RtdLive, - 'cccap': ChildCareAssistance, - 'mydenver': MyDenver, - 'cocb': CashBack, - 'leap': EnergyAssistance, - 'erc': EnergyResourceCenter, - 'omnisalud': OmniSalud, - 'cdhcs': DentalHealthCareSeniors, - 'rhc': ReproductiveHealthCare, - 'cfhc': ConnectForHealth, - 'fps': FamilyPlanningServices, - 'chs': HeadStart, - 'dpp': DenverPreschoolProgram, - 'ede': EveryDayEats, - 'cpcr': PropertyCreditRebate, - 'upk': UniversalPreschool, - 'myspark': MySpark, - 'ssdi': Ssdi, - 'lwcr': LowWageCovidRelief, - 'cwd_medicaid': MedicaidChildWithDisability, - 'awd_medicaid': MedicaidAdultWithDisability, - 'emergency_medicaid': EmergencyMedicaid, - 'medicare_savings': MedicareSavings, - 'bca': BasicCashAssistance, - 'cowap': WeatherizationAssistance, - 'tabor': Tabor, - 'trua': Trua, - 'ubp': UtilityBillPay, - 'rag': RentalAssistanceGrant, + **co_calculators, + **federal_calculators } diff --git a/programs/programs/co/__init__.py b/programs/programs/co/__init__.py new file mode 100644 index 00000000..47a980d0 --- /dev/null +++ b/programs/programs/co/__init__.py @@ -0,0 +1,56 @@ +from .rtdlive.calculator import RtdLive +from .child_care_assistance.calculator import ChildCareAssistance +from .mydenver.calculator import MyDenver +from .cash_back.calculator import CashBack +from .energy_assistance.calculator import EnergyAssistance +from .energy_resource_center.calculator import EnergyResourceCenter +from .omnisalud.calculator import OmniSalud +from .dental_health_care_seniors.calculator import DentalHealthCareSeniors +from .reproductive_health_care.calculator import ReproductiveHealthCare +from .connect_for_health.calculator import ConnectForHealth +from .medicaid.family_planning_services.calculator import FamilyPlanningServices +from .denver_preschool_program.calculator import DenverPreschoolProgram +from .every_day_eats.calculator import EveryDayEats +from .property_credit_rebate.calculator import PropertyCreditRebate +from .universal_preschool.calculator import UniversalPreschool +from .my_spark.calculator import MySpark +from .low_wage_covid_relief.calculator import LowWageCovidRelief +from .medicaid.child_with_disability.calculator import MedicaidChildWithDisability +from .medicaid.adult_with_disability.calculator import MedicaidAdultWithDisability +from .medicaid.emergency.calculator import EmergencyMedicaid +from .basic_cash_assistance.calculator import BasicCashAssistance +from .weatherization_assistance.calculator import WeatherizationAssistance +from .tabor.calculator import Tabor +from .trua.calculator import Trua +from .utility_bill_pay.calculator import UtilityBillPay +from ..calc import ProgramCalculator +from .rental_assistance_grant.calculator import RentalAssistanceGrant + +co_calculators: dict[str, type[ProgramCalculator]] = { + 'rtdlive': RtdLive, + 'cccap': ChildCareAssistance, + 'mydenver': MyDenver, + 'cocb': CashBack, + 'leap': EnergyAssistance, + 'erc': EnergyResourceCenter, + 'omnisalud': OmniSalud, + 'cdhcs': DentalHealthCareSeniors, + 'rhc': ReproductiveHealthCare, + 'cfhc': ConnectForHealth, + 'fps': FamilyPlanningServices, + 'dpp': DenverPreschoolProgram, + 'ede': EveryDayEats, + 'cpcr': PropertyCreditRebate, + 'upk': UniversalPreschool, + 'myspark': MySpark, + 'lwcr': LowWageCovidRelief, + 'cwd_medicaid': MedicaidChildWithDisability, + 'awd_medicaid': MedicaidAdultWithDisability, + 'emergency_medicaid': EmergencyMedicaid, + 'bca': BasicCashAssistance, + 'cowap': WeatherizationAssistance, + 'tabor': Tabor, + 'trua': Trua, + 'ubp': UtilityBillPay, + 'rag': RentalAssistanceGrant, +} diff --git a/programs/programs/basic_cash_assistance/__init__.py b/programs/programs/co/basic_cash_assistance/__init__.py similarity index 100% rename from programs/programs/basic_cash_assistance/__init__.py rename to programs/programs/co/basic_cash_assistance/__init__.py diff --git a/programs/programs/basic_cash_assistance/calculator.py b/programs/programs/co/basic_cash_assistance/calculator.py similarity index 100% rename from programs/programs/basic_cash_assistance/calculator.py rename to programs/programs/co/basic_cash_assistance/calculator.py diff --git a/programs/programs/cash_back/__init__.py b/programs/programs/co/cash_back/__init__.py similarity index 100% rename from programs/programs/cash_back/__init__.py rename to programs/programs/co/cash_back/__init__.py diff --git a/programs/programs/cash_back/calculator.py b/programs/programs/co/cash_back/calculator.py similarity index 100% rename from programs/programs/cash_back/calculator.py rename to programs/programs/co/cash_back/calculator.py diff --git a/programs/programs/child_care_assistance/__init__.py b/programs/programs/co/child_care_assistance/__init__.py similarity index 100% rename from programs/programs/child_care_assistance/__init__.py rename to programs/programs/co/child_care_assistance/__init__.py diff --git a/programs/programs/child_care_assistance/calculator.py b/programs/programs/co/child_care_assistance/calculator.py similarity index 100% rename from programs/programs/child_care_assistance/calculator.py rename to programs/programs/co/child_care_assistance/calculator.py diff --git a/programs/programs/connect_for_health/__init__.py b/programs/programs/co/connect_for_health/__init__.py similarity index 100% rename from programs/programs/connect_for_health/__init__.py rename to programs/programs/co/connect_for_health/__init__.py diff --git a/programs/programs/connect_for_health/calculator.py b/programs/programs/co/connect_for_health/calculator.py similarity index 100% rename from programs/programs/connect_for_health/calculator.py rename to programs/programs/co/connect_for_health/calculator.py diff --git a/programs/programs/connect_for_health/tests.py b/programs/programs/co/connect_for_health/tests.py similarity index 100% rename from programs/programs/connect_for_health/tests.py rename to programs/programs/co/connect_for_health/tests.py diff --git a/programs/programs/dental_health_care_seniors/__init__.py b/programs/programs/co/dental_health_care_seniors/__init__.py similarity index 100% rename from programs/programs/dental_health_care_seniors/__init__.py rename to programs/programs/co/dental_health_care_seniors/__init__.py diff --git a/programs/programs/dental_health_care_seniors/calculator.py b/programs/programs/co/dental_health_care_seniors/calculator.py similarity index 100% rename from programs/programs/dental_health_care_seniors/calculator.py rename to programs/programs/co/dental_health_care_seniors/calculator.py diff --git a/programs/programs/dental_health_care_seniors/tests.py b/programs/programs/co/dental_health_care_seniors/tests.py similarity index 100% rename from programs/programs/dental_health_care_seniors/tests.py rename to programs/programs/co/dental_health_care_seniors/tests.py diff --git a/programs/programs/denver_preschool_program/__init__.py b/programs/programs/co/denver_preschool_program/__init__.py similarity index 100% rename from programs/programs/denver_preschool_program/__init__.py rename to programs/programs/co/denver_preschool_program/__init__.py diff --git a/programs/programs/denver_preschool_program/calculator.py b/programs/programs/co/denver_preschool_program/calculator.py similarity index 100% rename from programs/programs/denver_preschool_program/calculator.py rename to programs/programs/co/denver_preschool_program/calculator.py diff --git a/programs/programs/denver_preschool_program/tests.py b/programs/programs/co/denver_preschool_program/tests.py similarity index 100% rename from programs/programs/denver_preschool_program/tests.py rename to programs/programs/co/denver_preschool_program/tests.py diff --git a/programs/programs/energy_assistance/__init__.py b/programs/programs/co/energy_assistance/__init__.py similarity index 100% rename from programs/programs/energy_assistance/__init__.py rename to programs/programs/co/energy_assistance/__init__.py diff --git a/programs/programs/energy_assistance/calculator.py b/programs/programs/co/energy_assistance/calculator.py similarity index 100% rename from programs/programs/energy_assistance/calculator.py rename to programs/programs/co/energy_assistance/calculator.py diff --git a/programs/programs/energy_resource_center/__init__.py b/programs/programs/co/energy_resource_center/__init__.py similarity index 100% rename from programs/programs/energy_resource_center/__init__.py rename to programs/programs/co/energy_resource_center/__init__.py diff --git a/programs/programs/energy_resource_center/calculator.py b/programs/programs/co/energy_resource_center/calculator.py similarity index 100% rename from programs/programs/energy_resource_center/calculator.py rename to programs/programs/co/energy_resource_center/calculator.py diff --git a/programs/programs/energy_resource_center/tests.py b/programs/programs/co/energy_resource_center/tests.py similarity index 100% rename from programs/programs/energy_resource_center/tests.py rename to programs/programs/co/energy_resource_center/tests.py diff --git a/programs/programs/every_day_eats/__init__.py b/programs/programs/co/every_day_eats/__init__.py similarity index 100% rename from programs/programs/every_day_eats/__init__.py rename to programs/programs/co/every_day_eats/__init__.py diff --git a/programs/programs/every_day_eats/calculator.py b/programs/programs/co/every_day_eats/calculator.py similarity index 100% rename from programs/programs/every_day_eats/calculator.py rename to programs/programs/co/every_day_eats/calculator.py diff --git a/programs/programs/every_day_eats/tests.py b/programs/programs/co/every_day_eats/tests.py similarity index 100% rename from programs/programs/every_day_eats/tests.py rename to programs/programs/co/every_day_eats/tests.py diff --git a/programs/programs/head_start/__init__.py b/programs/programs/co/low_wage_covid_relief/__init__.py similarity index 100% rename from programs/programs/head_start/__init__.py rename to programs/programs/co/low_wage_covid_relief/__init__.py diff --git a/programs/programs/low_wage_covid_relief/calculator.py b/programs/programs/co/low_wage_covid_relief/calculator.py similarity index 100% rename from programs/programs/low_wage_covid_relief/calculator.py rename to programs/programs/co/low_wage_covid_relief/calculator.py diff --git a/programs/programs/low_wage_covid_relief/__init__.py b/programs/programs/co/medicaid/adult_with_disability/__init__.py similarity index 100% rename from programs/programs/low_wage_covid_relief/__init__.py rename to programs/programs/co/medicaid/adult_with_disability/__init__.py diff --git a/programs/programs/medicaid/adult_with_disability/calculator.py b/programs/programs/co/medicaid/adult_with_disability/calculator.py similarity index 100% rename from programs/programs/medicaid/adult_with_disability/calculator.py rename to programs/programs/co/medicaid/adult_with_disability/calculator.py diff --git a/programs/programs/medicaid/adult_with_disability/__init__.py b/programs/programs/co/medicaid/child_with_disability/__init__.py similarity index 100% rename from programs/programs/medicaid/adult_with_disability/__init__.py rename to programs/programs/co/medicaid/child_with_disability/__init__.py diff --git a/programs/programs/medicaid/child_with_disability/calculator.py b/programs/programs/co/medicaid/child_with_disability/calculator.py similarity index 100% rename from programs/programs/medicaid/child_with_disability/calculator.py rename to programs/programs/co/medicaid/child_with_disability/calculator.py diff --git a/programs/programs/medicaid/child_with_disability/__init__.py b/programs/programs/co/medicaid/emergency/__init__.py similarity index 100% rename from programs/programs/medicaid/child_with_disability/__init__.py rename to programs/programs/co/medicaid/emergency/__init__.py diff --git a/programs/programs/medicaid/emergency/calculator.py b/programs/programs/co/medicaid/emergency/calculator.py similarity index 100% rename from programs/programs/medicaid/emergency/calculator.py rename to programs/programs/co/medicaid/emergency/calculator.py diff --git a/programs/programs/medicaid/emergency/__init__.py b/programs/programs/co/medicaid/family_planning_services/__init__.py similarity index 100% rename from programs/programs/medicaid/emergency/__init__.py rename to programs/programs/co/medicaid/family_planning_services/__init__.py diff --git a/programs/programs/medicaid/family_planning_services/calculator.py b/programs/programs/co/medicaid/family_planning_services/calculator.py similarity index 100% rename from programs/programs/medicaid/family_planning_services/calculator.py rename to programs/programs/co/medicaid/family_planning_services/calculator.py diff --git a/programs/programs/medicaid/family_planning_services/tests.py b/programs/programs/co/medicaid/family_planning_services/tests.py similarity index 100% rename from programs/programs/medicaid/family_planning_services/tests.py rename to programs/programs/co/medicaid/family_planning_services/tests.py diff --git a/programs/programs/medicaid/family_planning_services/__init__.py b/programs/programs/co/my_spark/__init__.py similarity index 100% rename from programs/programs/medicaid/family_planning_services/__init__.py rename to programs/programs/co/my_spark/__init__.py diff --git a/programs/programs/my_spark/calculator.py b/programs/programs/co/my_spark/calculator.py similarity index 100% rename from programs/programs/my_spark/calculator.py rename to programs/programs/co/my_spark/calculator.py diff --git a/programs/programs/medicare_savings/__init__.py b/programs/programs/co/mydenver/__init__.py similarity index 100% rename from programs/programs/medicare_savings/__init__.py rename to programs/programs/co/mydenver/__init__.py diff --git a/programs/programs/mydenver/calculator.py b/programs/programs/co/mydenver/calculator.py similarity index 100% rename from programs/programs/mydenver/calculator.py rename to programs/programs/co/mydenver/calculator.py diff --git a/programs/programs/nfp/calculator.py b/programs/programs/co/nfp/calculator.py similarity index 100% rename from programs/programs/nfp/calculator.py rename to programs/programs/co/nfp/calculator.py diff --git a/programs/programs/my_spark/__init__.py b/programs/programs/co/omnisalud/__init__.py similarity index 100% rename from programs/programs/my_spark/__init__.py rename to programs/programs/co/omnisalud/__init__.py diff --git a/programs/programs/omnisalud/calculator.py b/programs/programs/co/omnisalud/calculator.py similarity index 100% rename from programs/programs/omnisalud/calculator.py rename to programs/programs/co/omnisalud/calculator.py diff --git a/programs/programs/omnisalud/tests.py b/programs/programs/co/omnisalud/tests.py similarity index 100% rename from programs/programs/omnisalud/tests.py rename to programs/programs/co/omnisalud/tests.py diff --git a/programs/programs/co/pe/__init__.py b/programs/programs/co/pe/__init__.py new file mode 100644 index 00000000..871fc89a --- /dev/null +++ b/programs/programs/co/pe/__init__.py @@ -0,0 +1,22 @@ +import programs.programs.co.pe.tax as tax +import programs.programs.co.pe.member as member +from programs.programs.policyengine.calculators.base import PolicyEngineCalulator + + +co_member_calculators = { + 'co_medicaid': member.CoMedicaid, + 'andcs': member.AidToTheNeedyAndDisabled, + 'oap': member.OldAgePension, + 'chp': member.Chp, +} + +co_tax_unit_calculators = { + 'coeitc': tax.Coeitc, + 'coctc': tax.Coctc, +} + +co_pe_calculators: dict[str, type[PolicyEngineCalulator]] = { + **co_member_calculators, + **co_tax_unit_calculators, +} + diff --git a/programs/programs/co/pe/member.py b/programs/programs/co/pe/member.py new file mode 100644 index 00000000..ecaca3ea --- /dev/null +++ b/programs/programs/co/pe/member.py @@ -0,0 +1,61 @@ +from programs.programs.policyengine.calculators.base import PolicyEngineMembersCalculator +from programs.programs.federal.pe.member import Medicaid +import programs.programs.policyengine.calculators.dependencies as dependency + + +class CoMedicaid(Medicaid): + child_medicaid_average = 200 * 12 + adult_medicaid_average = 310 * 12 + aged_medicaid_average = 170 * 12 + + +class AidToTheNeedyAndDisabled(PolicyEngineMembersCalculator): + pe_name = 'co_state_supplement' + pe_inputs = [ + dependency.member.SsiCountableResourcesDependency, + dependency.member.SsiReportedDependency, + dependency.member.IsBlindDependency, + dependency.member.IsDisabledDependency, + dependency.member.SsiEarnedIncomeDependency, + dependency.member.SsiUnearnedIncomeDependency, + dependency.member.AgeDependency, + dependency.member.TaxUnitSpouseDependency, + dependency.member.TaxUnitHeadDependency, + dependency.member.TaxUnitDependentDependency, + ] + pe_outputs = [dependency.member.Andcs] + + +class OldAgePension(PolicyEngineMembersCalculator): + pe_name = 'co_oap' + pe_inputs = [ + dependency.member.SsiCountableResourcesDependency, + dependency.member.SsiEarnedIncomeDependency, + dependency.member.SsiUnearnedIncomeDependency, + dependency.member.AgeDependency, + dependency.member.TaxUnitSpouseDependency, + dependency.member.TaxUnitHeadDependency, + dependency.member.TaxUnitDependentDependency, + ] + pe_outputs = [dependency.member.Oap] + + +class Chp(PolicyEngineMembersCalculator): + pe_name = 'co_chp' + pe_inputs = [ + dependency.member.AgeDependency, + dependency.member.PregnancyDependency, + *dependency.irs_gross_income, + ] + pe_outputs = [dependency.member.ChpEligible] + + amount = 200 * 12 + + def value(self): + total = 0 + + for _, pvalue in self.get_data().items(): + if pvalue['co_chp_eligible'][self.pe_period] > 0 and self.screen.has_insurance_types(('none',)): + total += self.amount + + return total diff --git a/programs/programs/mydenver/__init__.py b/programs/programs/co/pe/spm.py similarity index 100% rename from programs/programs/mydenver/__init__.py rename to programs/programs/co/pe/spm.py diff --git a/programs/programs/policyengine/calculators/programs/tax.py b/programs/programs/co/pe/tax.py similarity index 60% rename from programs/programs/policyengine/calculators/programs/tax.py rename to programs/programs/co/pe/tax.py index d1c63192..e260c77a 100644 --- a/programs/programs/policyengine/calculators/programs/tax.py +++ b/programs/programs/co/pe/tax.py @@ -1,42 +1,14 @@ -from ..base import PolicyEnigineCalulator -from ..constants import PREVIOUS_YEAR +from programs.programs.policyengine.calculators.base import PolicyEngineTaxUnitCalulator +from programs.programs.federal.pe.tax import Eitc import programs.programs.policyengine.calculators.dependencies as dependency -class PolicyEngineTaxUnitCalulator(PolicyEnigineCalulator): - pe_category = 'tax_units' - pe_sub_category = 'tax_unit' - pe_period = PREVIOUS_YEAR - - -class Eitc(PolicyEngineTaxUnitCalulator): - pe_name = 'eitc' - pe_inputs = [ - dependency.member.AgeDependency, - dependency.member.TaxUnitSpouseDependency, - dependency.member.TaxUnitDependentDependency, - *dependency.irs_gross_income, - ] - pe_outputs = [dependency.tax.Eitc] - - class Coeitc(PolicyEngineTaxUnitCalulator): pe_name = 'co_eitc' pe_inputs = Eitc.pe_inputs pe_outputs = [dependency.tax.Coeitc] -class Ctc(PolicyEngineTaxUnitCalulator): - pe_name = 'ctc' - pe_inputs = [ - dependency.member.AgeDependency, - dependency.member.TaxUnitDependentDependency, - dependency.member.TaxUnitSpouseDependency, - *dependency.irs_gross_income, - ] - pe_outputs = [dependency.tax.Ctc] - - class Coctc(PolicyEngineTaxUnitCalulator): pe_name = 'ctc' pe_inputs = [ diff --git a/programs/programs/omnisalud/__init__.py b/programs/programs/co/property_credit_rebate/__init__.py similarity index 100% rename from programs/programs/omnisalud/__init__.py rename to programs/programs/co/property_credit_rebate/__init__.py diff --git a/programs/programs/property_credit_rebate/calculator.py b/programs/programs/co/property_credit_rebate/calculator.py similarity index 100% rename from programs/programs/property_credit_rebate/calculator.py rename to programs/programs/co/property_credit_rebate/calculator.py diff --git a/programs/programs/property_credit_rebate/tests.py b/programs/programs/co/property_credit_rebate/tests.py similarity index 100% rename from programs/programs/property_credit_rebate/tests.py rename to programs/programs/co/property_credit_rebate/tests.py diff --git a/programs/programs/property_credit_rebate/__init__.py b/programs/programs/co/rental_assistance_grant/__init__.py similarity index 100% rename from programs/programs/property_credit_rebate/__init__.py rename to programs/programs/co/rental_assistance_grant/__init__.py diff --git a/programs/programs/rental_assistance_grant/calculator.py b/programs/programs/co/rental_assistance_grant/calculator.py similarity index 100% rename from programs/programs/rental_assistance_grant/calculator.py rename to programs/programs/co/rental_assistance_grant/calculator.py diff --git a/programs/programs/rental_assistance_grant/__init__.py b/programs/programs/co/reproductive_health_care/__init__.py similarity index 100% rename from programs/programs/rental_assistance_grant/__init__.py rename to programs/programs/co/reproductive_health_care/__init__.py diff --git a/programs/programs/reproductive_health_care/calculator.py b/programs/programs/co/reproductive_health_care/calculator.py similarity index 100% rename from programs/programs/reproductive_health_care/calculator.py rename to programs/programs/co/reproductive_health_care/calculator.py diff --git a/programs/programs/reproductive_health_care/tests.py b/programs/programs/co/reproductive_health_care/tests.py similarity index 100% rename from programs/programs/reproductive_health_care/tests.py rename to programs/programs/co/reproductive_health_care/tests.py diff --git a/programs/programs/reproductive_health_care/__init__.py b/programs/programs/co/rtdlive/__init__.py similarity index 100% rename from programs/programs/reproductive_health_care/__init__.py rename to programs/programs/co/rtdlive/__init__.py diff --git a/programs/programs/rtdlive/calculator.py b/programs/programs/co/rtdlive/calculator.py similarity index 100% rename from programs/programs/rtdlive/calculator.py rename to programs/programs/co/rtdlive/calculator.py diff --git a/programs/programs/rtdlive/__init__.py b/programs/programs/co/tabor/__init__.py similarity index 100% rename from programs/programs/rtdlive/__init__.py rename to programs/programs/co/tabor/__init__.py diff --git a/programs/programs/tabor/calculator.py b/programs/programs/co/tabor/calculator.py similarity index 100% rename from programs/programs/tabor/calculator.py rename to programs/programs/co/tabor/calculator.py diff --git a/programs/programs/ssdi/__init__.py b/programs/programs/co/trua/__init__.py similarity index 100% rename from programs/programs/ssdi/__init__.py rename to programs/programs/co/trua/__init__.py diff --git a/programs/programs/trua/calculator.py b/programs/programs/co/trua/calculator.py similarity index 100% rename from programs/programs/trua/calculator.py rename to programs/programs/co/trua/calculator.py diff --git a/programs/programs/tabor/__init__.py b/programs/programs/co/universal_preschool/__init__.py similarity index 100% rename from programs/programs/tabor/__init__.py rename to programs/programs/co/universal_preschool/__init__.py diff --git a/programs/programs/universal_preschool/calculator.py b/programs/programs/co/universal_preschool/calculator.py similarity index 100% rename from programs/programs/universal_preschool/calculator.py rename to programs/programs/co/universal_preschool/calculator.py diff --git a/programs/programs/trua/__init__.py b/programs/programs/co/utility_bill_pay/__init__.py similarity index 100% rename from programs/programs/trua/__init__.py rename to programs/programs/co/utility_bill_pay/__init__.py diff --git a/programs/programs/utility_bill_pay/calculator.py b/programs/programs/co/utility_bill_pay/calculator.py similarity index 100% rename from programs/programs/utility_bill_pay/calculator.py rename to programs/programs/co/utility_bill_pay/calculator.py diff --git a/programs/programs/universal_preschool/__init__.py b/programs/programs/co/weatherization_assistance/__init__.py similarity index 100% rename from programs/programs/universal_preschool/__init__.py rename to programs/programs/co/weatherization_assistance/__init__.py diff --git a/programs/programs/weatherization_assistance/calculator.py b/programs/programs/co/weatherization_assistance/calculator.py similarity index 100% rename from programs/programs/weatherization_assistance/calculator.py rename to programs/programs/co/weatherization_assistance/calculator.py diff --git a/programs/programs/federal/__init__.py b/programs/programs/federal/__init__.py new file mode 100644 index 00000000..b8f23164 --- /dev/null +++ b/programs/programs/federal/__init__.py @@ -0,0 +1,10 @@ +from .ssdi.calculator import Ssdi +from .head_start.calculator import HeadStart +from .medicare_savings.calculator import MedicareSavings +from ..calc import ProgramCalculator + +federal_calculators: dict[str, type[ProgramCalculator]] = { + 'ssdi': Ssdi, + 'chs': HeadStart, + 'medicare_savings': MedicareSavings, +} diff --git a/programs/programs/utility_bill_pay/__init__.py b/programs/programs/federal/head_start/__init__.py similarity index 100% rename from programs/programs/utility_bill_pay/__init__.py rename to programs/programs/federal/head_start/__init__.py diff --git a/programs/programs/head_start/calculator.py b/programs/programs/federal/head_start/calculator.py similarity index 95% rename from programs/programs/head_start/calculator.py rename to programs/programs/federal/head_start/calculator.py index ab2b6751..2e343d80 100644 --- a/programs/programs/head_start/calculator.py +++ b/programs/programs/federal/head_start/calculator.py @@ -1,6 +1,6 @@ from programs.programs.calc import ProgramCalculator, Eligibility import programs.programs.messages as messages -from programs.programs.head_start.eligible_zipcodes import eligible_zipcode +from programs.programs.federal.head_start.eligible_zipcodes import eligible_zipcode from programs.co_county_zips import counties_from_zip diff --git a/programs/programs/head_start/eligible_zipcodes.py b/programs/programs/federal/head_start/eligible_zipcodes.py similarity index 100% rename from programs/programs/head_start/eligible_zipcodes.py rename to programs/programs/federal/head_start/eligible_zipcodes.py diff --git a/programs/programs/head_start/tests.py b/programs/programs/federal/head_start/tests.py similarity index 100% rename from programs/programs/head_start/tests.py rename to programs/programs/federal/head_start/tests.py diff --git a/programs/programs/weatherization_assistance/__init__.py b/programs/programs/federal/medicare_savings/__init__.py similarity index 100% rename from programs/programs/weatherization_assistance/__init__.py rename to programs/programs/federal/medicare_savings/__init__.py diff --git a/programs/programs/medicare_savings/calculator.py b/programs/programs/federal/medicare_savings/calculator.py similarity index 100% rename from programs/programs/medicare_savings/calculator.py rename to programs/programs/federal/medicare_savings/calculator.py diff --git a/programs/programs/federal/pe/__init__.py b/programs/programs/federal/pe/__init__.py new file mode 100644 index 00000000..5416e2db --- /dev/null +++ b/programs/programs/federal/pe/__init__.py @@ -0,0 +1,31 @@ +import programs.programs.federal.pe.tax as tax +import programs.programs.federal.pe.spm as spm +import programs.programs.federal.pe.member as member +from programs.programs.policyengine.calculators.base import PolicyEngineCalulator + + +federal_member_calculators = { + 'wic': member.Wic, + 'pell_grant': member.PellGrant, + 'ssi': member.Ssi, +} + +federal_spm_unit_calculators = { + 'acp': spm.Acp, + 'lifeline': spm.Lifeline, + 'nslp': spm.SchoolLunch, + 'snap': spm.Snap, + 'tanf': spm.Tanf, +} + +federal_tax_unit_calculators = { + 'eitc': tax.Eitc, + 'ctc': tax.Ctc, +} + +federal_pe_calculators: dict[str, type[PolicyEngineCalulator]] = { + **federal_member_calculators, + **federal_spm_unit_calculators, + **federal_tax_unit_calculators, +} + diff --git a/programs/programs/federal/pe/member.py b/programs/programs/federal/pe/member.py new file mode 100644 index 00000000..1c4e456d --- /dev/null +++ b/programs/programs/federal/pe/member.py @@ -0,0 +1,119 @@ +from programs.programs.policyengine.calculators.base import PolicyEngineMembersCalculator +import programs.programs.policyengine.calculators.dependencies as dependency + + +class Wic(PolicyEngineMembersCalculator): + wic_categories = { + 'NONE': 0, + 'INFANT': 130, + 'CHILD': 74, + "PREGNANT": 100, + "POSTPARTUM": 100, + "BREASTFEEDING": 100, + } + pe_name = 'wic' + pe_inputs = [ + dependency.member.PregnancyDependency, + dependency.member.AgeDependency, + *dependency.school_lunch_income, + ] + pe_outputs = [dependency.member.Wic, dependency.member.WicCategory] + + def value(self): + total = 0 + + for _, pvalue in self.get_data().items(): + if pvalue[self.pe_name][self.pe_period] > 0: + total += self.wic_categories[pvalue['wic_category'][self.pe_period]] * 12 + + return total + + +class Medicaid(PolicyEngineMembersCalculator): + pe_name = 'medicaid' + pe_inputs = [ + dependency.member.AgeDependency, + dependency.member.PregnancyDependency, + *dependency.irs_gross_income, + ] + pe_outputs = [ + dependency.member.AgeDependency, + dependency.member.Medicaid, + ] + + child_medicaid_average = 200 * 12 + adult_medicaid_average = 310 * 12 + aged_medicaid_average = 170 * 12 + + presumptive_amount = 74 * 12 + + def _value_by_age(self, age: int): + # here we need to adjust for children as policy engine + # just uses the average which skews very high for adults and + # aged adults + + if age <= 18: + medicaid_estimated_value = self.child_medicaid_average + elif age > 18 and age < 65: + medicaid_estimated_value = self.adult_medicaid_average + elif age >= 65: + medicaid_estimated_value = self.aged_medicaid_average + else: + medicaid_estimated_value = 0 + + return medicaid_estimated_value + + def value(self): + total = 0 + + for _, pvalue in self.get_data().items(): + if pvalue[self.pe_name][self.pe_period] <= 0: + continue + + total += self._value_by_age(pvalue['age'][self.pe_period]) + + in_wic_demographic = False + for member in self.screen.household_members.all(): + if member.pregnant is True or member.age <= 5: + in_wic_demographic = True + if total == 0 and in_wic_demographic: + if self.screen.has_benefit('medicaid') is True \ + or self.screen.has_benefit('tanf') is True \ + or self.screen.has_benefit('snap') is True: + total = self.presumptive_amount + + return total + + +class PellGrant(PolicyEngineMembersCalculator): + pe_name = 'pell_grant' + pe_inputs = [ + dependency.member.PellGrantDependentAvailableIncomeDependency, + dependency.member.PellGrantCountableAssetsDependency, + dependency.member.CostOfAttendingCollegeDependency, + dependency.member.PellGrantMonthsInSchoolDependency, + dependency.tax.PellGrantPrimaryIncomeDependency, + dependency.tax.PellGrantDependentsInCollegeDependency, + dependency.member.TaxUnitDependentDependency, + dependency.member.TaxUnitHeadDependency, + dependency.member.TaxUnitSpouseDependency, + ] + pe_outputs = [dependency.member.PellGrant] + + +class Ssi(PolicyEngineMembersCalculator): + pe_name = 'ssi' + pe_inputs = [ + dependency.member.SsiCountableResourcesDependency, + dependency.member.SsiReportedDependency, + dependency.member.IsBlindDependency, + dependency.member.IsDisabledDependency, + dependency.member.SsiEarnedIncomeDependency, + dependency.member.SsiUnearnedIncomeDependency, + dependency.member.AgeDependency, + dependency.member.TaxUnitSpouseDependency, + dependency.member.TaxUnitHeadDependency, + dependency.member.TaxUnitDependentDependency, + ] + pe_outputs = [dependency.member.Ssi] + diff --git a/programs/programs/policyengine/calculators/programs/spm.py b/programs/programs/federal/pe/spm.py similarity index 92% rename from programs/programs/policyengine/calculators/programs/spm.py rename to programs/programs/federal/pe/spm.py index f48e391a..64e68011 100644 --- a/programs/programs/policyengine/calculators/programs/spm.py +++ b/programs/programs/federal/pe/spm.py @@ -1,13 +1,8 @@ -from ..base import PolicyEnigineCalulator -from ..constants import SNAP_PERIOD +from programs.programs.policyengine.calculators.base import PolicyEngineSpmCalulator +from programs.programs.policyengine.calculators.constants import SNAP_PERIOD import programs.programs.policyengine.calculators.dependencies as dependency -class PolicyEngineSpmCalulator(PolicyEnigineCalulator): - pe_category = 'spm_units' - pe_sub_category = 'spm_unit' - - class Snap(PolicyEngineSpmCalulator): pe_name = 'snap' pe_inputs = [ diff --git a/programs/programs/federal/pe/tax.py b/programs/programs/federal/pe/tax.py new file mode 100644 index 00000000..b7e63e8c --- /dev/null +++ b/programs/programs/federal/pe/tax.py @@ -0,0 +1,27 @@ +from programs.programs.policyengine.calculators.base import PolicyEngineTaxUnitCalulator +import programs.programs.policyengine.calculators.dependencies as dependency + + +class Eitc(PolicyEngineTaxUnitCalulator): + pe_name = 'eitc' + pe_inputs = [ + dependency.member.AgeDependency, + dependency.member.TaxUnitSpouseDependency, + dependency.member.TaxUnitDependentDependency, + *dependency.irs_gross_income, + ] + pe_outputs = [dependency.tax.Eitc] + + + +class Ctc(PolicyEngineTaxUnitCalulator): + pe_name = 'ctc' + pe_inputs = [ + dependency.member.AgeDependency, + dependency.member.TaxUnitDependentDependency, + dependency.member.TaxUnitSpouseDependency, + *dependency.irs_gross_income, + ] + pe_outputs = [dependency.tax.Ctc] + + diff --git a/programs/programs/federal/ssdi/__init__.py b/programs/programs/federal/ssdi/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/programs/programs/ssdi/calculator.py b/programs/programs/federal/ssdi/calculator.py similarity index 100% rename from programs/programs/ssdi/calculator.py rename to programs/programs/federal/ssdi/calculator.py diff --git a/programs/programs/nc/__init__.py b/programs/programs/nc/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/programs/programs/nc/pe/__init__.py b/programs/programs/nc/pe/__init__.py new file mode 100644 index 00000000..9d323c10 --- /dev/null +++ b/programs/programs/nc/pe/__init__.py @@ -0,0 +1,13 @@ +import programs.programs.nc.pe.member as member +from programs.programs.policyengine.calculators.base import PolicyEngineCalulator + + +nc_member_calculators = { + 'nc_medicaid': member.NcMedicaid, +} + + +nc_pe_calculators: dict[str, type[PolicyEngineCalulator]] = { + **nc_member_calculators, +} + diff --git a/programs/programs/nc/pe/member.py b/programs/programs/nc/pe/member.py new file mode 100644 index 00000000..2db5e5e2 --- /dev/null +++ b/programs/programs/nc/pe/member.py @@ -0,0 +1,13 @@ +from programs.programs.federal.pe.member import Medicaid + + +class NcMedicaid(Medicaid): + child_medicaid_average = 200 * 12 # TODO: NC specific average goes here + adult_medicaid_average = 310 * 12 # TODO: NC specific average goes here + aged_medicaid_average = 170 * 12 # TODO: NC specific average goes here + + # NOTE: You can also overide the methods on the parent Medicaid class + # def value(self): + # ... + # return 500 + diff --git a/programs/programs/policyengine/calculators/__init__.py b/programs/programs/policyengine/calculators/__init__.py index 1641bd9c..6ecf236c 100644 --- a/programs/programs/policyengine/calculators/__init__.py +++ b/programs/programs/policyengine/calculators/__init__.py @@ -1,10 +1,29 @@ -from .programs import member_calculators, spm_unit_calculators, tax_unit_calculators -from .base import PolicyEnigineCalulator +from programs.programs.federal.pe import federal_member_calculators, federal_spm_unit_calculators, federal_tax_unit_calculators +from programs.programs.co.pe import co_member_calculators, co_tax_unit_calculators +from programs.programs.nc.pe import nc_member_calculators +from .base import PolicyEngineMembersCalculator, PolicyEngineSpmCalulator, PolicyEngineTaxUnitCalulator, PolicyEngineCalulator -all_calculators: dict[str, type[PolicyEnigineCalulator]] = { - **member_calculators, - **spm_unit_calculators, - **tax_unit_calculators, + +all_member_calculators: dict[str, type[PolicyEngineMembersCalculator]] = { + **federal_member_calculators, + **co_member_calculators, + **nc_member_calculators, +} + +all_spm_unit_calculators: dict[str, type[PolicyEngineSpmCalulator]] = { + **federal_spm_unit_calculators, +} + +all_tax_unit_calculators: dict[str, type[PolicyEngineTaxUnitCalulator]] = { + **federal_tax_unit_calculators, + **co_tax_unit_calculators, +} + +all_calculators: dict[str, type[PolicyEngineCalulator]] = { + **all_member_calculators, + **all_spm_unit_calculators, + **all_tax_unit_calculators, } all_pe_programs = all_calculators.keys() + diff --git a/programs/programs/policyengine/calculators/base.py b/programs/programs/policyengine/calculators/base.py index a209b12d..fa95cb3c 100644 --- a/programs/programs/policyengine/calculators/base.py +++ b/programs/programs/policyengine/calculators/base.py @@ -3,10 +3,10 @@ from programs.programs.calc import Eligibility, ProgramCalculator from .dependencies.base import PolicyEngineScreenInput from typing import List -from .constants import YEAR +from .constants import YEAR, PREVIOUS_YEAR -class PolicyEnigineCalulator(ProgramCalculator): +class PolicyEngineCalulator(ProgramCalculator): ''' Base class for all Policy Engine programs ''' @@ -46,3 +46,37 @@ def can_calc(cls, missing_dependencies: Dependencies): return False return True + +class PolicyEngineTaxUnitCalulator(PolicyEngineCalulator): + pe_category = 'tax_units' + pe_sub_category = 'tax_unit' + pe_period = PREVIOUS_YEAR + +class PolicyEngineSpmCalulator(PolicyEngineCalulator): + pe_category = 'spm_units' + pe_sub_category = 'spm_unit' + +class PolicyEngineMembersCalculator(PolicyEngineCalulator): + tax_dependent = True + pe_category = 'people' + + def value(self): + total = 0 + for pkey, pvalue in self.get_data().items(): + # The following programs use income from the tax unit, + # so we want to skip any members that are not in the tax unit. + if not self.in_tax_unit(pkey) and self.tax_dependent: + continue + + pe_value = pvalue[self.pe_name][self.pe_period] + + total += pe_value + + return total + + def in_tax_unit(self, member_id) -> bool: + return str(member_id) in self.pe_data['tax_units']['tax_unit']['members'] + + def get_data(self): + return self.pe_data[self.pe_category] + diff --git a/programs/programs/policyengine/calculators/programs/__init__.py b/programs/programs/policyengine/calculators/programs/__init__.py deleted file mode 100644 index 77961208..00000000 --- a/programs/programs/policyengine/calculators/programs/__init__.py +++ /dev/null @@ -1,29 +0,0 @@ -import programs.programs.policyengine.calculators.programs.member as member -import programs.programs.policyengine.calculators.programs.spm as spm -import programs.programs.policyengine.calculators.programs.tax as tax - - -member_calculators = { - 'wic': member.Wic, - 'medicaid': member.Medicaid, - 'pell_grant': member.PellGrant, - 'ssi': member.Ssi, - 'andcs': member.AidToTheNeedyAndDisabled, - 'oap': member.OldAgePension, - 'chp': member.Chp, -} - -spm_unit_calculators = { - 'acp': spm.Acp, - 'lifeline': spm.Lifeline, - 'nslp': spm.SchoolLunch, - 'snap': spm.Snap, - 'tanf': spm.Tanf, -} - -tax_unit_calculators = { - 'eitc': tax.Eitc, - 'coeitc': tax.Coeitc, - 'ctc': tax.Ctc, - 'coctc': tax.Coctc, -} diff --git a/programs/programs/policyengine/calculators/programs/member.py b/programs/programs/policyengine/calculators/programs/member.py deleted file mode 100644 index f3fa0615..00000000 --- a/programs/programs/policyengine/calculators/programs/member.py +++ /dev/null @@ -1,192 +0,0 @@ -from ..base import PolicyEnigineCalulator -import programs.programs.policyengine.calculators.dependencies as dependency - - -class PolicyEngineMembersCalculator(PolicyEnigineCalulator): - tax_dependent = True - pe_category = 'people' - - def value(self): - total = 0 - for pkey, pvalue in self.get_data().items(): - # The following programs use income from the tax unit, - # so we want to skip any members that are not in the tax unit. - if not self.in_tax_unit(pkey) and self.tax_dependent: - continue - - pe_value = pvalue[self.pe_name][self.pe_period] - - total += pe_value - - return total - - def in_tax_unit(self, member_id) -> bool: - return str(member_id) in self.pe_data['tax_units']['tax_unit']['members'] - - def get_data(self): - return self.pe_data[self.pe_category] - - -class Wic(PolicyEngineMembersCalculator): - wic_categories = { - 'NONE': 0, - 'INFANT': 130, - 'CHILD': 74, - "PREGNANT": 100, - "POSTPARTUM": 100, - "BREASTFEEDING": 100, - } - pe_name = 'wic' - pe_inputs = [ - dependency.member.PregnancyDependency, - dependency.member.AgeDependency, - *dependency.school_lunch_income, - ] - pe_outputs = [dependency.member.Wic, dependency.member.WicCategory] - - def value(self): - total = 0 - - for _, pvalue in self.get_data().items(): - if pvalue[self.pe_name][self.pe_period] > 0: - total += self.wic_categories[pvalue['wic_category'][self.pe_period]] * 12 - - return total - - -class Medicaid(PolicyEngineMembersCalculator): - pe_name = 'medicaid' - pe_inputs = [ - dependency.member.AgeDependency, - dependency.member.PregnancyDependency, - *dependency.irs_gross_income, - ] - pe_outputs = [ - dependency.member.AgeDependency, - dependency.member.Medicaid, - ] - - co_child_medicaid_average = 200 * 12 - co_adult_medicaid_average = 310 * 12 - co_aged_medicaid_average = 170 * 12 - - presumptive_amount = 74 * 12 - - def value(self): - total = 0 - - for _, pvalue in self.get_data().items(): - if pvalue[self.pe_name][self.pe_period] <= 0: - continue - - # here we need to adjust for children as policy engine - # just uses the average which skews very high for adults and - # aged adults - - if pvalue['age'][self.pe_period] <= 18: - medicaid_estimated_value = self.co_child_medicaid_average - elif pvalue['age'][self.pe_period] > 18 and pvalue['age'][self.pe_period] < 65: - medicaid_estimated_value = self.co_adult_medicaid_average - elif pvalue['age'][self.pe_period] >= 65: - medicaid_estimated_value = self.co_aged_medicaid_average - else: - medicaid_estimated_value = 0 - - total += medicaid_estimated_value - - in_wic_demographic = False - for member in self.screen.household_members.all(): - if member.pregnant is True or member.age <= 5: - in_wic_demographic = True - if total == 0 and in_wic_demographic: - if self.screen.has_benefit('medicaid') is True \ - or self.screen.has_benefit('tanf') is True \ - or self.screen.has_benefit('snap') is True: - total = self.presumptive_amount - - return total - - -class PellGrant(PolicyEngineMembersCalculator): - pe_name = 'pell_grant' - pe_inputs = [ - dependency.member.PellGrantDependentAvailableIncomeDependency, - dependency.member.PellGrantCountableAssetsDependency, - dependency.member.CostOfAttendingCollegeDependency, - dependency.member.PellGrantMonthsInSchoolDependency, - dependency.tax.PellGrantPrimaryIncomeDependency, - dependency.tax.PellGrantDependentsInCollegeDependency, - dependency.member.TaxUnitDependentDependency, - dependency.member.TaxUnitHeadDependency, - dependency.member.TaxUnitSpouseDependency, - ] - pe_outputs = [dependency.member.PellGrant] - - -class Ssi(PolicyEngineMembersCalculator): - pe_name = 'ssi' - pe_inputs = [ - dependency.member.SsiCountableResourcesDependency, - dependency.member.SsiReportedDependency, - dependency.member.IsBlindDependency, - dependency.member.IsDisabledDependency, - dependency.member.SsiEarnedIncomeDependency, - dependency.member.SsiUnearnedIncomeDependency, - dependency.member.AgeDependency, - dependency.member.TaxUnitSpouseDependency, - dependency.member.TaxUnitHeadDependency, - dependency.member.TaxUnitDependentDependency, - ] - pe_outputs = [dependency.member.Ssi] - - -class AidToTheNeedyAndDisabled(PolicyEngineMembersCalculator): - pe_name = 'co_state_supplement' - pe_inputs = [ - dependency.member.SsiCountableResourcesDependency, - dependency.member.SsiReportedDependency, - dependency.member.IsBlindDependency, - dependency.member.IsDisabledDependency, - dependency.member.SsiEarnedIncomeDependency, - dependency.member.SsiUnearnedIncomeDependency, - dependency.member.AgeDependency, - dependency.member.TaxUnitSpouseDependency, - dependency.member.TaxUnitHeadDependency, - dependency.member.TaxUnitDependentDependency, - ] - pe_outputs = [dependency.member.Andcs] - - -class OldAgePension(PolicyEngineMembersCalculator): - pe_name = 'co_oap' - pe_inputs = [ - dependency.member.SsiCountableResourcesDependency, - dependency.member.SsiEarnedIncomeDependency, - dependency.member.SsiUnearnedIncomeDependency, - dependency.member.AgeDependency, - dependency.member.TaxUnitSpouseDependency, - dependency.member.TaxUnitHeadDependency, - dependency.member.TaxUnitDependentDependency, - ] - pe_outputs = [dependency.member.Oap] - - -class Chp(PolicyEngineMembersCalculator): - pe_name = 'co_chp' - pe_inputs = [ - dependency.member.AgeDependency, - dependency.member.PregnancyDependency, - *dependency.irs_gross_income, - ] - pe_outputs = [dependency.member.ChpEligible] - - amount = 200 * 12 - - def value(self): - total = 0 - - for _, pvalue in self.get_data().items(): - if pvalue['co_chp_eligible'][self.pe_period] > 0 and self.screen.has_insurance_types(('none',)): - total += self.amount - - return total diff --git a/programs/programs/policyengine/policy_engine.py b/programs/programs/policyengine/policy_engine.py index 89fd0e5a..a724abf2 100644 --- a/programs/programs/policyengine/policy_engine.py +++ b/programs/programs/policyengine/policy_engine.py @@ -1,5 +1,5 @@ from screener.models import Screen -from .calculators import all_calculators, PolicyEnigineCalulator +from .calculators import all_calculators, PolicyEngineCalulator from programs.programs.calc import Eligibility from programs.util import Dependencies from .calculators.dependencies.base import DependencyError @@ -14,7 +14,7 @@ def calc_pe_eligibility(screen: Screen, missing_fields: Dependencies) -> dict[str, Eligibility]: - valid_programs: dict[str, type[PolicyEnigineCalulator]] = {} + valid_programs: dict[str, type[PolicyEngineCalulator]] = {} for name_abbr, Calculator in all_calculators.items(): if not Calculator.can_calc(missing_fields): @@ -48,7 +48,7 @@ def policy_engine_calculate(data): return data -def pe_input(screen: Screen, programs: List[type[PolicyEnigineCalulator]]): +def pe_input(screen: Screen, programs: List[type[PolicyEngineCalulator]]): ''' Generate Policy Engine API request from the list of programs. ''' diff --git a/screener/views.py b/screener/views.py index be9cb539..e68c422e 100644 --- a/screener/views.py +++ b/screener/views.py @@ -21,6 +21,7 @@ MessageSerializer, ResultsSerializer, ) +from programs.programs.policyengine.calculators import all_pe_programs from programs.programs.policyengine.policy_engine import calc_pe_eligibility from programs.util import DependencyError import programs.programs.urgent_needs.urgent_need_functions as urgent_need_functions @@ -193,24 +194,7 @@ def eligibility_results(screen, batch=False): # pe_eligibility = eligibility_policy_engine(screen) pe_eligibility = calc_pe_eligibility(screen, missing_dependencies) - pe_programs = ( - 'snap', - 'wic', - 'nslp', - 'eitc', - 'coeitc', - 'ctc', - 'coctc', - 'medicaid', - 'ssi', - 'tanf', - 'andcs', - 'oap', - 'acp', - 'lifeline', - 'pell_grant', - 'chp', - ) + pe_programs = all_pe_programs def sort_first(program): calc_first = ('tanf', 'ssi', 'medicaid', 'nslp', 'leap') From bab377d40a78091b333c4946332b34b093ee19c4 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 10 Apr 2024 15:14:05 -0600 Subject: [PATCH 2/9] change the default Medicaid values --- programs/programs/federal/pe/member.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/programs/federal/pe/member.py b/programs/programs/federal/pe/member.py index 1c4e456d..09bc929c 100644 --- a/programs/programs/federal/pe/member.py +++ b/programs/programs/federal/pe/member.py @@ -41,9 +41,9 @@ class Medicaid(PolicyEngineMembersCalculator): dependency.member.Medicaid, ] - child_medicaid_average = 200 * 12 - adult_medicaid_average = 310 * 12 - aged_medicaid_average = 170 * 12 + child_medicaid_average = 0 + adult_medicaid_average = 0 + aged_medicaid_average = 0 presumptive_amount = 74 * 12 From bfec5a650510779781fe4a47c82335d059504270 Mon Sep 17 00:00:00 2001 From: Caleb Date: Tue, 16 Apr 2024 12:27:24 -0600 Subject: [PATCH 3/9] Fix merge confilcts --- programs/programs/federal/pe/spm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/programs/federal/pe/spm.py b/programs/programs/federal/pe/spm.py index 64e68011..ec430ff7 100644 --- a/programs/programs/federal/pe/spm.py +++ b/programs/programs/federal/pe/spm.py @@ -25,7 +25,7 @@ class Snap(PolicyEngineSpmCalulator): pe_output_period = SNAP_PERIOD def value(self): - return int(self.get_data()[self.pe_name][self.pe_output_period]) + return int(self.get_data()[self.pe_name][self.pe_output_period]) * 12 class SchoolLunch(PolicyEngineSpmCalulator): From 69d43aba8b8acdb3175303048d1e06547cd3e2b4 Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 17 Apr 2024 09:46:34 -0600 Subject: [PATCH 4/9] update dependencies --- requirements.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 690823ef..5cf28784 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ click==8.1.3 colorama==0.4.6 cycler==0.11.0 dj-database-url==0.5.0 -Django==4.2.6 +Django==4.2.11 django-cors-headers==3.13.0 django-filter==21.1 django-heroku==0.3.1 @@ -19,7 +19,7 @@ django-phonenumber-field==6.3.0 django-sesame==3.1 djangorestframework==3.14.0 drf-yasg==1.21.7 -fonttools==4.34.4 +fonttools==4.51.0 geographiclib==1.52 google-api-core==1.34.0 google-api-python-client==2.55.0 @@ -31,10 +31,10 @@ google-cloud-translate==2.0.1 googleapis-common-protos==1.56.4 grpcio==1.58.0 grpcio-status==1.48.2 -gunicorn==20.1.0 +gunicorn==22.0.0 httplib2==0.20.4 hubspot-api-client==7.5.0 -idna==3.3 +idna==3.7 inflection==0.5.1 iniconfig==1.1.1 kiwisolver==1.4.4 @@ -44,7 +44,7 @@ oauthlib==3.2.2 packaging==23.1 pathspec==0.11.1 phonenumbers==8.12.53 -Pillow==10.0.1 +pillow==10.3.0 platformdirs==3.5.1 pluggy==1.0.0 proto-plus==1.22.3 @@ -61,14 +61,14 @@ python-decouple==3.6 python-http-client==3.3.7 pytz==2023.3.post1 PyYAML==6.0 -requests==2.28.1 +requests==2.31.0 requests-oauthlib==1.3.1 rsa==4.9 sendgrid==6.9.7 sentry-sdk==1.35.0 six==1.16.0 soupsieve==2.4.1 -sqlparse==0.4.4 +sqlparse==0.5.0 starkbank-ecdsa==2.2.0 tomli==2.0.1 tqdm==4.65.0 @@ -76,5 +76,5 @@ twilio==7.16.3 typing_extensions==4.8.0 tzdata==2023.3 uritemplate==4.1.1 -urllib3==1.26.11 +urllib3==2.2.1 whitenoise==6.2.0 From 1fec8a9b56d112f59a149c3fc0a0c7cfd083140a Mon Sep 17 00:00:00 2001 From: Caleb Date: Wed, 17 Apr 2024 13:23:53 -0600 Subject: [PATCH 5/9] add emergency rental assistance program --- programs/programs/co/__init__.py | 4 ++ .../emergency_rental_assistance/__init__.py | 0 .../emergency_rental_assistance/calculator.py | 44 +++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 programs/programs/co/emergency_rental_assistance/__init__.py create mode 100644 programs/programs/co/emergency_rental_assistance/calculator.py diff --git a/programs/programs/co/__init__.py b/programs/programs/co/__init__.py index 47a980d0..ea5aa311 100644 --- a/programs/programs/co/__init__.py +++ b/programs/programs/co/__init__.py @@ -25,6 +25,8 @@ from .utility_bill_pay.calculator import UtilityBillPay from ..calc import ProgramCalculator from .rental_assistance_grant.calculator import RentalAssistanceGrant +from .emergency_rental_assistance.calculator import EmergencyRentalAssistance + co_calculators: dict[str, type[ProgramCalculator]] = { 'rtdlive': RtdLive, @@ -53,4 +55,6 @@ 'trua': Trua, 'ubp': UtilityBillPay, 'rag': RentalAssistanceGrant, + 'erap': EmergencyRentalAssistance, } + diff --git a/programs/programs/co/emergency_rental_assistance/__init__.py b/programs/programs/co/emergency_rental_assistance/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/programs/programs/co/emergency_rental_assistance/calculator.py b/programs/programs/co/emergency_rental_assistance/calculator.py new file mode 100644 index 00000000..6a3076a0 --- /dev/null +++ b/programs/programs/co/emergency_rental_assistance/calculator.py @@ -0,0 +1,44 @@ +from programs.programs.calc import Eligibility, ProgramCalculator +import programs.programs.messages as messages +from integrations.util.cache import Cache +from programs.sheets import sheets_get_data +from programs.co_county_zips import counties_from_zip + + +class EmergencyRentalAssistanceIncomeLimitsCache(Cache): + expire_time = 60 * 60 * 24 + default = {} + + def update(self): + spreadsheet_id = '1QHb-ZT0Y2oWjFMoeP_wy8ClveslINWdehb-CXhB8WSE' + range_name = "'2022 80% AMI'!A2:I" + sheet_values = sheets_get_data(spreadsheet_id, range_name) + + if not sheet_values: + raise Exception('Sheet unavailable') + + data = {d[0].strip() + ' County': [int(v.replace(',', '')) for v in d[1:]] for d in sheet_values} + + return data + + +class EmergencyRentalAssistance(ProgramCalculator): + amount = 13_848 + dependencies = ['income_amount', 'income_frequency', 'household_size', 'zipcode'] + income_cache = EmergencyRentalAssistanceIncomeLimitsCache() + income_limit_percent = .8 + + def eligible(self) -> Eligibility: + e = Eligibility() + + # Income test + counties = counties_from_zip(self.screen.zipcode) + county_name = self.screen.county if self.screen.county is not None else counties[0] + + income = self.screen.calc_gross_income('yearly', ['all']) + income_limits = EmergencyRentalAssistance.income_cache.fetch() + income_limit = income_limits[county_name][self.screen.household_size - 1] * EmergencyRentalAssistance.income_limit_percent + e.condition(income < income_limit, messages.income(income, income_limit)) + + return e + From 89056afa165306447d635a87900886d71cc54bde Mon Sep 17 00:00:00 2001 From: Ivonne Hernandez Date: Wed, 24 Apr 2024 15:06:36 -0600 Subject: [PATCH 6/9] Add ForeclosureFinAssistProgram to urgent_need_functions --- .../urgent_needs/urgent_need_functions.py | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/programs/programs/urgent_needs/urgent_need_functions.py b/programs/programs/urgent_needs/urgent_need_functions.py index 0b06dbf0..f472cff4 100644 --- a/programs/programs/urgent_needs/urgent_need_functions.py +++ b/programs/programs/urgent_needs/urgent_need_functions.py @@ -147,6 +147,29 @@ def eligible(cls, screen: Screen): return household_income <= income_limit +class ForeclosureFinAssistProgram(UrgentNeedFunction): + dependencies = ['household_size', 'income_amount', 'income_frequency', 'county'] + + @classmethod + def eligible(cls, screen: Screen): + ''' + Return True if the household is at or below 80% the income limit for their household size & they live in Denver + ''' + income_limits = { + 1: 66_300, + 2: 75_750, + 3: 85_200, + 4: 94_560, + 5: 102_250, + 6: 109_800, + 7: 117_400, + 8: 124_950, + } + household_income = screen.calc_gross_income('yearly', ['all']) + income_limit = income_limits[screen.household_size] + return household_income <= income_limit and screen.county == 'Denver County' + + class EocIncomeLimitCache(Cache): expire_time = 60 * 60 * 24 default = {} From d37ad4f22cfe2f7e9e57d6bbe3c5a6d6a76f8064 Mon Sep 17 00:00:00 2001 From: Ivonne Hernandez Date: Wed, 24 Apr 2024 15:07:03 -0600 Subject: [PATCH 7/9] Add ffap property to need_functions --- screener/views.py | 1 + 1 file changed, 1 insertion(+) diff --git a/screener/views.py b/screener/views.py index 4666ee41..c689e890 100644 --- a/screener/views.py +++ b/screener/views.py @@ -383,6 +383,7 @@ def urgent_need_results(screen): screen, missing_dependencies ), 'trua': urgent_need_functions.Trua.calc(screen, missing_dependencies), + 'ffap': urgent_need_functions.ForeclosureFinAssistProgram.calc(screen, missing_dependencies), 'eoc': urgent_need_functions.Eoc.calc(screen, missing_dependencies), 'co_legal_services': urgent_need_functions.CoLegalServices.calc( screen, missing_dependencies From f85a64ea0950ddcb9285197d68b2116fca789241 Mon Sep 17 00:00:00 2001 From: Ivonne Hernandez Date: Wed, 24 Apr 2024 15:11:11 -0600 Subject: [PATCH 8/9] Add double quotes --- screener/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screener/views.py b/screener/views.py index c689e890..0e3b5755 100644 --- a/screener/views.py +++ b/screener/views.py @@ -383,7 +383,7 @@ def urgent_need_results(screen): screen, missing_dependencies ), 'trua': urgent_need_functions.Trua.calc(screen, missing_dependencies), - 'ffap': urgent_need_functions.ForeclosureFinAssistProgram.calc(screen, missing_dependencies), + "ffap": urgent_need_functions.ForeclosureFinAssistProgram.calc(screen, missing_dependencies), 'eoc': urgent_need_functions.Eoc.calc(screen, missing_dependencies), 'co_legal_services': urgent_need_functions.CoLegalServices.calc( screen, missing_dependencies From 9395eab09904bdd9d677b7c169be6f90fa8dd029 Mon Sep 17 00:00:00 2001 From: Ivonne Hernandez Date: Wed, 24 Apr 2024 15:11:29 -0600 Subject: [PATCH 9/9] Remove double quotes --- screener/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screener/views.py b/screener/views.py index 0e3b5755..c689e890 100644 --- a/screener/views.py +++ b/screener/views.py @@ -383,7 +383,7 @@ def urgent_need_results(screen): screen, missing_dependencies ), 'trua': urgent_need_functions.Trua.calc(screen, missing_dependencies), - "ffap": urgent_need_functions.ForeclosureFinAssistProgram.calc(screen, missing_dependencies), + 'ffap': urgent_need_functions.ForeclosureFinAssistProgram.calc(screen, missing_dependencies), 'eoc': urgent_need_functions.Eoc.calc(screen, missing_dependencies), 'co_legal_services': urgent_need_functions.CoLegalServices.calc( screen, missing_dependencies