-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from openfisca/cnrps
Cnrps
- Loading branch information
Showing
71 changed files
with
3,053 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
name: Validate, integrate & deploy to tax-benefit.org | ||
|
||
on: | ||
- push | ||
- workflow_dispatch | ||
|
||
jobs: | ||
validate_yaml: | ||
uses: tax-benefit/actions/.github/workflows/[email protected] | ||
with: | ||
parameters_path: "openfisca_tunisia_pension/parameters" | ||
secrets: | ||
token: ${{ secrets.CONTROL_CENTER_TOKEN }} | ||
|
||
# deploy_parameters: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - uses: actions/checkout@v4 | ||
# - name: Clone Legislation Parameters Explorer | ||
# run: git clone https://git.leximpact.dev/leximpact/legislation-parameters-explorer.git | ||
# - name: Install Node.js version LTS | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 'lts/*' | ||
# - name: Install viewer dependencies | ||
# run: npm install | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
# - name: Configure viewer | ||
# run: | | ||
# rm -f .env | ||
# cat > .env << EOF | ||
# # Customizations to apply to the site (theme, URLs…) | ||
# CUSTOMIZATION="openfisca" | ||
|
||
# DBNOMICS_DATASET_CODE="openfisca_tunisia_pension" | ||
# DBNOMICS_PROVIDER_CODE="OpenFisca" | ||
# DBNOMICS_URL="https://db.nomics.world/" | ||
|
||
# EDITOR_URL="https://editor.parameters.tn.tax-benefit.org/" | ||
|
||
# EXPORT_CSV=true | ||
# EXPORT_JSON=false | ||
# EXPORT_XLSX=true | ||
|
||
# # Path of directory containing legislation parameters of country | ||
# PARAMETERS_DIR="../../../openfisca_tunisia_pension/parameters/" | ||
|
||
# # Description of parameters remote repository | ||
# PARAMETERS_AUTHOR_EMAIL="[email protected]" | ||
# PARAMETERS_AUTHOR_NAME="Éditeur des paramètres d'OpenFisca-Tunisia-Pension" | ||
# PARAMETERS_BRANCH="main" | ||
# PARAMETERS_FORGE_DOMAIN_NAME="github.com" | ||
# PARAMETERS_FORGE_TYPE="GitHub" | ||
# PARAMETERS_GROUP="openfisca" | ||
# PARAMETERS_PROJECT="openfisca-tunisia-pension" | ||
# PARAMETERS_PROJECT_DIR="openfisca_tunisia_pension/parameters" | ||
|
||
# SHOW_LAST_BREADCRUMB_ITEM = false | ||
|
||
# TABLE_OF_CONTENTS_DIR="../../../openfisca_tunisia_pension/tables/" | ||
|
||
# TITLE="OpenFisca-Tunisia-Pension - الجباية المفتوحة تونس" | ||
|
||
# # Path of file containing units used by French legislation parameters | ||
# UNITS_FILE_PATH="../../../openfisca_tunisia_pension/units.yaml" | ||
# EOF | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
# - name: Initialize .svelte-kit directory of viewer | ||
# run: npx svelte-kit sync | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
# - name: Generate data of viewer | ||
# run: npx tsx src/scripts/generate_data.ts | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
# - name: Build viewer | ||
# run: npm run build | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
# - name: Configure ssh for deployment to server | ||
# uses: tanmancan/[email protected] | ||
# with: | ||
# ssh-auth-sock: /tmp/my_auth.sock | ||
# ssh-private-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_PRIVATE_KEY }} | ||
# ssh-public-key: ${{ secrets.PARAMETERS_EXPLORER_SSH_KNOWN_HOSTS }} | ||
# - name: Deploy to Server using rsync | ||
# run: rsync -az --delete -e "ssh -J [email protected]:2222" build/ [email protected]:public_html/ | ||
# working-directory: legislation-parameters-explorer/packages/viewer | ||
|
||
# deploy_simulator: | ||
# uses: tax-benefit/actions/.github/workflows/[email protected] | ||
# with: | ||
# python_package: "openfisca_tunisia_pension" | ||
# secrets: | ||
# token: ${{ secrets.CONTROL_CENTER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Validate YAML | ||
|
||
on: | ||
push: | ||
workflow_dispatch: | ||
pull_request: | ||
types: [opened, reopened] | ||
|
||
jobs: | ||
validate_yaml: | ||
uses: tax-benefit/actions/.github/workflows/validate_yaml.yml@v1 | ||
with: | ||
parameters_path: "openfisca_tunisia_pension/parameters" | ||
secrets: | ||
token: ${{ secrets.CONTROL_CENTER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,38 @@ | ||
from openfisca_tunisia_pension.tunisia_pension_taxbenefitsystem import TunisiaPensionTaxBenefitSystem | ||
'''OpenFisca Tunisia Pension tax-benefit system.''' | ||
|
||
|
||
import logging | ||
import os | ||
|
||
from openfisca_core.taxbenefitsystems import TaxBenefitSystem | ||
|
||
from openfisca_tunisia_pension import entities | ||
from openfisca_tunisia_pension.scripts_ast import script_ast | ||
|
||
|
||
COUNTRY_DIR = os.path.dirname(os.path.abspath(__file__)) | ||
|
||
logging.getLogger('numba.core.ssa').disabled = True | ||
logging.getLogger('numba.core.byteflow').disabled = True | ||
logging.getLogger('numba.core.interpreter').disabled = True | ||
|
||
# Convert regimes classes to OpenFisca variables. | ||
script_ast.main(verbose = False) | ||
|
||
|
||
class TunisiaPensionTaxBenefitSystem(TaxBenefitSystem): | ||
'''Tunisian pensions tax benefit system''' | ||
CURRENCY = 'DT' | ||
|
||
def __init__(self): | ||
super(TunisiaPensionTaxBenefitSystem, self).__init__(entities.entities) | ||
|
||
# We add to our tax and benefit system all the variables | ||
self.add_variables_from_directory(os.path.join(COUNTRY_DIR, 'variables')) | ||
|
||
# We add to our tax and benefit system all the legislation parameters defined in the parameters files | ||
parameters_path = os.path.join(COUNTRY_DIR, 'parameters') | ||
self.load_parameters(parameters_path) | ||
|
||
|
||
CountryTaxBenefitSystem = TunisiaPensionTaxBenefitSystem |
10 changes: 10 additions & 0 deletions
10
openfisca_tunisia_pension/parameters/marche_travail/indemnite_complementaire_provisoire.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
description: Indemnité Complémentaire Provisoire (ICP) - montant par mois | ||
values: | ||
1981-04-07: | ||
value: 10 | ||
metadata: | ||
unit: currency | ||
reference: | ||
1981-04-07: | ||
title: Décret n° 81-437 du 7 avril 1981 | ||
documentation: Le smic est composé du salaire de base et de cette indemnité complémentaire provisoire et de sa majoration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
description: Paramètres généraux | ||
description: Salaires minimum |
9 changes: 9 additions & 0 deletions
9
openfisca_tunisia_pension/parameters/marche_travail/majoration_smig_40h_mensuel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Majoration du salaire minimum interprofessionnel garanti (Smig) au régime de 40h dans les secteurs non agricoles - montant par mois | ||
values: | ||
1982-03-16: | ||
value: 20 | ||
metadata: | ||
unit: currency | ||
reference: | ||
1982-03-16: | ||
title: Décret n° 82-501 du 16 mars 1982 |
9 changes: 9 additions & 0 deletions
9
openfisca_tunisia_pension/parameters/marche_travail/majoration_smig_48h_mensuel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
description: Majoration du Salaire minimum interprofessionnel garanti (Smig) au régime de 48h dans les secteurs non agricoles - montant par mois | ||
values: | ||
1982-03-16: | ||
value: 20.368 | ||
metadata: | ||
unit: currency | ||
reference: | ||
1982-03-16: | ||
title: Décret n° 82-501 du 16 mars 1982 |
29 changes: 29 additions & 0 deletions
29
openfisca_tunisia_pension/parameters/marche_travail/salaire_de_base_40h_horaire.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
description: salaire de base horaire - régime 40h par semaine | ||
values: | ||
2008-07-01: | ||
value: 1.084 | ||
2009-08-01: | ||
value: 1.126 | ||
2010-07-01: | ||
value: 1.183 | ||
2011-05-01: | ||
value: 1.248 | ||
2012-07-01: | ||
value: 1.324 | ||
2014-05-01: | ||
value: 1.411 | ||
metadata: | ||
unit: currency | ||
reference: | ||
2008-07-01: | ||
title: Décret n°2008-2072 du 02 Juin 2008 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2008/2008F/046/TF200820723.pdf | ||
2009-08-01: | ||
title: Décret n°2009-2257 du 14 Juillet 2009 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2009/2009F/062/TF200922573.pdf | ||
2010-07-01: | ||
title: Décret n°2010-1746 du 17 Juillet 2010 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2010/2010F/058/TF201017463.pdf | ||
2011-05-01: | ||
title: Décret n°2011-679 du 09 Juin 2011 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2011/2011F/042/TF20116793.pdf | ||
2012-07-01: | ||
title: Décret n°2012-1981 du 20 Septembre 2012 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2012/2012F/077/TF201219813.pdf | ||
2014-05-01: | ||
title: Décret n°2014-2907 du 11 Août 2014 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2014/2014F/066/Tf201429073.pdf |
29 changes: 29 additions & 0 deletions
29
openfisca_tunisia_pension/parameters/marche_travail/salaire_de_base_40h_mensuel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
description: salaire de base mensuel - régime 40h par semaine | ||
values: | ||
2008-07-01: | ||
value: 187.88 | ||
2009-08-01: | ||
value: 195.16 | ||
2010-07-01: | ||
value: 205.04 | ||
2011-05-01: | ||
value: 216.306 | ||
2012-07-01: | ||
value: 229.479 | ||
2014-05-01: | ||
value: 244.559 | ||
metadata: | ||
unit: currency | ||
reference: | ||
2008-07-01: | ||
title: Décret n°2008-2072 du 02 Juin 2008 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2008/2008F/046/TF200820723.pdf | ||
2009-08-01: | ||
title: Décret n°2009-2257 du 14 Juillet 2009 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2009/2009F/062/TF200922573.pdf | ||
2010-07-01: | ||
title: Décret n°2010-1746 du 17 Juillet 2010 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2010/2010F/058/TF201017463.pdf | ||
2011-05-01: | ||
title: Décret n°2011-679 du 09 Juin 2011 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2011/2011F/042/TF20116793.pdf | ||
2012-07-01: | ||
title: Décret n°2012-1981 du 20 Septembre 2012 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2012/2012F/077/TF201219813.pdf | ||
2014-05-01: | ||
title: Décret n°2014-2907 du 11 Août 2014 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2014/2014F/066/Tf201429073.pdf |
29 changes: 29 additions & 0 deletions
29
openfisca_tunisia_pension/parameters/marche_travail/salaire_de_base_48h_horaire.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
description: salaire de base horaire - régime 48h par semaine | ||
values: | ||
2008-07-01: | ||
value: 1.065 | ||
2009-08-01: | ||
value: 1.107 | ||
2010-07-01: | ||
value: 1.164 | ||
2011-05-01: | ||
value: 1.229 | ||
2012-07-01: | ||
value: 1.305 | ||
2014-05-01: | ||
value: 1.392 | ||
metadata: | ||
unit: currency | ||
reference: | ||
2008-07-01: | ||
title: Décret n°2008-2072 du 02 Juin 2008 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2008/2008F/046/TF200820723.pdf | ||
2009-08-01: | ||
title: Décret n°2009-2257 du 14 Juillet 2009 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2009/2009F/062/TF200922573.pdf | ||
2010-07-01: | ||
title: Décret n°2010-1746 du 17 Juillet 2010 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2010/2010F/058/TF201017463.pdf | ||
2011-05-01: | ||
title: Décret n°2011-679 du 09 Juin 2011 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2011/2011F/042/TF20116793.pdf | ||
2012-07-01: | ||
title: Décret n°2012-1981 du 20 Septembre 2012 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2012/2012F/077/TF201219813.pdf | ||
2014-05-01: | ||
title: Décret n°2014-2907 du 11 Août 2014 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2014/2014F/066/Tf201429073.pdf |
29 changes: 29 additions & 0 deletions
29
openfisca_tunisia_pension/parameters/marche_travail/salaire_de_base_48h_mensuel.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
description: salaire de base mensuel - régime 48h par semaine | ||
values: | ||
2008-07-01: | ||
value: 221.52 | ||
2009-08-01: | ||
value: 230.256 | ||
2010-07-01: | ||
value: 242.112 | ||
2011-05-01: | ||
value: 255.632 | ||
2012-07-01: | ||
value: 271.44 | ||
2014-05-01: | ||
value: 289.536 | ||
metadata: | ||
unit: currency | ||
reference: | ||
2008-07-01: | ||
title: Décret n°2008-2072 du 02 Juin 2008 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2008/2008F/046/TF200820723.pdf | ||
2009-08-01: | ||
title: Décret n°2009-2257 du 14 Juillet 2009 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2009/2009F/062/TF200922573.pdf | ||
2010-07-01: | ||
title: Décret n°2010-1746 du 17 Juillet 2010 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2010/2010F/058/TF201017463.pdf | ||
2011-05-01: | ||
title: Décret n°2011-679 du 09 Juin 2011 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2011/2011F/042/TF20116793.pdf | ||
2012-07-01: | ||
title: Décret n°2012-1981 du 20 Septembre 2012 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2012/2012F/077/TF201219813.pdf | ||
2014-05-01: | ||
title: Décret n°2014-2907 du 11 Août 2014 - http://www.legislation.tn/sites/default/files/fraction-journal-officiel/2014/2014F/066/Tf201429073.pdf |
7 changes: 0 additions & 7 deletions
7
openfisca_tunisia_pension/parameters/marche_travail/smag.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.