OpenFisca-France 169.2.0__py3-none-any.whl → 169.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of OpenFisca-France might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: OpenFisca-France
3
- Version: 169.2.0
3
+ Version: 169.2.1
4
4
  Summary: OpenFisca Rules as Code model for France.
5
5
  Author-email: OpenFisca Team <contact@openfisca.fr>
6
6
  Project-URL: Homepage, https://github.com/openfisca/openfisca-france
@@ -123,7 +123,7 @@ openfisca_france/model/prestations/minima_sociaux/cs/acs.py,sha256=nwihxwsjKAmgP
123
123
  openfisca_france/model/prestations/minima_sociaux/cs/cmu.py,sha256=b-voxJzetykcF0WMA_cLebBQRd53Y9Z-xQGOA3jpvPk,11718
124
124
  openfisca_france/model/prestations/minima_sociaux/cs/css.py,sha256=aWKN99IF-xWYVyZ-dPuK5g8Ydptxq48ZyTCCEDpvt_0,3399
125
125
  openfisca_france/model/prestations/minima_sociaux/cs/eligibilite.py,sha256=3Y4eAlMUk3zPlA6SkBHGfTpPz3UALwk1BXEG3i4IF9o,1612
126
- openfisca_france/model/prestations/minima_sociaux/cs/ressources.py,sha256=IbxBHslyqPHQRs1cjvQ9ax84QyERgTzKIzrJNt1urm0,7552
126
+ openfisca_france/model/prestations/minima_sociaux/cs/ressources.py,sha256=GXfAuwf9PocX8ITc6_8hpr-gkzk59BcAiWh_W9Sp0-8,11889
127
127
  openfisca_france/model/prestations/prestations_familiales/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
128
  openfisca_france/model/prestations/prestations_familiales/aeeh.py,sha256=3rJg62yCMOYJ0iaj7tnAHDwXIOMLC3_sU5RT0qaWvqA,5526
129
129
  openfisca_france/model/prestations/prestations_familiales/af.py,sha256=HWvFcxV2hETSrrTHLgAYZmNBrO8aN22OJYI4zwj-B1c,18369
@@ -3376,6 +3376,12 @@ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_soc
3376
3376
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/cmu/forfait_logement_sans_al/taux_2p.yaml,sha256=1N6C0k8k4rf7Et8dNp8jr7a5qzr1-vokZ-Nklpgg5os,851
3377
3377
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/cmu/forfait_logement_sans_al/taux_3p_plus.yaml,sha256=nTHnXWivWHwnJTD68oLi9FBso6HZp1WiMbSQ5l7EJiI,853
3378
3378
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/index.yaml,sha256=WgNJ9r1YcO2ej8-khhr9yFfJavCQkOFp1vSe0peTsNw,81
3379
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/aah.yaml,sha256=kOhUSpumG7IJK5vyVLRpSTIls83wcWeV4ivxocuL_Ls,781
3380
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/index.yaml,sha256=OKXnuJSiehezBYGLvXnTe51IqmsHDD5l3B3FvBozj34,108
3381
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/asi/couple.yaml,sha256=d4mUKavI72p29fKTCMI1Q8EzZ0V17kmDuRh9885t09A,529
3382
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/asi/personne_seule.yaml,sha256=U-1iV2BsrCz33F_2BQEmUbWw5B9BR1tM1AqtU5TsGx4,468
3383
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/aspa_asv/couple.yaml,sha256=6Yn83eSrcv3zWLVCdAdJfhk5xMkbJuC_79DTQvtOfCU,489
3384
+ openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/abattements/aspa_asv/personne_seule.yaml,sha256=y7l2XT5YbHFz2BaZm0JDuQlnN6Fs6-PRtIPCE0oClc4,497
3379
3385
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/forfait_logement_avec_al/index.yaml,sha256=w9-eAbnOWJTfLi4Tv2G61fAf6jPduq4DDdjxz-GLXwA,73
3380
3386
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/forfait_logement_avec_al/taux_1p.yaml,sha256=g1h-Kyayvycv7pj02pswI7D0rjCVQIq_DZZu66KVg5w,747
3381
3387
  openfisca_france/parameters/prestations_sociales/solidarite_insertion/minima_sociaux/cs/css/forfait_logement_avec_al/taux_2p.yaml,sha256=wOyZ3N36UERH08XYkSlLb90wG1U7gjMKq9HuMYzgB-c,748
