Skip to content
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

Merged
merged 3 commits into from
Jul 25, 2018
Merged

Implémente la réduction du loyer de solidarité #998

merged 3 commits into from
Jul 25, 2018

Conversation

guillett
Copy link
Member

  • Évolution du système socio-fiscal.
  • Périodes concernées : à partir du 01/01/2018.
  • Zones impactées : prestations/reduction_loyer_solidarite.
  • Détails :
    • Ajoute le calcul de la réduction du loyer de solidarité

@guillett
Copy link
Member Author

@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 ?

@bonjourmauko
Copy link
Member

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


from __future__ import division

import csv
Copy link
Contributor

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)
Copy link
Contributor

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?

Copy link
Member

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.

Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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
Copy link
Contributor

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é"
Copy link
Contributor

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 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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é"
Copy link
Contributor

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 ?

@@ -0,0 +1,56 @@
- name: Isolé Zone 2
Copy link
Contributor

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

reduction_loyer_solidarite_plafond_ressources: 2737 + 2 * 263
reduction_loyer_solidarite: 38.2 + 7 * 5.56

- name: Isolé Zone 1
Copy link
Contributor

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

reduction_loyer_solidarite_plafond_ressources: 2876 + 2 * 280
reduction_loyer_solidarite: 43.38 + 7 * 6.29

- name: Isolé Zone 3
Copy link
Contributor

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

@Anna-Livia
Copy link
Contributor

@guillett @alexsegura Auriez-vous quelques minutes pour qu'on ferme cette PR ?

@alexsegura
Copy link
Contributor

@Anna-Livia Que manque-t-il selon toi ?

@Anna-Livia
Copy link
Contributor

@alexsegura des réponses sur les références législatives :)

@alexsegura
Copy link
Contributor

@Anna-Livia j'ai modifié le nom de la variable, ajouté des références législatives.
J'ai aussi bumpé le numéro de version.
Veux-tu que je rebase avant de merger ?

@Anna-Livia
Copy link
Contributor

Anna-Livia commented Jul 20, 2018

@alexsegura je valide ^^ Merci Alex pour toutes ces modifications 🎉

@alexsegura alexsegura force-pushed the rls branch 2 times, most recently from 7dab5d4 to 3cb282f Compare July 25, 2018 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants