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

Cas type #179

Draft
wants to merge 224 commits into
base: nomics-master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
fe63bd3
ajout cas type
kendrickherz May 4, 2022
92ce8e7
YearlyVariable to Variable
kendrickherz May 5, 2022
250e143
prix_carburant_ttc_to_ht + change in ticpe_cas_type
kendrickherz May 16, 2022
5030d5b
small change
kendrickherz May 20, 2022
909ebd6
reorganisation
kendrickherz Jun 14, 2022
144aa70
essence_sp95_e10
kendrickherz Jun 14, 2022
bee38a8
ajout des variables litres carburants
kendrickherz Jun 14, 2022
888717e
ajout variable dans cout carburant ttc
kendrickherz Jun 14, 2022
42ba258
ajout variables tva carburants
kendrickherz Jun 14, 2022
1999c2e
ajout variables dans cout carburant ht
kendrickherz Jun 14, 2022
b44f93e
ajout variable cout total ht
kendrickherz Jun 14, 2022
de0f2d5
add precision to formula (date)
kendrickherz Jun 14, 2022
442f5d5
ajout variables cout total ttc
kendrickherz Jun 14, 2022
9f8a9ef
ajout variables montant tva
kendrickherz Jun 14, 2022
1172c51
ajout variables nombre litre
kendrickherz Jun 14, 2022
8b70751
Upgrade packages.
eraviart Jun 14, 2022
9f17b43
Upgrade statsmodels
eraviart Jun 15, 2022
1b29382
Temporarily remove statsmodels dependency.
eraviart Jun 15, 2022
601ecdd
Temporarily remove xlrd dependency.
eraviart Jun 15, 2022
011b95b
Upgrade python-slugify dependency.
eraviart Jun 15, 2022
fb3103f
Temporarily remove python-slugify dependency.
eraviart Jun 15, 2022
09e7bea
Temporarily remove OpenFisca-Survey-Manager dependency.
eraviart Jun 15, 2022
881cb0f
Temporarily remove Babel dependency.
eraviart Jun 15, 2022
de79e70
Re-add OpenFisca-Survey-Manager dependency.
eraviart Jun 15, 2022
f9503db
Remove OpenFisca-Survey-Manager dependency and re-add python-slugify.
eraviart Jun 15, 2022
b84e10a
ajout d'une fonction globale pour lire le CSV en dictionnaire
kendrickherz Jun 15, 2022
4c9347d
Migrate dependencies related to surveys generation to a new extras_re…
eraviart Jun 15, 2022
6f881b7
ajout de la dimension region au prix
kendrickherz Jun 15, 2022
f714ec9
Merge branch 'cas-type' of github.com:openfisca/openfisca-france-indi…
kendrickherz Jun 15, 2022
3ef6517
Temporarily comment out preprocessing because it uses Pandas.
eraviart Jun 15, 2022
1e24794
Merge all extra_requires into dev.
eraviart Jun 15, 2022
5b58b8b
Add GitHub workflow.
eraviart Jun 16, 2022
70d9fd7
Add pandas dependency, because it is needed by some OpenFisca variables.
eraviart Jun 17, 2022
0dd461d
Reactivate preprocess_legislation, now that pandas is available.
eraviart Jun 17, 2022
57d18d0
Remove null reference.
eraviart Jun 17, 2022
5fa7e5c
Rename date_parution_jo to official_journal_date.
eraviart Jun 17, 2022
1aaac11
Use ISO format for dates.
eraviart Jun 17, 2022
1aaa78c
Fix 'order' fields in parameters.
eraviart Jun 17, 2022
de4273f
Use a string for unit.
eraviart Jun 17, 2022
1c85b39
Add script to normalize string quotes.
eraviart Jun 17, 2022
1aaeb75
Use single quotes for strings.
eraviart Jun 17, 2022
93e3c9d
change in cout carburant ttc ht
kendrickherz Jun 17, 2022
91b7ae1
Merge branch 'cas-type' of github.com:openfisca/openfisca-france-indi…
kendrickherz Jun 17, 2022
e186022
clarification des paramètres en fonction de la loi
kendrickherz Jun 20, 2022
2374ce1
petite correction
kendrickherz Jun 20, 2022
51b9fc0
petite correction
kendrickherz Jun 20, 2022
d62872a
modification paramètres
kendrickherz Jun 22, 2022
e135cf8
tests
kendrickherz Jun 22, 2022
de21f64
region to code_region et tests
kendrickherz Jun 22, 2022
508eef4
changement meta
kendrickherz Jun 23, 2022
52688ac
changement metadata
kendrickherz Jun 23, 2022
f0ed082
Fix indentation.
eraviart Jun 23, 2022
080049d
Remove units that change at different dates.
eraviart Jun 23, 2022
ba3430c
corrections
kendrickherz Jun 24, 2022
7bbe351
Merge branch 'cas-type' of github.com:openfisca/openfisca-france-indi…
kendrickherz Jun 24, 2022
038e58a
corrections
kendrickherz Jun 24, 2022
e3288cc
add tests
kendrickherz Jun 24, 2022
7fbc887
Comment variable depenses_tva_exonere: invalid formula.
eraviart Jun 24, 2022
69567d9
Fix variable name from depenses_gaz_ajustees_taxe_carbone to depenses…
eraviart Jun 24, 2022
03affe7
reverse
kendrickherz Jun 24, 2022
a9af7be
changement pour aller dans le sens de la loi
kendrickherz Jun 27, 2022
d34ad6e
changement pour aller dans le sens de la loi
kendrickherz Jun 27, 2022
18661e2
essence_essence
kendrickherz Jun 28, 2022
62ec6ed
add entree variables
kendrickherz Jun 28, 2022
2033c0a
changes import
kendrickherz Jun 28, 2022
45c6ad7
add all test on carburants
kendrickherz Jun 30, 2022
f223d53
modifications styles
kendrickherz Jul 4, 2022
e29e780
changes style
kendrickherz Jul 4, 2022
8052291
changes style
kendrickherz Jul 4, 2022
a9d73bb
ajout références législatives et explications
kendrickherz Jul 4, 2022
6647d7b
modifications style yaml
kendrickherz Jul 5, 2022
6c53c42
changes style yaml
kendrickherz Jul 5, 2022
eeb782f
changes style yaml
kendrickherz Jul 5, 2022
36c5297
explication changement 2022
kendrickherz Jul 11, 2022
68426ff
Prefill cache of prix carburants.
eraviart Jul 13, 2022
6859d4e
Rename Leximpact files.
eraviart Jul 13, 2022
0e56e06
Use package relative file paths to access CSV files.
eraviart Jul 13, 2022
4260ea2
réctification problème division par 0 + test
kendrickherz Jul 13, 2022
2157af8
don't fail when depenses_carburants is missing
kendrickherz Jul 19, 2022
25fb7d1
debut integration données
kendrickherz Jul 19, 2022
63b57ba
modification CI
kendrickherz Jul 19, 2022
bc7e073
renforcement variables
kendrickherz Jul 21, 2022
960b799
prise en compte des prix nationaux
kendrickherz Jul 25, 2022
630cd7c
ajout niveau national dans les parametres
kendrickherz Jul 25, 2022
f60cd56
correction test
kendrickherz Jul 25, 2022
56244a5
correction formule TVA
kendrickherz Jul 25, 2022
867c03a
correction preprocessing
kendrickherz Jul 25, 2022
a946838
match data
kendrickherz Jul 26, 2022
900f73b
ajout prix carburant apres 2017
kendrickherz Jul 26, 2022
1bc6462
patch run_all and add price after 2017 to prepro
kendrickherz Jul 26, 2022
266333b
change variable to take national price
kendrickherz Jul 26, 2022
632fa79
ajout des prix region et france jusqu'à 2022
kendrickherz Jul 28, 2022
ac5a0e1
ajout variables TICPE/TVA
kendrickherz Aug 1, 2022
d93343d
changement libélé et nom variable
kendrickherz Aug 1, 2022
5b990d0
changement noms fichiers, noms variables
kendrickherz Aug 1, 2022
abf1246
changement noms variable cout to depense
kendrickherz Aug 1, 2022
6b742e8
mise à jour paramètre TICPE 2022
kendrickherz Aug 2, 2022
f9ece63
ajout explications suite à changement majeur régle
kendrickherz Aug 2, 2022
9f7c75c
fin mise à jour 2022
kendrickherz Aug 2, 2022
586110c
cout to depense
kendrickherz Aug 4, 2022
bea2b92
useful variables for reformes
kendrickherz Aug 6, 2022
a7dd1a7
add parameters carburants
kendrickherz Aug 8, 2022
963b9d5
correction
kendrickherz Aug 8, 2022
e031d50
correction
kendrickherz Aug 8, 2022
713a12b
correction
kendrickherz Aug 8, 2022
a326908
test
kendrickherz Aug 8, 2022
13d908c
ajout paramètres (CSV et preprecessing)
kendrickherz Aug 9, 2022
ece9324
branchement données
kendrickherz Aug 9, 2022
d18ff88
amelioration preprocessing
kendrickherz Aug 10, 2022
c4cff68
amelioration preprocessing
kendrickherz Aug 10, 2022
9273f9a
corection final preprocessing
kendrickherz Aug 10, 2022
dc75985
ajout aide exeptionelle carburant
kendrickherz Aug 11, 2022
e085f9d
prise en compte conversion pour le gpl
kendrickherz Aug 11, 2022
f3515fe
Fix class of parameters.
eraviart Aug 11, 2022
5b51032
Add missing parameter ids.
eraviart Aug 11, 2022
ca4df07
Uncomment class depenses_carburants.
eraviart Aug 11, 2022
5a169fd
Rename parameter conso_moyen_vp to conso_vp_moyenne.
eraviart Aug 22, 2022
c0a57f2
Rename parameter parcours_moyen_vp to taille_parcours_moyen.
eraviart Aug 22, 2022
85bc6bf
add last variables
kendrickherz Sep 15, 2022
32a0c03
Merge branch 'cas-type' of github.com:openfisca/openfisca-france-indi…
kendrickherz Sep 15, 2022
54e9ef2
correction
kendrickherz Sep 15, 2022
d585979
Typo
eraviart Sep 22, 2022
deda2ae
Typos
eraviart Sep 22, 2022
aa0eaca
Typos.
eraviart Sep 27, 2022
aa8dbe8
Change les labels de l'affectation régionale, ajoute référence
DorineLam Oct 3, 2022
f4a8295
Ajoute les unités en euros pour tous les montants
DorineLam Oct 3, 2022
7c0b880
Renomme les paramètres et ajoute l'unité
DorineLam Oct 3, 2022
64d40b7
Corrige l'orthographe des noms de régions
DorineLam Oct 3, 2022
af1142d
Met a jour label de l'affectation gazole
DorineLam Oct 3, 2022
58a1c18
Ajoute label aux majorations
DorineLam Oct 3, 2022
128c679
Ajoute unité
DorineLam Oct 3, 2022
2e37f65
Ajoute Unit et label pour le taux de conversion
DorineLam Oct 3, 2022
f52aba1
Réfaction corse libellé
DorineLam Oct 3, 2022
24fd9da
Labels majorations
DorineLam Oct 3, 2022
06cbaf0
Reformate références affectation qui n'apparaissent pas
DorineLam Oct 6, 2022
cd7ecec
Change label affectation
DorineLam Oct 6, 2022
23ba55b
Modifie label refraction et majoration
DorineLam Oct 6, 2022
c2ac7d9
Fix typo
DorineLam Oct 6, 2022
c9d47aa
Nouvelles dates références
DorineLam Oct 6, 2022
da20b81
Unifie les 'currency'
eraviart Nov 17, 2022
9643f45
Now depends of OpenFisca-Core >=38.0.1,<39.0
eraviart Dec 19, 2022
39c4917
Renommage du champ description_en
eraviart Feb 15, 2023
6591c38
Remove constaints on versions of packages. Upgrade Python
eraviart Mar 22, 2023
76b9cd8
Fix flake8 errors
eraviart Mar 22, 2023
192ea0c
Add version numbers to dependencies
eraviart Mar 23, 2023
5f4d48f
Upgrade openfisca packages
eraviart Jun 10, 2023
72752b0
Remove deprecated pkg_resources
benjello Jul 21, 2023
37c368b
Typo
eraviart Jul 21, 2023
d1cb60d
Fix circular ref
benjello Jul 21, 2023
e8e5972
Accept Core with version >= 40.1
eraviart Jul 22, 2023
e3f19a9
Move openfisca_france_indirect_taxation_location to its own module
eraviart Jul 24, 2023
52ad333
Try to fix location
eraviart Jul 24, 2023
cb436ae
Try to use module.__file__ instead of importlib.metadata to obtain pa…
eraviart Jul 24, 2023
5cec124
Revert "Try to use module.__file__ instead of importlib.metadata to o…
eraviart Jul 24, 2023
b6f1db1
Revert "Try to fix location"
eraviart Jul 24, 2023
8d2b945
Use find_namespace_packages instead of find_packages to not loose dat…
eraviart Jul 24, 2023
ea09c14
Fix import
eraviart Jul 24, 2023
d49f8af
Try OpenFisca-Survey-Manager 1.1.5rc0
eraviart Jul 25, 2023
e380a60
Fix location
eraviart Aug 2, 2023
1bd235b
Use OpenFisca-Survey-Manager >= 1.1.5
eraviart Aug 2, 2023
7c00f22
Require numexpr 2.8.4, because 2.8.5 raises forbidden control charact…
eraviart Aug 7, 2023
809f49b
Typo
eraviart Aug 7, 2023
f7ce973
Update prix_litre_annuel_carburants
Sep 26, 2023
542d623
prix carburants par regions hectolitre
benoit-cty Sep 29, 2023
5080062
Mise à jour des prix
benoit-cty Oct 6, 2023
1c86478
Update dep and data
benjello Sep 28, 2023
51ab11b
For tests
benjello Sep 28, 2023
2beeeae
More refactofing to cope with new pandas version and ticpe
benjello Oct 2, 2023
df1a2f0
Improve CI
benjello Oct 2, 2023
8c4c4b5
Update dockerfile to change python version
benjello Oct 2, 2023
b58c60d
WIP
benjello Oct 9, 2023
a33db24
Fix ci tags
benjello Oct 26, 2023
da58ccd
Fix data paths
benjello Oct 26, 2023
75eefdd
Change paths
benjello Oct 26, 2023
36e487b
Set path
benjello Oct 26, 2023
758f412
Fix paths again
benjello Oct 26, 2023
bddcfeb
Add bacj enquete_transports
benjello Oct 27, 2023
170db36
Fix temporary store path
benjello Oct 28, 2023
e72f85e
Fix CI
benjello Oct 28, 2023
dd378b6
fIX
benjello Oct 28, 2023
8499ed0
Fix
benjello Oct 28, 2023
1a72661
Fix again
benjello Oct 28, 2023
38e76e8
Fix
benjello Oct 28, 2023
5b4d74d
Test specific survey-manager branch
benjello Oct 30, 2023
5a6a07f
Bump survey-manager dep
benjello Oct 30, 2023
5de18c2
Remove config path from build_survey_dara
benjello Oct 31, 2023
2ab4bf9
Migration vers la CI LexImpact
benoit-cty Nov 8, 2023
1e550e4
Add 2023 test
benoit-cty Nov 9, 2023
8614238
Add test for 2023
benoit-cty Nov 9, 2023
284a62c
Expand parameters accise_energie_metropole
Jun 21, 2024
5f37ced
Maj parametres
Jun 21, 2024
d018f1b
Fix lint
Jun 21, 2024
43bed6a
Fix review
benoit-cty Jun 28, 2024
c351190
Add date on link ref
benoit-cty Jun 28, 2024
8bb60be
Merge pull request #183 from openfisca/expand_accise_energie_metropole
benoit-cty Jun 28, 2024
110b135
Fix indent
benoit-cty Jul 1, 2024
bd96334
Merge pull request #184 from openfisca/fix-indent
benoit-cty Jul 1, 2024
02d342e
Last_review Gazole
benoit-cty Jul 2, 2024
34e43e9
Aide Exceptionnelle Carburants
benoit-cty Jul 2, 2024
79e4aaf
last_value_still_valid_on essence
benoit-cty Jul 2, 2024
454fb50
Fin des aides exceptionelles carburants
benoit-cty Jul 4, 2024
6d5f136
Test avec accises 2022
benoit-cty Jul 4, 2024
41551cf
Add unique test
benoit-cty Jul 4, 2024
6ea18b4
wip
benoit-cty Jul 4, 2024
3d08a7c
Disable many tests
benoit-cty Jul 4, 2024
8a40d30
wip
benoit-cty Jul 4, 2024
2c2ffa9
lint
benoit-cty Jul 4, 2024
9ff4a44
Fin de l'aide exceptionnelle
benoit-cty Jul 4, 2024
4379dd9
Fix formulas
benoit-cty Jul 4, 2024
92c7811
Merge pull request #185 from openfisca/fix_tests
benoit-cty Jul 4, 2024
44ea522
prix_annuel_carburants.csv
benoit-cty Jul 4, 2024
c9e0710
Maj données
benoit-cty Jul 5, 2024
3f5b128
Fix tests
benoit-cty Jul 5, 2024
76f700c
Put back all tests
benoit-cty Jul 5, 2024
0b57c38
Fix lint
benoit-cty Jul 5, 2024
6a78ac0
Add github workflow
benoit-cty Jul 5, 2024
7f89e67
Add test
benoit-cty Jul 5, 2024
5956e87
Merge pull request #186 from openfisca/fix_tests
benoit-cty Jul 5, 2024
a000638
Split fichier
benoit-cty Jul 8, 2024
6f07228
Ajout last_value_still_valid_on
benoit-cty Jul 8, 2024
caced33
Add test in CI for TVA
benoit-cty Jul 8, 2024
9f9aa78
Move files to keep formulas workinig
benoit-cty Jul 8, 2024
ee97540
Fix test name
benoit-cty Jul 8, 2024
4b7f87a
Découpage des fichiers de Tva
benoit-cty Jul 8, 2024
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
19 changes: 19 additions & 0 deletions .github/workflows/tax-benefit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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_france_indirect_taxation/parameters"
secrets:
token: ${{ secrets.CONTROL_CENTER_TOKEN }}
deploy:
uses: tax-benefit/actions/.github/workflows/[email protected]
with:
python_package: "openfisca_france_indirect_taxation"
secrets:
token: ${{ secrets.CONTROL_CENTER_TOKEN }}
85 changes: 85 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: OpenFisca France Indirect Taxation

on:
push:
pull_request:
types: [opened, reopened]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-20.04"]
python-version: ["3.10.6"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}
restore-keys: | # in case of a cache miss (systematically unless the same commit is built repeatedly), the keys below will be used to restore dependencies from previous builds, and the cache will be stored at the end of the job, making up-to-date dependencies available for all jobs of the workflow; see more at https://docs.github.com/en/actions/advanced-guides/caching-dependencies-to-speed-up-workflows#example-using-the-cache-action
build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ matrix.os }}
build-${{ env.pythonLocation }}-${{ matrix.os }}
- name: Build package
run: make build
- name: Cache release
id: restore-release
uses: actions/cache@v3
with:
path: dist
key: release-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-${{ matrix.os }}

lint-files:
runs-on: ubuntu-20.04
needs: [ build ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.6
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04
- name: check-syntax-errors
run: make check-syntax-errors
- name: format-style
run: make format-style
- name: check-style
run: make check-style

tests:
runs-on: ubuntu-20.04
needs: [ build ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all the tags
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.10.6
- name: Cache build
id: restore-build
uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: build-${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ github.sha }}-ubuntu-20.04
- name: Test carburants
run: openfisca test --country-package openfisca_france_indirect_taxation openfisca_france_indirect_taxation/tests/formulas/*carbu*
- name: Test TVA
run: openfisca test --country-package openfisca_france_indirect_taxation openfisca_france_indirect_taxation/tests/formulas/*carbu*
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@

openfisca_france_indirect_taxation/assets/matching/matching_entd/data_matched_final.csv
openfisca_france_indirect_taxation/assets/matching/matching_entd/data_matched_rank.csv
openfisca_france_indirect_taxation/assets/matching/matching_entd/data_matching_bdf.csv
openfisca_france_indirect_taxation/assets/matching/matching_entd/data_matching_entd.csv
openfisca_france_indirect_taxation/assets/matching/matching_erfs/data_matched_rank.csv

openfisca_france_indirect_taxation/examples/notebooks/.ipynb_checkpoints/*.ipynb
openfisca_france_indirect_taxation/assets/matching/*.csv
openfisca_france_indirect_taxation/assets/quaids/*.csv
openfisca_france_indirect_taxation/assets/matching/*/*.csv
openfisca_france_indirect_taxation/assets/matching/*.csv
openfisca_france_indirect_taxation/assets/legislation/nomenclature_coicop_by*.csv
!openfisca_france_indirect_taxation/assets/quaids/data_elasticities_no_alime_all.csv
Expand Down Expand Up @@ -44,6 +40,7 @@ sdist/
var/
*.egg-info/
.installed.cfg
.venv/
*.egg

# PyInstaller
Expand Down Expand Up @@ -78,3 +75,4 @@ docs/_build/
target/

openfisca_france_indirect_taxation/elasticite_depense.csv
openfisca_france_indirect_taxation/assets/matching/matching_enl/data_matching_bdf.csv
53 changes: 36 additions & 17 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,49 +33,68 @@ Build survey collections:
stage: build_collections
image: $CI_REGISTRY_IMAGE:latest
tags:
- ipp
- data-in
before_script:
- mkdir -p ~/.config/openfisca-survey-manager
- cp ./runner/openfisca_survey_manager_raw_data.ini ~/.config/openfisca-survey-manager/raw_data.ini
- cp ./runner/openfisca_survey_manager_config.ini ~/.config/openfisca-survey-manager/config.ini
- mkdir -p /root/ci-files/data_collections
- pip3 install -e .[dev,survey]
- pip3 install -e .[dev]
- cat ~/.config/openfisca-survey-manager/raw_data.ini
script:
- build-collection -c budget_des_familles -d -m -s 2005 2011 2017
- build-collection -c aliss -m -d
- build-collection -c enquete_logement -d -m -s 2013
- build-collection -c enquete_transports -d -m -s 2008
- build-collection -c erfs_fpr -d -m -s 2013
- cp ~/.config/openfisca-survey-manager/config.ini /home/ipp/data/openfisca-france-indirect-taxation/openfisca_survey_manager_config.ini
- cat ~/.config/openfisca-survey-manager/raw_data.ini
- build-collection -c budget_des_familles -d -m -s 2017 -p ~/.config/openfisca-survey-manager
- build-collection -c budget_des_familles -d -s 2011 -p ~/.config/openfisca-survey-manager
- build-collection -c budget_des_familles -d -s 2005 -p ~/.config/openfisca-survey-manager
# - build-collection -c aliss -m -d
- build-collection -c enquete_logement -d -m -s 2013 -p ~/.config/openfisca-survey-manager
- build-collection -c enquete_transports -d -m -s 2008 -p ~/.config/openfisca-survey-manager
- build-collection -c erfs_fpr -d -m -s 2013 -p ~/.config/openfisca-survey-manager
- cp ~/.config/openfisca-survey-manager/config.ini /mnt/data-out/openfisca-france-indirect-taxation/openfisca_survey_manager_config.ini
when: manual

Build matched data:
stage: build_matched_data
image: $CI_REGISTRY_IMAGE:latest
tags:
- ipp
- data-in
before_script:
- mkdir -p ~/.config/openfisca-survey-manager
- pip3 install -e .[dev,survey]
- pip3 install -e .[dev]
- cp ./runner/openfisca_survey_manager_raw_data.ini ~/.config/openfisca-survey-manager/raw_data.ini
- cp /home/ipp/data/openfisca-france-indirect-taxation/openfisca_survey_manager_config.ini ~/.config/openfisca-survey-manager/config.ini
- cp /mnt/data-out/openfisca-france-indirect-taxation/openfisca_survey_manager_config.ini ~/.config/openfisca-survey-manager/config.ini
- mkdir -p /root/ci-files/data_collections
script:
- build-survey-data -v
- cp ~/.config/openfisca-survey-manager/config.ini /home/ipp/data/openfisca-france-indirect-taxation/openfisca_survey_manager_config_with_matched_data.ini
- build-survey-data -v -p ~/.config/openfisca-survey-manager
- cp ~/.config/openfisca-survey-manager/config.ini /mnt/data-out/openfisca-france-indirect-taxation/openfisca_survey_manager_config_with_matched_data.ini

when: manual

Test:
Test_YAML_Carburants:
stage: test
image: $CI_REGISTRY_IMAGE:latest
tags:
- ipp
- data-in
before_script:
- mkdir -p ~/.config/openfisca-survey-manager
- pip3 install -e .[dev,survey]
- pip3 install -e .[dev]
- cp ./runner/openfisca_survey_manager_raw_data.ini ~/.config/openfisca-survey-manager/raw_data.ini
- cp /home/ipp/data/openfisca-france-indirect-taxation/openfisca_survey_manager_config_with_matched_data.ini ~/.config/openfisca-survey-manager/config.ini
- cp /mnt/data-out/openfisca-france-indirect-taxation/openfisca_survey_manager_config_with_matched_data.ini ~/.config/openfisca-survey-manager/config.ini
- mkdir -p /root/ci-files/data_collections
script:
- openfisca test --country-package openfisca_france_indirect_taxation openfisca_france_indirect_taxation/tests/formulas/*carbu*


Test_All:
stage: test
image: $CI_REGISTRY_IMAGE:latest
tags:
- data-in
before_script:
- mkdir -p ~/.config/openfisca-survey-manager
- pip3 install -e .[dev]
- cp ./runner/openfisca_survey_manager_raw_data.ini ~/.config/openfisca-survey-manager/raw_data.ini
- cp /mnt/data-out/openfisca-france-indirect-taxation/openfisca_survey_manager_config_with_matched_data.ini ~/.config/openfisca-survey-manager/config.ini
- mkdir -p /root/ci-files/data_collections
script:
- make test
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-buster
FROM python:3.9-buster

LABEL maintainer="[email protected]"

Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ check-style:
test: clean check-syntax-errors check-style
@# Launch tests from openfisca_france_indirect_taxation/tests directory (and not .) because TaxBenefitSystem must be initialized
@# before parsing source files containing formulas.
pytest
openfisca test --country-package openfisca_france_indirect_taxation openfisca_france_indirect_taxation/tests


Expand Down
Binary file added docs/calcul_taxation_carburants.ods
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def test():
# weights are the share of the household in total consumption
data_quaids['part_depenses_tot'] = data_quaids['depenses_tot'] / data_quaids['depenses_tot'].sum()
data_quaids.fillna(0, inplace=True)
assert 0.999 < sum(data_quaids['part_depenses_tot']) < 1.001, "the sum of the shares is not equal to 1"
assert 0.999 < sum(data_quaids['part_depenses_tot']) < 1.001, 'the sum of the shares is not equal to 1'

for i in range(1, 5):
data_quaids['el_{}'.format(i)] = \
Expand Down Expand Up @@ -112,7 +112,7 @@ def test():
sum(data_quaids['el_uncomp_{}'.format(i)])


if __name__ == "__main__":
if __name__ == '__main__':
year = 2011
create_data_elasticities()
df = get_elasticities(year)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def get_elasticities_aidsills(data_year, non_positive):
return dataframe


if __name__ == "__main__":
if __name__ == '__main__':
year = 2011
create_data_elasticities_aidsills()
df = get_elasticities_aidsills(year, True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from openfisca_france_indirect_taxation.almost_ideal_demand_system.aids_price_index_builder import \
df_indice_prix_produit

""" Check if depenses_tot is equal to the sum of all expenses """
''' Check if depenses_tot is equal to the sum of all expenses '''

aggregates_data_frame['dep_tot'] = 0
for i in range(1, 13):
Expand All @@ -17,7 +17,7 @@
'Issue in depenses_tot calculation'


""" Check that the sum of the share for the four categories is 1 """
''' Check that the sum of the share for the four categories is 1 '''

data_frame_for_reg['sum_shares'] = 0
for i in range(1, 5):
Expand All @@ -26,14 +26,14 @@
del data_frame_for_reg['sum_shares']


""" Check that the prices do not take unlikely values """
''' Check that the prices do not take unlikely values '''
# This test is problematic, it does not achieves its goal
for i in range(1, 5):
assert (data_frame_for_reg['p{}'.format(i)] > 500).any(), 'Some prices seem too small'
assert (data_frame_for_reg['p{}'.format(i)] < 200).any(), 'Some prices seem too big'


""" Check period fixed effects sum to 1 """
''' Check period fixed effects sum to 1 '''

data_frame_for_reg['sum_vag'] = 0
for i in range(0, 30):
Expand All @@ -44,8 +44,8 @@
assert (data_frame_for_reg['sum_vag'] == 1).any(), 'Vag fixed effects do not sum to 1'


""" Check if the price index of all goods in aggregate_data_frame is filled in indice_prix_mensuel_98_15
If this was not the case, we would have issues in the calculation of the price index for some people """
''' Check if the price index of all goods in aggregate_data_frame is filled in indice_prix_mensuel_98_15
If this was not the case, we would have issues in the calculation of the price index for some people '''

df_bien = df_indice_prix_produit[['bien']]
df_bien = df_bien.drop_duplicates(subset = 'bien', take_last = True)
Expand All @@ -61,9 +61,9 @@
'The price indexes is not filled for some goods in df_indice_prix_produit (or before)'


""" Check if the goods that drop from the dataframe in the match with prices are meaningful goods or not. If the test
''' Check if the goods that drop from the dataframe in the match with prices are meaningful goods or not. If the test
fails, it means that some meaningful goods are not matched with any price. This test achieves the same goal as the
previous one but in a later stage of the dataframe construction """
previous one but in a later stage of the dataframe construction '''

check = df.drop_duplicates(subset = ['indice_prix_produit'], keep = 'last')
check = check['indice_prix_produit']
Expand All @@ -79,7 +79,7 @@
del common, short_name


""" Check if the shares of each poste in their broad category sum to 1 """
''' Check if the shares of each poste in their broad category sum to 1 '''

for i in range(0, 100):
df_ident_men_0 = df_depenses_prix[df_depenses_prix['ident_men'] == '{}'.format(i)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
data_frame_for_reg_2011.set_index('Unnamed: 0', inplace = True)


""" Check that the sum of the share for the four categories is 1 """
''' Check that the sum of the share for the four categories is 1 '''

data_frame_for_reg_2011['sum_shares'] = 0
for i in range(1, 4):
Expand All @@ -40,13 +40,13 @@
del data_frame_for_reg_2011['sum_shares']


""" Check that the prices do not take unlikely values """
''' Check that the prices do not take unlikely values '''
for i in range(1, 4):
assert max(data_frame_for_reg_2011['p{}'.format(i)]) < 400, 'Some prices seem too big'
assert min(data_frame_for_reg_2011['p{}'.format(i)]) > 10, 'Some prices seem too small'


""" Check period fixed effects sum to 1 """
''' Check period fixed effects sum to 1 '''

data_frame_for_reg_2011['sum_vag'] = 0
for i in range(0, 30):
Expand Down
4 changes: 2 additions & 2 deletions openfisca_france_indirect_taxation/assets/documentation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Prix du sp_e10 : en 2009 le sp_e10 est introduit sur le marché, et représente en moyenne près de 6% des consommations d’essence dès sa
première année. Toutefois, nos données de prix de l’e10 ne commencent qu’en 2013. Etant donné la proximité entre le prix de l’e10
et celui du sp95 classique en 2013 et 2014, nous appliquons pour l’e10 les prix du sp95 entre 2009 et 2012 inclus.
première année. Toutefois, nos données de prix de l'E10 ne commencent qu’en 2013. Etant donné la proximité entre le prix de l’e10
et celui du SP95 classique en 2013 et 2014, nous appliquons pour l'E10 les prix du SP95 entre 2009 et 2012 inclus.

Part des types de carburants : nos données ne commençant qu’en 2001, nous appliquons pour 2000 les mêmes parts qu’en 2001.
De même, les parts de 2011 sont élargies jusqu’en 2015.
Loading
Loading