@@ -4018,8 +4024,8 @@ openfisca_france/scripts/performance/measure_spiral_performances.py,sha256=cQIxE
4018
4024
  openfisca_france/scripts/performance/measure_tests_performance.py,sha256=HYgSJy-OMZay2AZt6ztntgdUbW_RL2xMr-iHcK-zoVY,1869
4019
4025
  openfisca_france/situation_examples/__init__.py,sha256=BTRmrqk9lsjfhtPXsYcsWqXFEYyFpgLcxNs6oJsy8zk,262
4020
4026
  openfisca_france/situation_examples/couple.json,sha256=Ot1x4wl3IS-2-10X3V7ZUokkOMXi96s-xK7A0gNvRF4,862
4021
- OpenFisca_France-169.2.0.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4022
- OpenFisca_France-169.2.0.dist-info/METADATA,sha256=EM_VtSnk3iki07noeohFmSAqTuFutTjGy0vBkBZG6Y0,20862
4023
- OpenFisca_France-169.2.0.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
4024
- OpenFisca_France-169.2.0.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4025
- OpenFisca_France-169.2.0.dist-info/RECORD,,
4027
+ OpenFisca_France-169.2.1.dist-info/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4028
+ OpenFisca_France-169.2.1.dist-info/METADATA,sha256=OkNNNHSTJ7-7cl_iL7h_EDV0UCxu2VNQ14r3ZAUOdYA,20862
4029
+ OpenFisca_France-169.2.1.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
4030
+ OpenFisca_France-169.2.1.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4031
+ OpenFisca_France-169.2.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
- from numpy import absolute as abs_, logical_or as or_, logical_not as not_
1
+ from numpy import absolute as abs_, logical_or as or_, logical_not as not_, select
2
2
 
3
3
  from openfisca_core.periods import Period
4
4
 
