Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Use fortnights for parenting allowance #106

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install: deps
@# `make install` installs the editable version of OpenFisca-France.
@# This allows contributors to test as they code.
pip install -e '.[dev]' --upgrade --use-deprecated=legacy-resolver
pip install --editable git+https://github.com/openfisca/openfisca-core.git@add-weeks#egg=OpenFisca-Core[web-api] # use a specific branch of OpenFisca-Core
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


build: clean deps
@# Install OpenFisca-Extension-Template for deployment and publishing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# We can run this test on our command line using `openfisca-run-test tests/situations/income_tax.yaml`

- name: Parenting allowance for a two parent household with little income
description: Parenting allowance relies on the incomes on the parents and ages of the children
period: 2020-01
description: Parenting allowance relies on the fortnight incomes of the parents and ages of the children
period: 2022-W5
absolute_error_margin: 0
input:
household:
Expand All @@ -13,13 +13,13 @@
Phil:
birth: 1981-01-15
salary:
2017-01: 250
2018-01: 250
week:2022-W1:2: 300
week:2022-W3:2: 300
Saz:
birth: 1982-01-15
salary:
2017-01: 250
2018-01: 251
week:2022-W1:2: 300
week:2022-W3:2: 301
Caz:
birth: 2010-01-15
Eille:
Expand All @@ -29,5 +29,5 @@
output:
household:
parenting_allowance:
2017-01: 600
2018-01: 0
week:2022-W1:2: 600
week:2022-W3:2: 0
4 changes: 2 additions & 2 deletions openfisca_country_template/variables/benefits.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

# Import from openfisca-core the Python objects used to code the legislation in OpenFisca
from openfisca_core.periods import MONTH
from openfisca_core.periods import MONTH, WEEK
from openfisca_core.variables import Variable

# Import the Entities specifically defined for this tax and benefit system
Expand Down Expand Up @@ -91,7 +91,7 @@ def formula(person, period, parameters):
class parenting_allowance(Variable):
value_type = float
entity = Household
definition_period = MONTH
definition_period = WEEK
label = "Allowance for low income people with children to care for."
documentation = "Loosely based on the Australian parenting pension."
reference = "https://www.servicesaustralia.gov.au/individuals/services/centrelink/parenting-payment/who-can-get-it"
Expand Down