__init__.py 767 Bytes
Newer Older
Florian Pagnoux's avatar
Florian Pagnoux committed
1
2
3
4
5
# -*- coding: utf-8 -*-

import os

from openfisca_core.taxbenefitsystems import TaxBenefitSystem
6
from openfisca_core.model_api import Variable, MONTH
7
from openfisca_core.entities import build_entity
Florian Pagnoux's avatar
Florian Pagnoux committed
8

9
10
11
12
13
14
Person = build_entity(
    key = "person",
    plural = "persons",
    label = u'Person',
    is_person = True,
    )
Florian Pagnoux's avatar
Florian Pagnoux committed
15
16
17
18

COUNTRY_DIR = os.path.dirname(os.path.abspath(__file__))


19
20
21
22
23
24
class dummy_variable(Variable):
    entity = Person
    value_type = float
    definition_period = MONTH


Florian Pagnoux's avatar
Florian Pagnoux committed
25
26
class CountryTaxBenefitSystem(TaxBenefitSystem):
    def __init__(self):
27
        super(CountryTaxBenefitSystem, self).__init__([Person])
Florian Pagnoux's avatar
Florian Pagnoux committed
28
29
        param_path = os.path.join(COUNTRY_DIR, 'parameters')
        self.load_parameters(param_path)
30
        self.add_variable(dummy_variable)