Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
7 changes: 7 additions & 0 deletions .github/workflows/code_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
args: ". -l 79 --check"
Test:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -32,6 +35,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.12'
- uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider"
service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com"

- name: Install package
run: uv pip install -e .[dev] --system
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/pr_code_changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand All @@ -35,6 +38,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: '3.12'
- uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/322898545428/locations/global/workloadIdentityPools/policyengine-research-id-pool/providers/prod-github-provider"
service_account: "policyengine-research@policyengine-research.iam.gserviceaccount.com"

- name: Install package
run: uv pip install -e .[dev] --system
Expand Down
4 changes: 4 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: patch
changes:
fixed:
- Bug in employer NI incidence parameters.
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,9 @@ class employer_ni_response_consumer_incidence(Variable):
unit = GBP

def formula(person, period, parameters):
consumer_incidence = parameters(
period
).gov.contrib.policyengine.employer_ni.consumer_incidence
if consumer_incidence == 0:
emp_ni = parameters(period).gov.contrib.policyengine.employer_ni
if emp_ni.consumer_incidence == 0 or emp_ni.employee_incidence == 1:
# If consumer incidence is zero, or if the employee incidence is 100%, then there is no capital incidence.:
return 0

if not hasattr(person.simulation, "dataset"):
Expand Down Expand Up @@ -179,10 +178,9 @@ class employer_ni_response_capital_incidence(Variable):
unit = GBP

def formula(person, period, parameters):
capital_incidence = parameters(
period
).gov.contrib.policyengine.employer_ni.capital_incidence
if capital_incidence == 0:
emp_ni = parameters(period).gov.contrib.policyengine.employer_ni
if emp_ni.capital_incidence == 0 or emp_ni.employee_incidence == 1:
# If capital incidence is zero, or if the employee incidence is 100%, then there is no capital incidence.:
return 0

if not hasattr(person.simulation, "dataset"):
Expand Down
Loading