-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Al primo accession #801
Al primo accession #801
Conversation
- Ajout du calcul de ressources plafonné - Mise à jour des tests avec fiabilité à 5% (voir avec un expert métier pour améliorer la fiabilité)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il serait utile de rajouter les variables intermédiaires ici créées dans cette blacklist qui a pour but de limiter le nombre de variables conservées en cache.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great 🎉!
Il manque juste:
- les références législatives
- si possible quelques tests (seulement 3 pour le moment)
- quelques corrections mineures
class aides_logement_primo_accedant(Variable): | ||
column = FloatCol | ||
entity = Famille | ||
label = u"Allocation logement primo accedant" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque un accent : primo-accédant :)
majoration_loyer = prestations.al_param.majoration_du_loyer_minimum_lo | ||
N = famille('aides_logement_primo_accedant_nb_part', period) | ||
|
||
return ((bareme.calc(baseRessource / N) * N) + majoration_loyer) / 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certaines parenthèses ne sont pas nécessaires:
(bareme.calc(baseRessource / N) * N + majoration_loyer) / 12devrait revenir au même
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De même: si possible, indiquer une source législative.
z1.personne_isolee_sans_enfant * not_(couple) * (al_nb_pac == 0) + | ||
z1.menage_seul * couple * (al_nb_pac == 0) + | ||
z1.menage_ou_isole_avec_1_enfant * (al_nb_pac == 1) + | ||
z1.menage_ou_isole_avec_2_enfants* (al_nb_pac == 2) + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque un espace avant le *
z1.menage_ou_isole_avec_2_enfants * (al_nb_pac == 2) +
loyer = famille.demandeur.menage('loyer', period) | ||
coef_plancher_ressources = legislation(period).prestations.aides_logement.ressources.dar_3 | ||
return max_(baseRessource, loyer * coef_plancher_ressources) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque une ligne vide en fin de fichier.
<VALUE deb="2007-07-01" valeur="0.328"/> | ||
</TAUX> | ||
</TRANCHE> | ||
</BAREME> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
loyer: 500 | ||
depcom: 82121 | ||
output_variables: | ||
aides_logement_primo_accedant: 95 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque un saut de ligne à la fin du fichier.
2017-02: 1 | ||
2017-03: 1 | ||
output_variables: | ||
aide_logement: 154 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Il manque un saut de ligne à la fin du fichier.
K = famille('aides_logement_primo_accedant_k', period) | ||
Lo = famille('aides_logement_primo_accedant_loyer_minimal', period) | ||
|
||
return K * ( L + C - Lo) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Existe-il un article de loi qui définit cette formule ?
Si oui, on peut le mettre dans l'attribut référence
de la variable.
label = u"Allocation logement primo accedant"
reference = "http://legifrance.gouv.fr/affichCodeArticle.doidArticle=LEGIARTI000032852785&cidTexte=LEGITEXT000006073189&dateTexte=20170803"
R = famille('aides_logement_primo_accedant_ressources', period) | ||
N = famille('aides_logement_primo_accedant_nb_part', period) | ||
|
||
return coef_k - ( R / (multi_n * N)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De même: si possible, indiquer une source législative.
baseRessource = famille('aide_logement_base_ressources', period) | ||
loyer = famille.demandeur.menage('loyer', period) | ||
coef_plancher_ressources = legislation(period).prestations.aides_logement.ressources.dar_3 | ||
return max_(baseRessource, loyer * coef_plancher_ressources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
De même: si possible, indiquer une source législative.
Je m'en occupe :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Presque
column = FloatCol | ||
entity = Famille | ||
label = u"Allocation logement pour les primo-accédants plafond mensualité" | ||
reference = u"https://www.legifrance.gouv.fr/affichCodeArticle.do;jsessionid=41AE9B6BDDC571E9CB28A605FDA0F639.tpdila22v_1?idArticle=LEGIARTI000006737216&cidTexte=LEGITEXT000006073189&dateTexte=20170811&categorieLien=id&oldAction=&nbResultRech=" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je crois que pour les accédants c'est plutôt celui-là
… aides au logement pour les primo-accédants
37ac5e5
to
7f1f001
Compare
Prêt à merger 🚀 ! |
Implémentation du calcul des aides au logement primo accédant.
/prestations/aides_logement.py
.Ces changements (effacez les lignes ne correspondant pas à votre cas) :