Skip to content

The Budget reform contract's household route errors in the qualification gate: policyengine.uk is None #650

Closed

Description

@MaxGhenis

Every UK qualification candidate since the reform-contract gate went live has failed that gate on the wrapper.household route. The candidates are 2.134.5, 2.134.6 and 2.134.7: candidate PRs #639, #644 and #647.

The 2.134.7 attempt's report records 15 errors and 1 fail, all on wrapper.household, with:

AttributeError: 'NoneType' object has no attribute 'calculate_household'

Cause

  • scripts/check_uk_candidate.py sets POLICYENGINE_SKIP_COUNTRY_IMPORTS=1 when it is imported (line 43).
  • With that switch, policyengine/__init__.py sets policyengine.uk = None.
  • The contract's household route calls import policyengine as pe; pe.uk.calculate_household(...).

Locally, without the switch, the same route and versions pass. The full 1.1.0 contract on policyengine-uk 2.134.7 gives 773 pass, 0 fail and 0 error.

Fix

The route should import policyengine.tax_benefit_models.uk, the module policyengine.uk names, directly.

Activity

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