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

Tests inversion salaires #222

Open
wants to merge 46 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
780657f
Add a test case creator
benjello Mar 28, 2023
4421108
Fix traitement brut erfs fpr
benjello Mar 29, 2023
54d5054
Ajoute les variables du revenu du capital
benjello Mar 31, 2023
54b5e98
Ajout variable apl
benjello Mar 31, 2023
7ef0d43
Add check-version-and-changelog
benoit-cty Mar 28, 2023
badfad8
Add script for GitLab CI
benoit-cty Mar 28, 2023
fb08269
Change path
Mar 31, 2023
190ee17
Clean CI
Mar 31, 2023
3562728
Add Windows specificities to short install manual
pzuldp Mar 29, 2023
76d9ee5
commence tests inversion
Feb 2, 2023
3866594
continue test inversion
Feb 3, 2023
8c04c87
add init.py
Feb 16, 2023
2aa6241
corrects parameter paths in formula + 2 typo
Feb 16, 2023
4a42a50
creates a yaml structure for test data
Feb 16, 2023
50bdb7f
first pass at an inversion test
Feb 16, 2023
88a40ac
ajout de tests d'inversion simples
Feb 16, 2023
6c5f850
ajustement de la tolérance de test
Feb 16, 2023
ad27774
correction d'une erreur dans l'inversion
Feb 16, 2023
a50756d
adapte la marge d'erreur
Feb 16, 2023
b079d43
ajout de tests "retraite"
Feb 16, 2023
2467846
change path specification
Feb 16, 2023
fca9549
ajoute l'inversion de l'abattement de 1,75% pour frais pro
Feb 17, 2023
93889bb
enlève paquets inutiles
Feb 17, 2023
e2a2d7e
ajuste les tests pour matcher OFF
Feb 17, 2023
de84707
renomme et déplace
Feb 19, 2023
550a957
first test inversion salaires
Feb 21, 2023
fb4c8cb
corrige typo
Mar 24, 2023
2068222
commence tests inversion
Feb 2, 2023
c3d5586
continue test inversion
Feb 3, 2023
b4a49cb
first pass at an inversion test
Feb 16, 2023
af0cba1
ajout de tests d'inversion simples
Feb 16, 2023
dc70e3a
ajustement de la tolérance de test
Feb 16, 2023
b2acc37
adapte la marge d'erreur
Feb 16, 2023
23baf67
ajout de tests "retraite"
Feb 16, 2023
4f6c98a
change path specification
Feb 16, 2023
867e576
enlève paquets inutiles
Feb 17, 2023
ea0c425
ajuste les tests pour matcher OFF
Feb 17, 2023
88791b0
renomme et déplace
Feb 19, 2023
e3ea4f6
first test inversion salaires
Feb 21, 2023
9a26a4a
tests sur salaires 2018 (et 2021)
May 9, 2023
2ba9f1e
complète les tests
May 23, 2023
e034de6
minor corrections to tests file
May 23, 2023
670e5ca
typos
May 23, 2023
065985d
fix typos
May 24, 2023
eb69e14
correction tests
May 24, 2023
be0cb81
correction test tps partiel
May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
continue test inversion
Institut-des-politiques-publiques authored and paul committed May 24, 2023
commit 386659432d5b1b8528663a01af310517625aa3b0
36 changes: 36 additions & 0 deletions openfisca_france_data/reforms/inversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import numpy as np

from openfisca_france.model.base import * # noqa analysis:ignore
from openfisca_core.reforms import Reform
from openfisca_core.taxscales import MarginalRateTaxScale, combine_tax_scales
from openfisca_france_data.felin.input_data_builder.create_variables_individuelles import create_taux_csg_remplacement
from openfisca_france import FranceTaxBenefitSystem
from openfisca_france.scenarios import init_single_entity

import logging

log = logging.getLogger(__name__)

def inversion_chomage():

tax_benefit_system = FranceTaxBenefitSystem()
scenario = tax_benefit_system.new_scenario()
init_single_entity(
scenario,
period='2021', # wide: we simulate for the year
parent1=dict(
chomage_imposable={'2021-01': 1000},
rfr={'2021': 11407}, # Seuil 11408 / npbtr = 1
nbptr={'2021': 1},
allocation_retour_emploi_journaliere='prive_non_cadre'},
allegement_fillon_mode_recouvrement='progressif'
)
)
simulation = scenario.new_simulation()
create_taux_csg_remplacement(scenario.individus, scenario.period, scenario.tax_benefit_system)
assert simulation.calculate('chomage_brut', '2021-01') == 1000
assert simulation.calculate('csg_deductible_chomage', '2021-01') == 0
assert simulation.calculate('csg_imposable_chomage', '2021-01') == 0
assert simulation.calculate('crds_chomage', '2021-01') == 1

inversion_chomage()
34 changes: 0 additions & 34 deletions tests/inversion.yaml

This file was deleted.