Skip to content

Commit

Permalink
Simplify boilerplate
Browse files Browse the repository at this point in the history
  • Loading branch information
fpagnoux committed Mar 9, 2017
2 parents debafbb + 1a40477 commit 27f4b50
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 72 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

### 14.1.1 - [#697](https://github.com/openfisca/openfisca-france/pull/697)

* Amélioration technique
* Utilise le module `core.model_api` plutôt que de réimporter un par un tous les objets Python nécessaires pour écrire une formule
- Aucun impact pour les ré-utilisateurs

## 14.1.0 - [#685](https://github.com/openfisca/openfisca-france/pull/685)

* Amélioration technique
Expand Down
71 changes: 1 addition & 70 deletions openfisca_france/model/base.py
Original file line number Diff line number Diff line change
@@ -1,77 +1,8 @@
# -*- coding: utf-8 -*-

from datetime import date

from openfisca_core.columns import (AgeCol, BoolCol, DateCol, EnumCol, FixedStrCol, FloatCol, IntCol,
PeriodSizeIndependentIntCol, StrCol)
from openfisca_core.enumerations import Enum
from openfisca_core.formulas import (ADD, calculate_output_add, calculate_output_divide,
dated_function, DIVIDE, missing_value, set_input_dispatch_by_period, set_input_divide_by_period)
from openfisca_core.variables import DatedVariable, Variable
from openfisca_core.base_functions import (
requested_period_added_value,
requested_period_default_value,
requested_period_last_or_next_value,
requested_period_last_value,
)
from openfisca_core.formula_helpers import apply_thresholds, switch
from openfisca_core.periods import MONTH, YEAR, ETERNITY

from openfisca_core.model_api import *
from openfisca_france.entities import Famille, FoyerFiscal, Individu, Menage


__all__ = [
'ADD',
'AgeCol',
'apply_thresholds',
'BoolCol',
'calculate_output_add',
'calculate_output_divide',
'CATEGORIE_SALARIE',
'CHEF',
'CONJ',
'CREF',
'date',
'DateCol',
'dated_function',
'DatedVariable',
'DIVIDE',
'ENFS',
'Enum',
'EnumCol',
'Famille',
'FixedStrCol',
'FloatCol',
'FoyerFiscal',
'Individu',
'IntCol',
'Menage',
'missing_value',
'PAC1',
'PAC2',
'PAC3',
'PART',
'PeriodSizeIndependentIntCol',
'PREF',
'QUIFAM',
'QUIFOY',
'QUIMEN',
'requested_period_added_value',
'requested_period_default_value',
'requested_period_last_or_next_value',
'requested_period_last_value',
'set_input_dispatch_by_period',
'set_input_divide_by_period',
'StrCol',
'switch',
'TAUX_DE_PRIME',
'Variable',
'VOUS',
'MONTH',
'YEAR',
'ETERNITY',
]

CATEGORIE_SALARIE = Enum([
'prive_non_cadre',
'prive_cadre',
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-France',
version = '14.1.0',
version = '14.1.1',
author = 'OpenFisca Team',
author_email = 'contact@openfisca.fr',
classifiers = [
Expand Down Expand Up @@ -45,7 +45,7 @@
'Babel >= 0.9.4',
'Biryani[datetimeconv] >= 0.10.4',
'numpy >= 1.11',
'OpenFisca-Core >= 6.0.0, < 7.0',
'OpenFisca-Core >= 6.1.0, < 7.0',
'PyYAML >= 3.10',
'requests >= 2.8',
],
Expand Down

0 comments on commit 27f4b50

Please sign in to comment.