Skip to content

Commit

Permalink
Handicap lourd (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
benjello authored Feb 10, 2025
1 parent 6f3c8ff commit 142932b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion openfisca_tunisia/scripts/check_path_length.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def extract_paths_too_long(root_dir):
maxlen = max(maxlen, len(relative_file_path))
if len(relative_file_path) > 150:
path_too_long_detected = True
logging.error(f'Path too long of {len(relative_file_path)-150} characters : {relative_file_path}')
logging.error(f'Path too long of {len(relative_file_path) - 150} characters : {relative_file_path}')
outfile.write('{} here: {}\n'.format(
len(relative_file_path),
relative_file_path,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class amen_social_presence_handicap_lourd(Variable):
definition_period = MONTH
# Critères primaires du décret 2020-317 du 19 mai 2020
# Handicap de niveau 3

def formula_2020(menage, period, parameters):
return menage.sum(menage.members('handicap', period) >= 3)

Expand Down
15 changes: 9 additions & 6 deletions tests/formulas/amen_social/eligibilite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
amen_social_eligible: false


- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé
- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé lourd
period: 2022-02
relative_error_margin: 0.01
input:
Expand All @@ -123,7 +123,7 @@
date_naissance: 2020-01-01
eleve:
2022: true
handicap:
handicap:
2022: 3
menage:
personne_de_reference: parent1
Expand All @@ -132,10 +132,11 @@
- enfant2
- enfant3
output:
amen_social_presence_handicap_lourd: true
amen_social_eligible: true


- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé
- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé intermédiaire
period: 2022-02
relative_error_margin: 0.01
input:
Expand All @@ -155,7 +156,7 @@
date_naissance: 2020-01-01
eleve:
2022: true
handicap:
handicap:
2022: 2
menage:
personne_de_reference: parent1
Expand All @@ -164,10 +165,11 @@
- enfant2
- enfant3
output:
amen_social_presence_handicap_lourd: false
amen_social_eligible: false


- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé
- name: Eligibilité au programe Amen social 3 enfants 1000 DT en 2022 dont un handicapé lourd
period: 2022-02
relative_error_margin: 0.01
input:
Expand All @@ -187,7 +189,7 @@
date_naissance: 2020-01-01
eleve:
2022: true
handicap:
handicap:
2022: 3
menage:
personne_de_reference: parent1
Expand All @@ -196,4 +198,5 @@
- enfant2
- enfant3
output:
amen_social_presence_handicap_lourd: true
amen_social_eligible: false

0 comments on commit 142932b

Please sign in to comment.