Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFisca-France-Reforms
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leximpact
Simulateur socio-fiscal
Adaptations OpenFisca
OpenFisca-France-Reforms
Merge requests
!55
Crée réforme 2026 pour toujours avoir un PLF en préprod
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Crée réforme 2026 pour toujours avoir un PLF en préprod
ajout-reforme-plf-pour-test-preprod
into
master
Overview
0
Commits
4
Pipelines
3
Changes
10
Merged
Dorine Lambinet
requested to merge
ajout-reforme-plf-pour-test-preprod
into
master
4 months ago
Overview
0
Commits
4
Pipelines
3
Changes
10
0
0
Merge request reports
Compare
master
version 2
77ed1e2c
4 months ago
version 1
55e06c7e
4 months ago
master (base)
and
latest version
latest version
2e35710a
4 commits,
4 months ago
version 2
77ed1e2c
2 commits,
4 months ago
version 1
55e06c7e
1 commit,
4 months ago
10 files
+
157
−
371
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
10
openfisca_france_reforms/contrefactuel_plf/__init__.py
+
114
−
117
View file @ 2e35710a
Edit in single-file editor
Open in Web IDE
Show full file
@@ -45,142 +45,139 @@ def modify_parameters(parameters):
# param_ir.calcul_revenus_imposables.rpns.micro.microentreprise.regime_micro_ba.plafond_recettes,
# param_ir.calcul_revenus_imposables.rpns.micro.microentreprise.regime_micro_bnc.services/plafond,
]
#
for noeud in liste_param_impot:
#
inflate_parameters(
#
noeud,
#
inflator=inflateurs_parameters(year_contrefactuel).inflateur_impot,
#
base_year=year_contrefactuel - 2,
#
last_year=year_contrefactuel - 1,
#
start_instant=f"{year_contrefactuel - 1}-01-01",
#
round_ndigits=0,
#
)
#
add_metadata(noeud, {"inflator": "inflateurs/inflateur_impot"})
for
noeud
in
liste_param_impot
:
inflate_parameters
(
noeud
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_impot
,
base_year
=
year_contrefactuel
-
2
,
last_year
=
year_contrefactuel
-
1
,
start_instant
=
f
"
{
year_contrefactuel
-
1
}
-01-01
"
,
round_ndigits
=
0
,
)
add_metadata
(
noeud
,
{
"
inflator
"
:
"
inflateurs/inflateur_impot
"
})
## CSG
### On commente de manière temporaire pour gérer le budget début 2025
# inflate_parameters(
# parameters.prelevements_sociaux.contributions_sociales.csg.remplacement.seuils,
# inflator=inflateurs_parameters(year_contrefactuel).inflateur_csg,
# base_year=year_contrefactuel - 1,
# last_year=year_contrefactuel,
# start_instant=f"{year_contrefactuel}-01-01",
# round_ndigits=0,
# )
# add_metadata(
# parameters.prelevements_sociaux.contributions_sociales.csg.remplacement.seuils,
# {"inflator": "inflateurs/inflateur_csg"},
# )
inflate_parameters
(
parameters
.
prelevements_sociaux
.
contributions_sociales
.
csg
.
remplacement
.
seuils
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_csg
,
base_year
=
year_contrefactuel
-
1
,
last_year
=
year_contrefactuel
,
start_instant
=
f
"
{
year_contrefactuel
}
-01-01
"
,
round_ndigits
=
0
,
)
add_metadata
(
parameters
.
prelevements_sociaux
.
contributions_sociales
.
csg
.
remplacement
.
seuils
,
{
"
inflator
"
:
"
inflateurs/inflateur_csg
"
},
)
## PSS (utilisé pour le calcul des cotisations sociales)
### On commente de manière temporaire pour gérer le budget début 2025
# inflate_parameters(
# parameters.prelevements_sociaux.pss,
# inflator=inflateurs_parameters(year_contrefactuel).inflateur_pss,
# base_year=year_contrefactuel - 1,
# last_year=year_contrefactuel,
# start_instant=f"{year_contrefactuel}-01-01",
# round_ndigits=0,
# )
# add_metadata(
# parameters.prelevements_sociaux.pss, {"inflator": "inflateurs/inflateur_pss"}
# )
inflate_parameters
(
parameters
.
prelevements_sociaux
.
pss
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_pss
,
base_year
=
year_contrefactuel
-
1
,
last_year
=
year_contrefactuel
,
start_instant
=
f
"
{
year_contrefactuel
}
-01-01
"
,
round_ndigits
=
0
,
)
add_metadata
(
parameters
.
prelevements_sociaux
.
pss
,
{
"
inflator
"
:
"
inflateurs/inflateur_pss
"
}
)
## Aides au logement :
#
param_apl = parameters.prestations_sociales.aides_logement.allocations_logement
#
### aides au logement paramètres loyers
#
list_param_al_loyer = [
#
param_apl.locatif.formule.l_plafonds_loyers.par_zone,
#
param_apl.locatif.formule.pp_particip_perso.r0_abattement.cas_general,
#
param_apl.locatif.formule.c_forfait_charges,
#
param_apl.foyer.al.formule.c_forfait_charges,
#
param_apl.accession.formule.c_forfait_charges,
#
param_apl.foyer.al.formule.l_plafonds_loyers,
#
param_apl.foyer.apl.formule.e_equiv_loyers_eligible,
#
param_apl.locatif.formule.pp_particip_perso.p0_particip_min.p0_forfait
#
]
#
for param in list_param_al_loyer:
#
inflate_parameters(
#
param,
#
inflator=inflateurs_parameters(
#
year_contrefactuel - 1
#
).inflateur_aides_logement_loyer,
#
base_year=year_contrefactuel - 2,
#
last_year=year_contrefactuel - 1,
#
start_instant=f"{year_contrefactuel - 1}-10-01",
#
round_ndigits=0,
#
ignore_missing_units=True,
#
)
#
add_metadata(
#
param, {"inflator": "inflateurs/inflateur_aides_logement_loyer"}
#
)
param_apl
=
parameters
.
prestations_sociales
.
aides_logement
.
allocations_logement
### aides au logement paramètres loyers
list_param_al_loyer
=
[
param_apl
.
locatif
.
formule
.
l_plafonds_loyers
.
par_zone
,
param_apl
.
locatif
.
formule
.
pp_particip_perso
.
r0_abattement
.
cas_general
,
param_apl
.
locatif
.
formule
.
c_forfait_charges
,
param_apl
.
foyer
.
al
.
formule
.
c_forfait_charges
,
param_apl
.
accession
.
formule
.
c_forfait_charges
,
param_apl
.
foyer
.
al
.
formule
.
l_plafonds_loyers
,
param_apl
.
foyer
.
apl
.
formule
.
e_equiv_loyers_eligible
,
param_apl
.
locatif
.
formule
.
pp_particip_perso
.
p0_particip_min
.
p0_forfait
]
for
param
in
list_param_al_loyer
:
inflate_parameters
(
param
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
-
1
).
inflateur_aides_logement_loyer
,
base_year
=
year_contrefactuel
-
2
,
last_year
=
year_contrefactuel
-
1
,
start_instant
=
f
"
{
year_contrefactuel
-
1
}
-10-01
"
,
round_ndigits
=
0
,
ignore_missing_units
=
True
,
)
add_metadata
(
param
,
{
"
inflator
"
:
"
inflateurs/inflateur_aides_logement_loyer
"
}
)
## TODO : rajouter une option pour l'inflation en octobre N-1 tant que décret pour octobre n'est pas sorti
### parametres de ressources
#
inflate_parameters(
#
param_apl.al_param_r0.r0,
#
inflator=inflateurs_parameters(
#
year_contrefactuel
#
).inflateur_aides_logement_depenses,
#
base_year=year_contrefactuel - 1,
#
last_year=year_contrefactuel,
#
start_instant=f"{year_contrefactuel}-01-01",
#
round_ndigits=0,
#
)
#
add_metadata(
#
param_apl.al_param_r0.r0,
#
{"inflator": "inflateurs/inflateur_aides_logement_depenses"},
#
)
inflate_parameters
(
param_apl
.
al_param_r0
.
r0
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_aides_logement_depenses
,
base_year
=
year_contrefactuel
-
1
,
last_year
=
year_contrefactuel
,
start_instant
=
f
"
{
year_contrefactuel
}
-01-01
"
,
round_ndigits
=
0
,
)
add_metadata
(
param_apl
.
al_param_r0
.
r0
,
{
"
inflator
"
:
"
inflateurs/inflateur_aides_logement_depenses
"
},
)
### attention il y a un sous dossier mayotte qui ne rentre peut être pas dans ce qui devrait être revalorisé. Mais pour l'instant on n'a pas le détail Mayotte
#
param_apl_etudiant = parameters.prestations_sociales.aides_logement.allocations_logement
#
### forfait étudiant
#
list_param_forfait_etudiant = [
#
param_apl_etudiant.ressources.dar_4,
#
param_apl_etudiant.ressources.dar_5,
#
param_apl_etudiant.ressources.dar_11,
#
param_apl_etudiant.ressources.dar_12,
#
]
#
for param in list_param_forfait_etudiant:
#
inflate_parameters(
#
param,
#
inflator=inflateurs_parameters(
#
year_contrefactuel
#
).inflateur_aides_logement_forfait_etudiant,
#
base_year=year_contrefactuel - 1,
#
last_year=year_contrefactuel,
#
start_instant=f"{year_contrefactuel}-01-01",
#
round_ndigits=0,
#
)
#
add_metadata(
#
param,
#
{"inflator": "inflateurs/inflateur_aides_logement_forfait_etudiant"},
#
)
param_apl_etudiant
=
parameters
.
prestations_sociales
.
aides_logement
.
allocations_logement
### forfait étudiant
list_param_forfait_etudiant
=
[
param_apl_etudiant
.
ressources
.
dar_4
,
param_apl_etudiant
.
ressources
.
dar_5
,
param_apl_etudiant
.
ressources
.
dar_11
,
param_apl_etudiant
.
ressources
.
dar_12
,
]
for
param
in
list_param_forfait_etudiant
:
inflate_parameters
(
param
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_aides_logement_forfait_etudiant
,
base_year
=
year_contrefactuel
-
1
,
last_year
=
year_contrefactuel
,
start_instant
=
f
"
{
year_contrefactuel
}
-01-01
"
,
round_ndigits
=
0
,
)
add_metadata
(
param
,
{
"
inflator
"
:
"
inflateurs/inflateur_aides_logement_forfait_etudiant
"
},
)
## Prestations sociales revalorisees en janvier
param_prestations
=
parameters
.
prestations_sociales
### On commente de manière temporaire pour gérer le budget début 2025
# list_param_prestats_janvier = [
# param_prestations.solidarite_insertion.minimum_vieillesse.aspa.plafond_ressources,
# param_prestations.solidarite_insertion.minimum_vieillesse.aspa.montant_maximum_annuel,
# ]
# for param in list_param_prestats_janvier:
# inflate_parameters(
# param,
# inflator=inflateurs_parameters(
# year_contrefactuel
# ).inflateur_prestations_janvier,
# base_year=year_contrefactuel - 1,
# last_year=year_contrefactuel,
# start_instant=f"{year_contrefactuel}-01-01",
# round_ndigits=2,
# )
# add_metadata(param, {"inflator": "inflateurs/inflateur_prestations_janvier"})
list_param_prestats_janvier
=
[
param_prestations
.
solidarite_insertion
.
minimum_vieillesse
.
aspa
.
plafond_ressources
,
param_prestations
.
solidarite_insertion
.
minimum_vieillesse
.
aspa
.
montant_maximum_annuel
,
]
for
param
in
list_param_prestats_janvier
:
inflate_parameters
(
param
,
inflator
=
inflateurs_parameters
(
year_contrefactuel
).
inflateur_prestations_janvier
,
base_year
=
year_contrefactuel
-
1
,
last_year
=
year_contrefactuel
,
start_instant
=
f
"
{
year_contrefactuel
}
-01-01
"
,
round_ndigits
=
2
,
)
add_metadata
(
param
,
{
"
inflator
"
:
"
inflateurs/inflateur_prestations_janvier
"
})
list_param_prestats_avril
=
[
param_prestations
.
solidarite_insertion
.
minima_sociaux
.
rsa
.
rsa_m
.
montant_de_base_du_rsa
,
Loading