You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The Budget reform contract's household route errors in the qualification gate: policyengine.uk is None #650
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