@@ -8,6 +8,7 @@ from openfisca_france.model.base import (
8
8
  Famille,
9
9
  MONTH,
10
10
  ADD,
11
+ max_,
11
12
  TypesStatutOccupationLogement,
12
13
  TypesActivite,
13
14
  set_input_divide_by_period,
@@ -31,21 +32,21 @@ class css_cmu_base_ressources_individu(Variable):
31
32
 
32
33
  def formula(individu, period, parameters):
33
34
  # Rolling year
34
- previous_year = Period(('year', period.start, 1)).offset(-1)
35
+ previous_year = compute_previous_year(period)
35
36
  # N-1
36
37
  last_year = period.last_year
37
38
  last_month = period.last_month
38
39
 
39
- P = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.cmu
40
+ parametres_cmu = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.cmu
40
41
 
41
42
  ressources_a_inclure = [
42
- 'aah',
43
43
  'allocation_securisation_professionnelle',
44
- 'asi',
45
44
  'ass',
46
45
  'bourse_recherche',
47
46
  'caah',
48
47
  'chomage_net',
48
+ 'css_base_ressources_aah_individu',
49
+ 'css_base_ressources_asi_individu',
49
50
  'dedommagement_victime_amiante',
50
51
  'gains_exceptionnels',
51
52
  'indemnites_chomage_partiel',
@@ -82,11 +83,91 @@ class css_cmu_base_ressources_individu(Variable):
82
83
  + bourse
83
84
  + revenus_tns(individu, previous_year, last_year)
84
85
  - pensions_alim_versees
85
- - abbattement_chomage(individu, period, previous_year, P)
86
+ - abattement_chomage(individu, period, previous_year, parametres_cmu)
86
87
  - neutralisation_stage_formation_pro(individu, previous_year, last_month)
87
88
  )
88
89
 
89
90
 
91
+ class css_base_ressources_aah_individu(Variable):
92
+ value_type = float
93
+ label = "Base de ressources AAH de l'individu prise en compte pour l'éligibilité à la CSS après application de l'abattement"
94
+ reference = [
95
+ 'Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021',
96
+ 'https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75',
97
+ 'Bulletin officiel Santé - Protection sociale - Solidarité n° 2023/24 du 29 décembre 2023 - Instruction interministérielle N° DSS/SD2A/2023/98 du 22 décembre 2023',
98
+ 'https://sante.gouv.fr/fichiers/bo/2023/2023.24.sante.pdf#page=82',
99
+ ]
100
+ entity = Individu
101
+ definition_period = MONTH
102
+ set_input = set_input_divide_by_period
103
+
104
+ def formula(individu, period, parameters):
105
+ return individu('aah', period)
106
+
107
+ def formula_2021_04(individu, period, parameters):
108
+ return max_(individu('aah', period) - parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.css.abattements.aah, 0)
109
+
110
+
111
+ class css_base_ressources_asi_individu(Variable):
112
+ value_type = float
113
+ label = "Base de ressources ASI de l'individu prise en compte pour l'éligibilité à la CSS après application de l'abattement"
114
+ reference = [
115
+ 'Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021',
116
+ 'https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75'
117
+ ]
118
+ entity = Individu
119
+ definition_period = MONTH
120
+ set_input = set_input_divide_by_period
121
+
122
+ def formula(individu, period, parameters):
123
+ return individu('asi', period)
124
+
125
+ def formula_2021_04(individu, period, parameters):
126
+
127
+ aah = individu('aah', period)
128
+ asi = individu('asi', period)
129
+ asi_famille = individu.famille.members('asi', period)
130
+ nb_allocataire_asi = individu.famille.sum(asi_famille > 0, role=Famille.PARENT)
131
+
132
+ abattement_asi_personne_seule = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.css.abattements.asi.personne_seule
133
+ abattement_asi_couple = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.css.abattements.asi.couple
134
+
135
+ condition_abattement_asi_couple = nb_allocataire_asi > 1
136
+ condition_abattement_asi_personne_seule = asi > 0
137
+ abattement_asi = select(
138
+ [aah > 0, condition_abattement_asi_couple, condition_abattement_asi_personne_seule],
139
+ [0, abattement_asi_couple / 2, abattement_asi_personne_seule],
140
+ 0)
141
+
142
+ montant_asi = asi - abattement_asi
143
+ return max_(montant_asi, 0)
144
+
145
+
146
+ class css_base_ressources_aspa_asv(Variable):
147
+ value_type = float
148
+ label = "Base de ressources ASPA/ASV de pour une famille prise en compte pour l'éligibilité à la CSS après application de l'abattement"
149
+ reference = [
150
+ 'Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021',
151
+ 'https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75'
152
+ ]
153
+ entity = Famille
154
+ definition_period = MONTH
155
+ set_input = set_input_divide_by_period
156
+
157
+ def formula(famille, period, parameters):
158
+ return famille('aspa', period)
159
+
160
+ def formula_2021_04(famille, period, parameters):
161
+ aspa = famille('aspa', period)
162
+ aspa_couple = famille('aspa_couple', period)
163
+ abattement_aspa_personne_seule = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.css.abattements.aspa_asv.personne_seule
164
+ abattement_aspa_couple = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.css.abattements.aspa_asv.couple
165
+ return select(
166
+ [(aspa > 0) * aspa_couple, aspa > 0],
167
+ [max_(aspa - abattement_aspa_couple, 0), max_(aspa - abattement_aspa_personne_seule, 0)],
168
+ aspa)
169
+
170
+
90
171
  class css_cmu_base_ressources(Variable):
91
172
  value_type = float
92
173
  label = "Base de ressources prise en compte pour l'éligibilité à la ACS / CMU-C / CSS"
@@ -95,12 +176,12 @@ class css_cmu_base_ressources(Variable):
95
176
  set_input = set_input_divide_by_period
96
177
 
97
178
  def formula(famille, period, parameters):
98
- previous_year = Period(('year', period.start, 1)).offset(-1)
179
+ previous_year = compute_previous_year(period)
99
180
 
100
181
  ressources_famille_a_inclure = [
101
182
  'af',
102
183
  'asf',
103
- 'aspa',
184
+ 'css_base_ressources_aspa_asv',
104
185
  'cf',
105
186
  'paje_clca',
106
187
  'paje_prepare',
@@ -115,7 +196,7 @@ class css_cmu_base_ressources(Variable):
115
196
  css_cmu_forfait_logement_base = famille('css_cmu_forfait_logement_base', period)
116
197
  css_cmu_forfait_logement_al = famille('css_cmu_forfait_logement_al', period)
117
198
 
118
- P = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.cmu
199
+ parametres_cmu = parameters(period).prestations_sociales.solidarite_insertion.minima_sociaux.cs.cmu
119
200
 
120
201
  proprietaire = (statut_occupation_logement == TypesStatutOccupationLogement.proprietaire)
121
202
  heberge_titre_gratuit = (statut_occupation_logement == TypesStatutOccupationLogement.loge_gratuitement)
@@ -130,7 +211,7 @@ class css_cmu_base_ressources(Variable):
130
211
  ressources_parents = famille.sum(ressources_individuelles, role = Famille.PARENT)
131
212
 
132
213
  age = famille.members('age', period)
133
- condition_enfant_a_charge = (age >= 0) * (age <= P.age_limite_pac)
214
+ condition_enfant_a_charge = (age >= 0) * (age <= parametres_cmu.age_limite_pac)
134
215
  ressources_enfants = famille.sum(ressources_individuelles * condition_enfant_a_charge, role = Famille.ENFANT)
135
216
 
136
217
  return forfait_logement + ressources_famille + ressources_parents + ressources_enfants
@@ -138,12 +219,17 @@ class css_cmu_base_ressources(Variable):
138
219
  # Helper functions
139
220
 
140
221
 
222
+ def compute_previous_year(period):
223
+ return Period(('year', period.start, 1)).offset(-1)
224
+
141
225
  # Abattement sur revenus d'activité si :
142
226
  # - IJ maladie
143
227
  # - chômage
144
228
  # - ass
145
229
  # - formation professionnelle
146
- def abbattement_chomage(individu, period, previous_year, P):
230
+
231
+
232
+ def abattement_chomage(individu, period, previous_year, parametres_cmu):
147
233
  indemnites_journalieres_maladie = individu('indemnites_journalieres_maladie', period)
148
234
 
149
235
  chomage = individu('activite', period) == TypesActivite.chomeur
@@ -163,7 +249,7 @@ def abbattement_chomage(individu, period, previous_year, P):
163
249
 
164
250
  salaire_net = individu('salaire_net', previous_year, options = [ADD])
165
251
 
166
- return eligibilite_abattement_chomage * salaire_net * P.abattement_chomage
252
+ return eligibilite_abattement_chomage * salaire_net * parametres_cmu.abattement_chomage
167
253
 
168
254
 
169
255
  # Revenus de stage de formation professionnelle exclus si plus perçus depuis 1 mois
@@ -0,0 +1,15 @@
1
+ description: Abattement sur le montant des ressources AAH pour le calcul de l'éligibilité à la CSS
2
+ values:
3
+ 2021-04-01:
4
+ value: 68
5
+ metadata:
6
+ short_label: Abattement
7
+ unit: currency
8
+ reference:
9
+ 2021-04-01:
10
+ title: Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021
11
+ href: https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75
12
+ notes:
13
+ 2024-01-01:
14
+ title: Précisions sur la formule - Bulletin officiel Santé - Protection sociale - Solidarité n° 2023/24 du 29 décembre 2023 - Instruction interministérielle N° DSS/SD2A/2023/98 du 22 décembre 2023
15
+ href: https://sante.gouv.fr/fichiers/bo/2023/2023.24.sante.pdf#page=82
@@ -0,0 +1,11 @@
1
+ description: Abattement sur le montant des ressources ASI pour le calcul de l'éligibilité à la CSS pour un couple dont les deux personnes beneficient de l'aide
2
+ values:
3
+ 2021-04-01:
4
+ value: 86
5
+ metadata:
6
+ short_label: Abattement
7
+ unit: currency
8
+ reference:
9
+ 2021-04-01:
10
+ title: Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021
11
+ href: https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75
@@ -0,0 +1,11 @@
1
+ description: Abattement sur le montant des ressources ASI pour le calcul de l'éligibilité à la CSS
2
+ values:
3
+ 2021-04-01:
4
+ value: 49
5
+ metadata:
6
+ short_label: Abattement
7
+ unit: currency
8
+ reference:
9
+ 2021-04-01:
10
+ title: Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021
11
+ href: https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75
@@ -0,0 +1,11 @@
1
+ description: Abattement sur le montant des ressources ASPA/ASV pour le calcul de l'éligibilité à la CSS pour un couple
2
+ values:
3
+ 2021-04-01:
4
+ value: 110
5
+ metadata:
6
+ short_label: Abattement
7
+ unit: currency
8
+ reference:
9
+ 2021-04-01:
10
+ title: Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021
11
+ href: https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75
@@ -0,0 +1,11 @@
1
+ description: Abattement sur le montant des ressources ASPA/ASV pour le calcul de l'éligibilité à la CSS pour une personne seule
2
+ values:
3
+ 2021-04-01:
4
+ value: 71
5
+ metadata:
6
+ short_label: Abattement
7
+ unit: currency
8
+ reference:
9
+ 2021-04-01:
10
+ title: Bulletin officiel Santé - Protection sociale - Solidarité n° 2021/6 du 16 avril 2021 - Instruction interministérielle N° DSS/SD2A/2021/71 du 30 mars 2021
11
+ href: https://sante.gouv.fr/fichiers/bo/2021/2021.6.sante.pdf#page=75
@@ -0,0 +1 @@
1
+ description: Abattements sur le montant de certaines ressources pour le calcul de l'éligibilité à la CSS