-
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
Implémente la réduction du loyer de solidarité #998
Conversation
@maukoquiroga @Anna-Livia @sandcha j'ai fait une implémentation uniquement pour la Zone 2. L'ajout pour une autre zone pourrait être fait en live ? |
Merci @guillett 😃. Est-ce un spike ou on peut le reviewer (ou en continuer le development) ? J'aimerais bien l'afficher sur https://fr.openfisca.org/legislation |
559c84c
to
0726330
Compare
|
||
from __future__ import division | ||
|
||
import csv |
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 me semble que la plupart de ces imports ne sont pas essentiels :)
|
||
def formula(famille, period, parameters): | ||
rls = parameters(period).prestations.reduction_loyer_solidarite | ||
al_nb_pac = famille('al_nb_personnes_a_charge', period) |
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.
Que pensez-vous de renommer cette variable al_nb_pac
en personnes_a_charge
?
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 y a des personnes à charge pour nombre de prestations et le nombre varie en consééquence.
Là ce sont les personnes à charge au sens des AL.
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.
Est-ce que c'est important de garder cette information dans toute la formule ?
al_nb_pac = famille('al_nb_personnes_a_charge', period)
informe que les personnes à charge sont celles des al
Une autre possibilité est personnes_a_charge_al
plafond_4pac = plafond_ressources.famille_4pac | ||
plafond_5pac = plafond_ressources.famille_5pac | ||
plafond_6pac = plafond_ressources.famille_6pac | ||
plafond_famille = plafond_ressources.famille_6pac + (al_nb_pac > 6) * (al_nb_pac - 6) * plafond_ressources.majoration_par_pac_supp |
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.
proposition :
plafond_famille = (
plafond_ressources.famille_6pac
+ (al_nb_pac > 6) * (al_nb_pac - 6) * plafond_ressources.majoration_par_pac_supp
)
|
||
def formula(famille, period, parameters): | ||
rls = parameters(period).prestations.reduction_loyer_solidarite | ||
al_nb_pac = famille('al_nb_personnes_a_charge', period) |
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.
Que pensez-vous de renommer cette variable al_nb_pac
en personnes_a_charge
?
montant_personne_seule = montant.personnes_seules | ||
montant_couple = montant.couples | ||
montant_1pac = montant.famille_1pac | ||
montant_famille = montant.famille_1pac + (al_nb_pac > 1) * (al_nb_pac - 1) * montant.majoration_par_pac_supp |
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.
proposition :
plafond_famille = (
montant.famille_1pac
+ (al_nb_pac > 1) * (al_nb_pac - 1) * montant.majoration_par_pac_supp
)
class reduction_loyer_solidarite_plafond_ressources(Variable): | ||
value_type = float | ||
entity = Famille | ||
label = u"Plafond de ressources pour le calcul de la réduction du loyer de solidarité" |
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.
A-t'on une référence legislative disponible ?
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.
J'ai trouvé ça, mais je ne suis pas sur que cela soit la référence :
https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006074096&idArticle=LEGIARTI000036389779&dateTexte=&categorieLien=cid
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.
Les chiffres sont ceux-cis https://www.anil.org/aj-reduction-loyer-solidarite-rls-apl/
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.
class reduction_loyer_solidarite(Variable): | ||
value_type = float | ||
entity = Famille | ||
label = u"Éligibilibité à la réduction du loyer de solidarité" |
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.
A-t'on une référence legislative disponible ?
tests/formulas/rls.yaml
Outdated
@@ -0,0 +1,56 @@ | |||
- name: Isolé Zone 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.
Proposition :
Zone 2 isolé
Pour avoir une cohérence entre les noms des différents test
tests/formulas/rls.yaml
Outdated
reduction_loyer_solidarite_plafond_ressources: 2737 + 2 * 263 | ||
reduction_loyer_solidarite: 38.2 + 7 * 5.56 | ||
|
||
- name: Isolé Zone 1 |
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.
Proposition :
Zone 1 isolé
Pour avoir une cohérence entre les noms des différents test
tests/formulas/rls.yaml
Outdated
reduction_loyer_solidarite_plafond_ressources: 2876 + 2 * 280 | ||
reduction_loyer_solidarite: 43.38 + 7 * 6.29 | ||
|
||
- name: Isolé Zone 3 |
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.
Proposition :
Zone 3 isolé
Pour avoir une cohérence entre les noms des différents test
@guillett @alexsegura Auriez-vous quelques minutes pour qu'on ferme cette PR ? |
@Anna-Livia Que manque-t-il selon toi ? |
@alexsegura des réponses sur les références législatives :) |
@Anna-Livia j'ai modifié le nom de la variable, ajouté des références législatives. |
@alexsegura je valide ^^ Merci Alex pour toutes ces modifications 🎉 |
7dab5d4
to
3cb282f
Compare
prestations/reduction_loyer_solidarite
.