-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: ajoute l'aide à l'alimentation pour les étudiants éloignés
- Loading branch information
Showing
10 changed files
with
137 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from openfisca_core.model_api import Variable | ||
from openfisca_france.entities import Individu | ||
from openfisca_core.periods import MONTH | ||
from numpy.core.defchararray import startswith | ||
|
||
drom_codes = [ | ||
b'971', # Guadeloupe | ||
b'972', # Martinique | ||
b'973', # Guyane | ||
b'974', # La Réunion | ||
b'976' # Mayotte | ||
] | ||
|
||
|
||
class localisation_DROM_aide_alimentation_etudiants_eloignes(Variable): | ||
value_type = bool | ||
entity = Individu | ||
definition_period = MONTH | ||
label = "Indique si l'individu réside dans un des DROM concernés par les montants spéciaux pour l'aide alimentaire étudiants éloignés" | ||
|
||
def formula(individu, period): | ||
depcom = individu.menage('depcom', period) | ||
eligibilite_geographique = sum([startswith(depcom, code_departement) for code_departement in drom_codes]) | ||
|
||
return eligibilite_geographique > 0 |
45 changes: 45 additions & 0 deletions
45
openfisca_france/model/prestations/aide_alimentation_etudiants_eloignes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
from openfisca_core.model_api import Variable, select | ||
from openfisca_france.entities import Individu | ||
from openfisca_core.periods import MONTH | ||
|
||
|
||
class aide_alimentation_etudiants_eloignes(Variable): | ||
value_type = float | ||
entity = Individu | ||
definition_period = MONTH | ||
label = 'Aide financière pour les étudiants éloignés des restaurants universitaires, avec des montants majorés pour les DROM.' | ||
reference = [ | ||
'https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050660003', | ||
'https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050659996', | ||
] | ||
|
||
def formula(individu, period, parameters): | ||
etudiant = individu('etudiant', period) | ||
boursier = individu('boursier', period) | ||
resident_drom = individu('localisation_DROM_aide_alimentation_etudiants_eloignes', period) | ||
|
||
non_boursier = ~boursier | ||
resident_hors_drom = ~resident_drom | ||
|
||
P = parameters(period).prestations_sociales.aide_alimentation_etudiants_eloignes | ||
montant_standard_boursier = P.montant_etudiant_standard_boursier | ||
montant_standard_non_boursier = P.montant_etudiant_standard_non_boursier | ||
montant_drom_boursier = P.montant_etudiant_drom_boursier | ||
montant_drom_non_boursier = P.montant_etudiant_drom_non_boursier | ||
|
||
conditions = [ | ||
resident_drom & boursier, | ||
resident_drom & non_boursier, | ||
resident_hors_drom & boursier, | ||
resident_hors_drom & non_boursier, | ||
] | ||
|
||
montants = [ | ||
montant_drom_boursier, | ||
montant_drom_non_boursier, | ||
montant_standard_boursier, | ||
montant_standard_non_boursier, | ||
] | ||
|
||
montant = select(conditions, montants, default=0) | ||
return etudiant * montant |
12 changes: 12 additions & 0 deletions
12
...tations_sociales/aide_alimentation_etudiants_eloignes/montant_etudiant_drom_boursier.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: Montant pour un étudiant éloigné boursier en DROM | ||
values: | ||
2025-02-01: | ||
value: 50 | ||
metadata: | ||
short_label: Montant étudiant éloigné boursier en DROM | ||
reference: | ||
2025-02-01: | ||
title: "Arrêté du 21 novembre 2024 fixant les montants de l'aide financière prévue à l'article L. 822-1-1 du code de l'éducation" | ||
href: https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050660003 | ||
official_journal_date: | ||
2025-02-01: "2024-11-26" |
12 changes: 12 additions & 0 deletions
12
...ons_sociales/aide_alimentation_etudiants_eloignes/montant_etudiant_drom_non_boursier.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: Montant pour un étudiant éloigné non boursier en DROM | ||
values: | ||
2025-02-01: | ||
value: 30 | ||
metadata: | ||
short_label: Montant étudiant éloigné non boursier en DROM | ||
reference: | ||
2025-02-01: | ||
title: "Arrêté du 21 novembre 2024 fixant les montants de l'aide financière prévue à l'article L. 822-1-1 du code de l'éducation" | ||
href: https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050660003 | ||
official_journal_date: | ||
2025-02-01: "2024-11-26" |
12 changes: 12 additions & 0 deletions
12
...ons_sociales/aide_alimentation_etudiants_eloignes/montant_etudiant_standard_boursier.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
description: Montant standard pour un étudiant éloigné boursier hors DROM | ||
values: | ||
2025-02-01: | ||
value: 40 | ||
metadata: | ||
short_label: Montant standard étudiant éloigné boursier hors DROM | ||
reference: | ||
2025-02-01: | ||
title: "Arrêté du 21 novembre 2024 fixant les montants de l'aide financière prévue à l'article L. 822-1-1 du code de l'éducation" | ||
href: https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050660003 | ||
official_journal_date: | ||
2025-02-01: "2024-11-26" |
9 changes: 9 additions & 0 deletions
9
...sociales/aide_alimentation_etudiants_eloignes/montant_etudiant_standard_non_boursier.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Montant pour un étudiant éloigné non boursier hors DROM | ||
values: | ||
2025-02-01: | ||
value: 20 | ||
metadata: | ||
reference: | ||
2025-02-01: | ||
title: "Arrêté du 21 novembre 2024 fixant les montants de l'aide financière prévue à l'article L. 822-1-1 du code de l'éducation" | ||
href: https://www.legifrance.gouv.fr/loda/id/JORFTEXT000050660003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ metadata: | |
- solidarite_insertion | ||
- transport | ||
- education | ||
- aides_alimentation_etudiants_eloignes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- name: "Aide alimentation étudiants éloignés" | ||
period: 2025-02 | ||
input: | ||
etudiant: [true, true, true, true, true, false, false, false, false] | ||
boursier: [true, true, false, true, false, true, false, true, false] | ||
depcom: [97605, 97105, 97411, 75056, 69123, 97601, 97105, 97411, 75056] | ||
output: | ||
aide_alimentation_etudiants_eloignes: [50, 50, 30, 40, 20, 0, 0, 0, 0] |