OpenFisca-France 172.1.0__py3-none-any.whl → 172.1.2__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.

@@ -264,6 +264,22 @@ class aide_logement_date_pret_conventionne(Variable):
264
264
  definition_period = ETERNITY
265
265
 
266
266
 
267
+ class aide_logement_est_pret_conventionne(Variable):
268
+ value_type = bool
269
+ default_value = False
270
+ entity = Menage
271
+ label = "Indique que le ménage a contracté un prêt conventionné pour l'acquisition un logement"
272
+ definition_period = ETERNITY
273
+
274
+
275
+ class aide_logement_date_pret(Variable):
276
+ value_type = date
277
+ default_value = date.max
278
+ entity = Menage
279
+ label = "Date de contraction d'un prêt pour l'acquisition d'un logement"
280
+ definition_period = ETERNITY
281
+
282
+
267
283
  class date_debut_chomage(Variable):
268
284
  value_type = date
269
285
  default_value = date.max
@@ -286,7 +302,14 @@ class aides_logement_primo_accedant_eligibilite(Variable):
286
302
 
287
303
  zone_apl = menage('zone_apl', period)
288
304
  aide_logement_etat_logement = menage('etat_logement', period)
289
- aide_logement_date_pret_conventionne = menage('aide_logement_date_pret_conventionne', period)
305
+
306
+ date_pret_conventionne = menage('aide_logement_date_pret_conventionne', period)
307
+ date_pret_conventionne_est_valide = (date_pret_conventionne is not None) * (date_pret_conventionne < date.max)
308
+ est_pret_conventionne = (menage('aide_logement_est_pret_conventionne', period)
309
+ + date_pret_conventionne_est_valide)
310
+ aide_logement_date_pret = where(
311
+ date_pret_conventionne_est_valide, date_pret_conventionne, menage('aide_logement_date_pret', period))
312
+
290
313
  est_logement_ancien = (
291
314
  (aide_logement_etat_logement == TypeEtatLogement.acquisition_amelioration)
292
315
  + (aide_logement_etat_logement == TypeEtatLogement.acquisition_sans_amelioration_logement_existant)
@@ -295,12 +318,12 @@ class aides_logement_primo_accedant_eligibilite(Variable):
295
318
  )
296
319
 
297
320
  est_zone_3 = (zone_apl == TypesZoneApl.zone_3)
298
- date_pret_conventionne_avant_2018_01 = (aide_logement_date_pret_conventionne < date(2018, 1, 1))
299
- date_pret_conventionne_avant_2020_01 = (aide_logement_date_pret_conventionne < date(2020, 1, 1))
321
+ date_pret_avant_2018_01 = (aide_logement_date_pret < date(2018, 1, 1))
322
+ date_pret_avant_2020_01 = (aide_logement_date_pret < date(2020, 1, 1))
300
323
 
301
324
  eligibilite = select(
302
- [date_pret_conventionne_avant_2018_01, date_pret_conventionne_avant_2020_01],
303
- [True, (est_logement_ancien * est_zone_3)], default = False
325
+ [date_pret_avant_2018_01, date_pret_avant_2020_01],
326
+ [True, (est_pret_conventionne * est_logement_ancien * est_zone_3)], default = False
304
327
  )
305
328
 
306
329
  return accedant * eligibilite
@@ -1553,7 +1576,7 @@ class aides_logement_k(Variable):
1553
1576
  class aides_logement_primo_accedant_k(Variable):
1554
1577
  value_type = float
1555
1578
  entity = Famille
1556
- label = 'Allocation logement pour les primo-accédants K'
1579
+ label = "Coefficient K pour l'allocation logement et l'aide personnalisée au logement pour les primo-accédants K"
1557
1580
  reference = 'https://www.legifrance.gouv.fr/affichCodeArticle.do?cidTexte=LEGITEXT000006073189&idArticle=LEGIARTI000006737341&dateTexte=&categorieLien=cid'
1558
1581
  definition_period = MONTH
1559
1582
  set_input = set_input_divide_by_period
