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

Intégration des nouvelles règles de l'intéressement - Allocation de Solidarité Spécifique #986

Merged
merged 4 commits into from
Jun 7, 2018

Conversation

frtomas
Copy link
Contributor

@frtomas frtomas commented May 23, 2018

  • Évolution du système socio-fiscal.
  • Périodes concernées : à partir du 01/09/2017.
  • Zones impactées : prestations/minima_sociaux/ass
  • Détails :
    • Ajoute la possibilité de cumuler l'ASS avec un revenu d'activité.
    • Ajoute une variable calculée ass_eligibilite_cumul_individu qui permet de déterminer le droit à ce cumul

Ces changements :

  • Ajoutent une fonctionnalité (par exemple ajout d'une variable).
  • Corrigent ou améliorent un calcul déjà existant.

@frtomas frtomas force-pushed the msa_ass_interessement branch from dd14e6b to e1b8dee Compare May 23, 2018 13:03
@frtomas frtomas requested a review from guillett May 23, 2018 13:04
@frtomas frtomas added the contrib:msa Identification des sujets MSA label May 23, 2018
@frtomas frtomas force-pushed the msa_ass_interessement branch 4 times, most recently from 96ee9ec to 44c78a5 Compare May 29, 2018 07:48
nb_mois_cumul = 0
nb_mois_consecutif_sans_activite = 0

for period_a_tester in periods_a_inclure:
Copy link
Member

Choose a reason for hiding this comment

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

@benjello @fpagnoux auriez-vous des suggestions par rapport à cette implémentation ?

Copy link
Member

@fpagnoux fpagnoux May 30, 2018

Choose a reason for hiding this comment

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

  • Définir periods_a_inclure avec un range(-12, 0 + 1 )
  • Extraire le contenu de la boucle dans une sous-fonction ou une variable, pour éviter la boucle impérative qui est relativement difficile à lire. À la fin,
    nb_mois_cumul = sum(mois_cumul(period) for period in periods_a_inclure) ou
    nb_mois_cumul = sum(individu('mois_cumul_xxx', period) for period in periods_a_inclure)

Copy link
Contributor Author

@frtomas frtomas Jun 5, 2018

Choose a reason for hiding this comment

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

Merci @fpagnoux @guillett
Malheureusement, avec ce type de découpage, je ne parviens pas à voir comment je peux conserver nb_mois_consecutif_sans_activite entre deux appels.
Ce décompte est mis à jour dans la boucle comme ceci :
nb_mois_consecutif_sans_activite = where(absence_ressources_activite * chomeur, nb_mois_consecutif_sans_activite + 1, 0)
Or, ce décompte est capital car, comme noté en commentaire dans la formule :
# reinitialisation du nombre de mois de cumul après 3 mois consécutif sans activité

Copy link
Member

Choose a reason for hiding this comment

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

@frtomas peux-tu utiliser un range pour les périodes. La boucle est le mieux qu'on puisse faire pour le moment. On la merde dès que possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@guillet j'ai fait la modif pour utiliser un range au lieu d'une liste de periode

@frtomas frtomas force-pushed the msa_ass_interessement branch 4 times, most recently from 012e87a to f7ef3bf Compare June 7, 2018 08:38

def formula_2017_09_01(individu, period):
# liste des decalage de périodes à contrôler plus la période en cours
liste_decalage = range(-12, 0 + 1)
Copy link
Member

@guillett guillett Jun 7, 2018

Choose a reason for hiding this comment

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

douze_mois_precedents = [period.offset(offset) for offset in range(-12, 0 + 1)] me parait plus clair et évite de multiples period.offset(decalage).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

C'est rectifié

@frtomas frtomas force-pushed the msa_ass_interessement branch from f7ef3bf to 855889f Compare June 7, 2018 10:29
Copy link
Member

@guillett guillett left a comment

Choose a reason for hiding this comment

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

LGTM, je me suis permis de faire des modifications cosmétiques pour éviter des allers-retours à faible valeur ajoutée.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contrib:msa Identification des sujets MSA kind:evolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants