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

Adapt to Core v20 #26

Merged
merged 2 commits into from
Nov 6, 2017
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
14 changes: 11 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
# Changelog

## 1.3.2 - [#25](https://github.com/openfisca/country-template/pull/25)
## 1.4.0 - [#26](https://github.com/openfisca/country-template/pull/26)

* Technical improvement
* Details:
- Upgrade to Core v20

### 1.3.2 - [#25](https://github.com/openfisca/country-template/pull/25)

* Declare package compatible with OpenFisca Core v19

## 1.3.1 - [#23](https://github.com/openfisca/country-template/pull/23)
### 1.3.1 - [#23](https://github.com/openfisca/country-template/pull/23)

* Declare package compatible with OpenFisca Core v18
* Technical improvement
* Details:
- Declare package compatible with OpenFisca Core v18

## 1.3.0 - [#22](https://github.com/openfisca/country-template/pull/22)

Expand Down
4 changes: 2 additions & 2 deletions openfisca_country_template/variables/benefits.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class basic_income(Variable):
column = FloatCol
value_type = float
entity = Person
definition_period = MONTH
label = "Basic income provided to adults"
Expand All @@ -31,7 +31,7 @@ def formula_2015_12(person, period, parameters):


class housing_allowance(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = MONTH
label = "Housing allowange"
Expand Down
5 changes: 3 additions & 2 deletions openfisca_country_template/variables/demographics.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class age(Variable):
column = IntCol
value_type = int
entity = Person
definition_period = MONTH
label = u"Person's age (in years)"
Expand All @@ -26,7 +26,8 @@ def formula(person, period, parameters):

# This variable is a pure input: it doesn't have a formula
class birth(Variable):
column = DateCol(default = date(1970, 1, 1)) # By default, is no value is set for a simulation, we consider the people involed in a simulation to be born on the 1st of Jan 1970.
value_type = date
default_value = date(1970, 1, 1) # By default, is no value is set for a simulation, we consider the people involed in a simulation to be born on the 1st of Jan 1970.
entity = Person
label = u"Birth date"
definition_period = ETERNITY # This variable cannot change over time.
Expand Down
9 changes: 4 additions & 5 deletions openfisca_country_template/variables/housing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

# This variable is a pure input: it doesn't have a formula
class accomodation_size(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = MONTH
label = u"Size of the accomodation, in square metters"


# This variable is a pure input: it doesn't have a formula
class rent(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = MONTH
label = u"Rent paid by the household"
Expand All @@ -35,9 +35,8 @@ class rent(Variable):


class housing_occupancy_status(Variable):
column = EnumCol(
enum = HOUSING_OCCUPANCY_STATUS
)
value_type = Enum
possible_values = HOUSING_OCCUPANCY_STATUS
entity = Household
definition_period = MONTH
label = u"Legal housing situation of the household concerning their main residence"
4 changes: 2 additions & 2 deletions openfisca_country_template/variables/income.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# This variable is a pure input: it doesn't have a formula
class salary(Variable):
column = FloatCol
value_type = float
entity = Person
definition_period = MONTH
set_input = set_input_divide_by_period # Optional attribute. Allows user to declare a salary for a year. OpenFisca will spread the yearly amount over the months contained in the year.
Expand All @@ -21,7 +21,7 @@ class salary(Variable):


class disposable_income(Variable):
column = FloatCol
value_type = float
entity = Person
definition_period = MONTH
label = "Actual amount available to the person at the end of the month"
Expand Down
4 changes: 2 additions & 2 deletions openfisca_country_template/variables/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class total_benefits(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = MONTH
label = "Sum of the benefits perceived by a household"
Expand All @@ -27,7 +27,7 @@ def formula(household, period, parameters):


class total_taxes(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = MONTH
label = "Sum of the taxes paid by a household"
Expand Down
6 changes: 3 additions & 3 deletions openfisca_country_template/variables/taxes.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class income_tax(Variable):
column = FloatCol
value_type = float
entity = Person
definition_period = MONTH
label = u"Income tax"
Expand All @@ -25,7 +25,7 @@ def formula(person, period, parameters):


class social_security_contribution(Variable):
column = FloatCol
value_type = float
entity = Person
definition_period = MONTH
label = u"Progressive contribution paid on salaries to finance social security"
Expand All @@ -41,7 +41,7 @@ def formula(person, period, parameters):


class housing_tax(Variable):
column = FloatCol
value_type = float
entity = Household
definition_period = YEAR # This housing tax is defined for a year.
label = u"Tax paid by each household proportionnally to the size of its accommodation"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='OpenFisca-Country-Template',
version='1.3.2',
version='1.4.0',
author='OpenFisca Team',
author_email='contact@openfisca.fr',
description=u'OpenFisca tax and benefit system for Country-Template',
Expand All @@ -16,7 +16,7 @@
url='https://github.com/openfisca/openfisca-country-template',
include_package_data = True, # Will read MANIFEST.in
install_requires=[
'OpenFisca-Core >= 19.0.0, < 20.0',
'OpenFisca-Core >= 20.0.0, < 21.0',
],
extras_require = {
'api': [
Expand Down