@@ -1562,13 +1585,19 @@ class aides_logement_primo_accedant_k(Variable):
1562
1585
  # en accession-al, le coefficient K est celui defini pour le secteur foyer-al
1563
1586
  param = parameters(period).prestations_sociales.aides_logement.allocations_logement.foyer.k_coef_prise_en_charge
1564
1587
 
1565
- plafond_k = param.plafonds.plafond_apl2_et_al
1566
- cm2 = param.cm_et_r.cm2_apl2_et_al
1588
+ # Le coefficient K n'est pas le même selon qu'il s'agisse d'un prêt conventionné ou non
1589
+ date_pret_conventionne = famille.demandeur.menage('aide_logement_date_pret_conventionne', period)
1590
+ date_pret_conventionne_est_valide = (date_pret_conventionne is not None) * (date_pret_conventionne < date.max)
1591
+ est_pret_conventionne = (famille.demandeur.menage('aide_logement_est_pret_conventionne', period)
1592
+ + date_pret_conventionne_est_valide)
1593
+
1594
+ plafond_k = where(est_pret_conventionne, param.plafonds.plafond_apl1, param.plafonds.plafond_apl2_et_al)
1595
+ cm = where(est_pret_conventionne, param.cm_et_r.cm3_apl3, param.cm_et_r.cm2_apl2_et_al)
1567
1596
 
1568
1597
  R = famille('aide_logement_base_ressources', period)
1569
1598
  N = famille('aides_logement_nb_part', period)
1570
1599
 
1571
- return plafond_k - (R / (cm2 * N))
1600
+ return min_(plafond_k, plafond_k - (R / (cm * N)))
1572
1601
 
1573
1602
 
1574
1603
  class aides_logement_foyer_k_al(Variable):
@@ -7,4 +7,4 @@ metadata:
7
7
  - plafond_smic_2025_01_01
8
8
  - plafond_smic_courant
9
9
  - plafond_smic_2023_12_31
10
- - plafond_smic
10
+ - plafond
@@ -7,4 +7,4 @@ metadata:
7
7
  - plafond_smic_2025_01_01
8
8
  - plafond_smic_courant
9
9
  - plafond_smic_2023_12_31
10
- - plafond
10
+ - plafond_smic
@@ -0,0 +1,22 @@
1
+ description: Coefficient multiplicateur cm3 dans la formule de K (paramètre de calcul des aides logements en secteur foyer et accession) pour les APL3
2
+ values:
3
+ 2007-07-01:
4
+ value: 22111.33
5
+ metadata:
6
+ short_label: cm3
7
+ last_value_still_valid_on: "2025-07-23"
8
+ label_en: Parameters for new home-buyers (APL)
9
+ ipp_csv_id: mult_k_apl_accession
10
+ unit: currency
11
+ reference:
12
+ 2007-07-01:
13
+ - title: Arrêté du 27/09/2019, art. 22
14
+ href: https://www.legifrance.gouv.fr/loda/article_lc/LEGIARTI000039160769
15
+ official_journal_date:
16
+ 2007-07-01: "2007-07-12"
17
+ notes:
18
+ 2007-07-01:
19
+ - title: Paramètres dispo dans "Eléments de calcul des aides personnelles au logement", 2013
20
+ documentation: |-
21
+ Notes :
22
+ L'APL est réformée en 2001 et les paramètres ci-dessus peuvent remonter jusqu'à 2001.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: OpenFisca-France
3
- Version: 172.1.0
3
+ Version: 172.1.2
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
@@ -81,7 +81,7 @@ openfisca_france/model/prestations/aide_alimentation_etudiants_eloignes.py,sha25
81
81
  openfisca_france/model/prestations/aide_mobilite.py,sha256=SqzPIkkEZAgKoEbc73d3bhsYhFxZaN1o2Ik4gTm7VWY,20560
82
82
  openfisca_france/model/prestations/aide_permis_demandeur_emploi.py,sha256=7V8gVzI9Rgg60lxqddrrIqhjqe06J2GfMQoSXKrdY7I,3410
