Skip to content

Pass is_tax through to detailed_budget so consumers can sign each program #971

Closed

Description

@PavelMakarchuk

Problem

build_detailed_budget copies baseline_total, reform_total and change from policyengine.py's program statistics but drops is_tax. Consumers have to decide which programs are benefits from their own lists; the v3 app's "Budgetary impact by programme" chart uses a fixed BENEFIT_PROGRAMS set.

PolicyEngine/policyengine.py#724 adds a UK row for every tax and benefit in the budget totals that a reform changes (for example scottish_child_payment and pip). Those aren't in the app's list, so once sim-api deploys a .py release with that change the chart would draw them as taxes, with the wrong sign: on report 4738 (2027 UC freeze), Scottish Child Payment would show −£25m instead of +£25m.

Proposal

Add is_tax: bool | None to DetailedBudgetProgramOutput (null in outputs built before it) and copy it from each program-statistics row, so consumers sign rows without a list of their own. This must ship before policyengine.py#724 reaches sim-api.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions