Skip to content

Commit

Permalink
Merge pull request #220 from openfisca/fix-antony-issue
Browse files Browse the repository at this point in the history
Résolution de bug sur l'aide de la ville d'Antony
  • Loading branch information
jenovateurs authored Nov 15, 2024
2 parents db9b003 + 419359d commit a00bf42
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 14 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
# Changelog

## [6.17.0] - 2024-11-06
## [6.17.1] - 2024-11-14

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

### Changed

- Résolution d'un bug de récupération de l'attribut handicap : `antony_aide_depart_sejour_adapte`

## [6.17.0] - 2024-11-06

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

### Added

- Ajoute les aides suivantes : `antony_aide_depart_sejour_adapte`, `antony_bourse_communale`, `antony_bourse_conservatoire`, `antony_bourse_famille_nombreuse`, `antony_noel_pour_tous`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ def formula(famille, period, parameters):

condition_ressources_remplies = famille('antony_eligibilite_ressources', period)

handicap = famille.members('handicap', period)
nb_enfants_handicapes = famille.sum(famille.members('handicap', period), role = Famille.ENFANT)
montant_individuel = famille('antony_aide_depart_sejour_adapte_montant_individuel', period)
montant_total = famille.sum(montant_individuel * handicap)
montant_total = montant_individuel * nb_enfants_handicapes

return residence_antony * condition_ressources_remplies * montant_total

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class antony_noel_pour_tous(Variable):
entity = Famille
definition_period = MONTH
label = "Éligibilité de la famille au Noël pour Tous de la ville de Antony"
reference = "https://www.ville-antony.fr/actualites/noel-ccas-2023"
reference = "https://www.ville-antony.fr/actualites/noel-ccas-2024"

def formula(famille, period, parameters):
age_maximum = parameters(period).communes.antony.noel_pour_tous.age_maximum
Expand Down
3 changes: 0 additions & 3 deletions openfisca_france_local/communes/antony/base_ressources.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ class antony_base_ressources(Variable):
label = "Base ressources d'une famille aux dispositifs d'Antony"

def formula(famille, period, parameters):
# N-1
last_year = period.last_year

# M-1 to M-3
last_three_months = period.last_3_months

Expand Down
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.17.0',
version='6.17.1',
author='OpenFisca Team',
author_email='[email protected]',
classifiers=[
Expand Down
93 changes: 87 additions & 6 deletions tests/communes/antony/aide_depart_sejour_adapte.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,93 @@
output:
antony_aide_depart_sejour_adapte_montant_individuel: [600, 300, 0]

- name: Aide-départ-séjour-adapté
- name: Aide-départ-séjour-adapté-tranche-2
period: 2021-11
input:
antony_eligibilite_residence: [true, false, true, true, true]
handicap: [true, true, false, true, true]
antony_eligibilite_ressources: [true, true, true, false, true]
antony_aide_depart_sejour_adapte_montant_individuel: [300, 300, 300, 300, 600]
famille:
parents: [parent1, parent2]
enfants: [enfant1, enfant2, enfant3]
antony_aide_depart_sejour_adapte_montant_individuel: 600
individus:
parent1:
age: 52
parent2:
age: 50
enfant1:
age: 15
enfant2:
age: 16
enfant3:
date_naissance: 2018-04-01
handicap: true
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [enfant1, enfant2, enfant3]
antony_eligibilite_residence: true
foyer_fiscal:
declarants: [parent1, parent2]
personnes_a_charge: [enfant1, enfant2, enfant3]
output:
antony_aide_depart_sejour_adapte: [300, 0, 0, 0, 600]
antony_aide_depart_sejour_adapte: 600

- name: Aide-départ-séjour-adapté-tranche-1
period: 2021-11
input:
famille:
parents: [parent1, parent2]
enfants: [enfant1, enfant2, enfant3]
antony_aide_depart_sejour_adapte_montant_individuel: 300
individus:
parent1:
age: 52
parent2:
age: 50
enfant1:
age: 15
enfant2:
age: 16
enfant3:
date_naissance: 2018-04-01
handicap: true
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [enfant1, enfant2, enfant3]
antony_eligibilite_residence: true
foyer_fiscal:
declarants: [parent1, parent2]
personnes_a_charge: [enfant1, enfant2, enfant3]

output:
antony_aide_depart_sejour_adapte: 300

- name: Aide-départ-séjour-adapté-tranche-1
period: 2021-11
input:
famille:
parents: [parent1, parent2]
enfants: [enfant1, enfant2, enfant3]
antony_aide_depart_sejour_adapte_montant_individuel: 300
individus:
parent1:
age: 52
parent2:
age: 50
enfant1:
age: 15
enfant2:
age: 16
enfant3:
date_naissance: 2018-04-01
menage:
personne_de_reference: parent1
conjoint: parent2
enfants: [enfant1, enfant2, enfant3]
antony_eligibilite_residence: true
foyer_fiscal:
declarants: [parent1, parent2]
personnes_a_charge: [enfant1, enfant2, enfant3]

output:
antony_aide_depart_sejour_adapte: 0

0 comments on commit a00bf42

Please sign in to comment.