83
83
  openfisca_france/model/prestations/aide_permis_pro_btp.py,sha256=bzh9cDpJetqn72S2ziQJlhZuJrtOw-tYSDBOYKIML48,2258
84
- openfisca_france/model/prestations/aides_logement.py,sha256=YrVKYYwAiUvrRWYvp5yLpdw1Q8SGDqF78lnjNbA2qNs,90656
84
+ openfisca_france/model/prestations/aides_logement.py,sha256=cIdg4tYThpWcZ_bk13r1NN_OvztW-JMGhsl4BUcJqXk,92190
85
85
  openfisca_france/model/prestations/alimentation.py,sha256=3gkbQrPdobAHmroJiG07ajxzWjLlyMhMh6kMvg4s4Hk,2350
86
86
  openfisca_france/model/prestations/autonomie.py,sha256=7UpuhDO-LFjwbq3UWSDyOKJCsTw1rx8O-tS3dG-MBn8,19394
87
87
  openfisca_france/model/prestations/bail_reel_solidaire.py,sha256=uEDGxseBXC70v-otwXHOCTVUj7ZqIlc1za7rv8EE5Hg,3166
@@ -1844,7 +1844,7 @@ openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales
1844
1844
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/dispositifs_de_reductions_des_cotisations_famille_1993_1996/1_1_1_2_smic.yaml,sha256=dkLvKMtdUMG_UH2ojEdsXxEPSk640NdPV2-lPQaFP-A,1194
1845
1845
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/dispositifs_de_reductions_des_cotisations_famille_1993_1996/1_2_1_3_smic.yaml,sha256=Q0Lq13jMWbZUPjj_nmMuTEdvjGfvSnp3HnHjdy0Rxsc,1193
1846
1846
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/dispositifs_de_reductions_des_cotisations_famille_1993_1996/index.yaml,sha256=ULnaxKzc1Z5vh6FRuEFa9rsjrzW1EMKZ5byVb8iwLEs,283
1847
- openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/mmid/index.yaml,sha256=Xais63YSRyMAI-UeTiH88ZACZJ6GTTAR_wPrONnTACY,351
1847
+ openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/mmid/index.yaml,sha256=MPxiNXTdgTWDJjUh3S0J2ya0slGNKG990LKsnAsLRwE,346
1848
1848
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/mmid/plafond.yaml,sha256=QrsZQAbclHdRjIHGJQ-1EtgsE_J79SOOqBzKgaSX1dI,1509
1849
1849
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/mmid/plafond_smic_2023_12_31.yaml,sha256=GuNjszGNdlMmxl_0-Z9ho51Y8KtySVpEeSbYR2B24D8,1345
1850
1850
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/mmid/plafond_smic_2025_01_01.yaml,sha256=5WODsYQGp5dIu9h2E7odXtCAEZibuybrswYsXxjUBdM,714
@@ -1854,7 +1854,7 @@ openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales
1854
1854
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/ristournes_juppe_i_ii_et_iii_1995_2003/plafond_en_nombre_de_smic.yaml,sha256=fjjRKm-PPvmYF8Wd_A3zp7dw_2S0gj4VgMB4t2E1ACU,1667
1855
1855
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/ristournes_juppe_i_ii_et_iii_1995_2003/taux.yaml,sha256=M_yarK_pJNOMHkJqzcweeDpWfyqzytC2wU7blY9jHxc,1651
1856
1856
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/alleg_gen/ristournes_juppe_i_ii_et_iii_1995_2003/taux_max_au_smic.yaml,sha256=F87cz-E4ex39WFPfQEryVNH_ulQ8evEfqrPdf83fyXE,1255
1857
- openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/allegement_cotisation_allocations_familiales/index.yaml,sha256=WGFiHskGL_BwXE4AJVLUajrIiKLvkd1JKN7yYHJhImk,336
1857
+ openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/allegement_cotisation_allocations_familiales/index.yaml,sha256=_X4nJW-WoOC38PChGSkqFBxwxE06wB2X1Jia9PjREmE,341
1858
1858
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/allegement_cotisation_allocations_familiales/plafond_smic.yaml,sha256=eZ78JT4Z8lAvUg0UWcdEsxAU9-QseG5ahV1Awk0WaRw,1303
1859
1859
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/allegement_cotisation_allocations_familiales/plafond_smic_2023_12_31.yaml,sha256=1jdHr2KQ9_jTiWNYv5I9ngN7zEzscGhqyfVRWAB2AS4,1369
1860
1860
  openfisca_france/parameters/prelevements_sociaux/reductions_cotisations_sociales/allegement_cotisation_allocations_familiales/plafond_smic_2025_01_01.yaml,sha256=fwdOUcGZ_5QgetroY2A8xkSm7bU7DC5jlEvLQcfEL7E,825
