Skip to content

Commit

Permalink
Merge pull request #217 from openfisca/aide-aep-eure-et-loir-finalisa…
Browse files Browse the repository at this point in the history
…tion-#143

Reprise :  l'Action Éducative de Promixité pour l'Eure-et-Loir #143
  • Loading branch information
jenovateurs authored Oct 28, 2024
2 parents ded15d2 + e2d2b2b commit 3eb6c5e
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Changelog
## [6.15.0] - 2024-10-14

_Pour les changements détaillés et les discussions associées, référencez la pull request [#217](https://github.com/openfisca/openfisca-france-local/pull/217)_

### Added

- Ajoute la variable `eure_et_loir_eligibilite_aep`


## [6.14.1] - 2024-10-22

Expand Down
18 changes: 18 additions & 0 deletions openfisca_france_local/departements/eure_et_loir/aep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from openfisca_france.model.base import Variable, Menage, MONTH

class eure_et_loir_eligibilite_aep(Variable):
value_type = bool
entity = Menage
definition_period = MONTH
label = "En Eure-et-Loir, éligibilité a l'Action Éducative de Promixité (AEP)"
reference = [
"https://eurelien.fr/wp-content/uploads/2023/01/l_aide_educative_de_proximite.pdf",
"https://eurelien.fr/mon-quotidien/enfance-et-famille/#Laction-educative"
]

def formula(menage, period):
reside_eure_et_loir = menage('eure_et_loir_eligibilite_residence', period)
enfants_a_charge = menage.members('enfant_a_charge', period.this_year)
has_enfants_a_charge = menage.sum(enfants_a_charge) > 0

return reside_eure_et_loir * has_enfants_a_charge
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='OpenFisca-France-Local',
version='6.14.1',
version='6.15.0',
author='OpenFisca Team',
author_email='[email protected]',
classifiers=[
Expand Down
88 changes: 88 additions & 0 deletions tests/departements/eure_et_loir/aep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
- name: Eligibilité à l'aide AEP d'Eure-et-Loir avec menage ayant des enfants à charge
period: 2023-01
input:
individus:
parent1:
salaire_imposable: 1000
parent2:
salaire_imposable: 0
enfant1:
age: 8
enfant_a_charge:
2023: True
enfant2:
age: 12
enfant_a_charge:
2023: True
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [ "enfant1", "enfant2" ]
depcom: 28000
output:
eure_et_loir_eligibilite_aep: True

- name: Eligibilité à l'aide AEP d'Eure-et-Loir avec menage n'ayant pas d'enfants à charge
period: 2023-01
input:
individus:
parent1:
salaire_imposable: 1000
parent2:
salaire_imposable: 0
enfant1:
age: 8
enfant_a_charge:
2023: False
enfant2:
age: 12
enfant_a_charge:
2023: False
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [ "enfant1", "enfant2" ]
depcom: 28000
output:
eure_et_loir_eligibilite_aep: False

- name: Eligibilité à l'aide AEP d'Eure-et-Loir avec menage n'ayant pas d'enfants
period: 2023-01
input:
individus:
parent1:
salaire_imposable: 1000
parent2:
salaire_imposable: 0
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: []
depcom: 28000
output:
eure_et_loir_eligibilite_aep: False


- name: Eligibilité à l'aide AEP d'Eure-et-Loir avec menage n'habitant pas en Eure-et-Loir
period: 2023-01
input:
individus:
parent1:
salaire_imposable: 1000
parent2:
salaire_imposable: 0
enfant1:
age: 8
enfant_a_charge:
2023: True
enfant2:
age: 12
enfant_a_charge:
2023: True
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [ "enfant1", "enfant2" ]
depcom: 45000
output:
eure_et_loir_eligibilite_aep: False

0 comments on commit 3eb6c5e

Please sign in to comment.