@@ -2221,6 +2221,7 @@ openfisca_france/parameters/prestations_sociales/aides_logement/allocations_loge
2221
2221
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/index.yaml,sha256=toi3wddHA3A4S70jPt5P2axgIao6j3n6kWDOLKGk8LY,192
2222
2222
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/cm_et_r/cm1_apl1.yaml,sha256=HfzPLGc7BJV40DO9IGk-QhfJ2gX9h0YQNc8dkfSzQcQ,799
2223
2223
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/cm_et_r/cm2_apl2_et_al.yaml,sha256=xNOhkghivQvPJAMwvWALinNlOzp1mVD5umlnzMqqCEg,5823
2224
+ openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/cm_et_r/cm3_apl3.yaml,sha256=zjhtYSNb1D3Gj40UrmIyN0DZZ8egNOhGtTr6FNUBciM,818
2224
2225
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/cm_et_r/index.yaml,sha256=3QPsZYkmrRIRdSqypNFp_qmVa5bbrHRnJy2KVv4U_lE,258
2225
2226
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/cm_et_r/r_apl1.yaml,sha256=xbH2i42WzD7Q9BlXpkwpwt2W38pF08Urq04iXHZ6d2M,796
2226
2227
  openfisca_france/parameters/prestations_sociales/aides_logement/allocations_logement/foyer/k_coef_prise_en_charge/n_nombre_parts/index.yaml,sha256=5LVoRM6NFB_lAIyrZ6n9a9CteVXsIc_Q0LUoRX7GRXQ,703
@@ -4131,8 +4132,8 @@ openfisca_france/scripts/performance/measure_spiral_performances.py,sha256=cQIxE
4131
4132
  openfisca_france/scripts/performance/measure_tests_performance.py,sha256=HYgSJy-OMZay2AZt6ztntgdUbW_RL2xMr-iHcK-zoVY,1869
4132
4133
  openfisca_france/situation_examples/__init__.py,sha256=BTRmrqk9lsjfhtPXsYcsWqXFEYyFpgLcxNs6oJsy8zk,262
4133
4134
  openfisca_france/situation_examples/couple.json,sha256=Ot1x4wl3IS-2-10X3V7ZUokkOMXi96s-xK7A0gNvRF4,862
4134
- openfisca_france-172.1.0.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4135
- openfisca_france-172.1.0.dist-info/METADATA,sha256=Jik9PiL-gT53TqgYudVOt2v7zlP-loOfb_KAQZnMftw,20878
4136
- openfisca_france-172.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4137
- openfisca_france-172.1.0.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4138
- openfisca_france-172.1.0.dist-info/RECORD,,
4135
+ openfisca_france-172.1.2.dist-info/licenses/LICENSE.AGPL.txt,sha256=2N5ReRelkdqkR9a-KP-y-shmcD5P62XoYiG-miLTAzo,34519
4136
+ openfisca_france-172.1.2.dist-info/METADATA,sha256=udLCnjqg4bGllWJe304ObC7gmPcDvCKyjM3S3-Qa4Mg,20878
4137
+ openfisca_france-172.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4138
+ openfisca_france-172.1.2.dist-info/top_level.txt,sha256=1LbD6QJWehKGIcjtaJ45tbQOSDiFEXOlIdgWRI_jaHU,17
4139
+ openfisca_france-172.1.2.dist-info/RECORD,,