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

Consolider l'import des barèmes IPP #746

Merged
merged 8 commits into from
May 31, 2017
Merged

Consolider l'import des barèmes IPP #746

merged 8 commits into from
May 31, 2017

Conversation

cbenz
Copy link
Member

@cbenz cbenz commented May 15, 2017

Connected to #740
Connected to #741

  • Amélioration technique : internalise et réunit les fichiers relatifs aux barèmes IPP
  • Détails :
    • Ajoute un script qui exécute le processus d'import dans son ensemble.
      • Laisse le contributeur commiter les changements manuellement.
    • Désormais le seul lieu de contribution pour les paramètres est openfisca_france/parameters.
      • Disparition de param.xml.

Ces changements :

  • Modifient des éléments non fonctionnels de ce dépôt

@cbenz cbenz requested a review from fpagnoux May 17, 2017 09:02
@cbenz cbenz requested review from michelbl and fpagnoux and removed request for fpagnoux May 22, 2017 14:42
Copy link

@michelbl michelbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il y a quelque modifications dans transform_ipp_tree que je ne comprends pas bien. Est-ce que ce sont les adaptations nécessaires pour corriger les changements de nommage des barèmes IPP depuis le dernier merge ?
Sinon, pourrais-tu documenter, ou au strict minimum mentionner l'existence, des différents warnings/erreurs qui peuvent survenir lors des différentes phases du script?

ars['taux_primaire'] = taux_primaire = ars_m.pop('enfants_entre_6_et_11_ans_en_de_la_bmaf_1')
ars['taux_college'] = taux_college = ars_m.pop('enfants_entre_11_et_15_ans_en_de_la_bmaf_2')
ars['taux_lycee'] = taux_lycee = ars_m.pop('enfants_de_plus_de_15_ans_en_de_la_bmaf_3')
ars['taux_primaire'] = taux_primaire = ars_m.pop('enfants_entre_6_et_10_ans_en_de_la_bmaf_1')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Est-ce que cette modification provient d'un warning ?

@@ -246,7 +236,7 @@ def transform_ipp_tree(root):
ecodev['taux_plafond'] = taux_plafond = ecodev.pop('plafond_en_du_revenu_net_global')

# reduction impot emprunt
reductions_impots['intemp'] = intemp = impot_revenu.pop('habitat_princ')
reductions_impots['intemp'] = intemp = impot_revenu.pop('habitat_princ_reduc')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

Copy link
Member Author

@cbenz cbenz May 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Les lignes de ce fichier ont été modifiées pour suivre les changements des fichiers XLSX.

J'ai expliqué ceci dans mon dernier commit.

@@ -269,8 +259,11 @@ def transform_ipp_tree(root):

# investissement foret
reductions_impots['invfor'] = invfor = impot_revenu.pop('foret')
reductions_impots['invfor'].update(invfor.pop('reduction_d_impot_pour_investissements_forestiers'))
invfor['seuil'] = invfor.pop('plafond_des_depenses_d_investissement_forestier')
depenses_d_investissement_forestier = invfor.pop('depenses_d_investissement_forestier')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

prestations_familiales['paje'].update(prestations.pop('paje_clca'))
prestations_familiales['paje'].update(prestations.pop('paje_prepare'))
prestations_familiales['paje'].update(prestations.pop('plaf_cmg'))
paje.update(prestations.pop('paje_cm'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

'biactifs_et_parents_isoles_1')
avant_2014['taux_majoration_2_premiers_enf'] = taux_majoration_2_premiers_enf = paje.pop('1er_et_2eme_enfant')
avant_2014['taux_majoration_3eme_enf_et_plus'] = taux_majoration_3eme_enf_et_plus = paje.pop('3eme_enfant_et_plus')
avant_2014['plafond_ressources_0_enf'] = paje_plaf \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idem

@benjello
Copy link
Member

Des noms IPP ont été changés ...
On va tenter de durcir le process !

@cbenz cbenz requested a review from michelbl May 23, 2017 08:59
Copy link
Member

@fpagnoux fpagnoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script doesn't work on Mac.

CHANGELOG.md Outdated
@@ -1,5 +1,14 @@
# Changelog

### 18.3.0 - [#746](https://github.com/openfisca/openfisca-france/pull/746)

* Amélioration technique : internalise et réunit les fichiers relatifs aux barèmes IPP
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

La première ligne du changelog ne donne que le type du changement, pas les détails. "internalise...IPP" devrait se situer dans les détails.


## Conversion XLSX vers XML

OpenFisca définit ses paramètres dans un format XML décrit [ici](https://doc.openfisca.fr/legislation-parameters/index.html).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This URL will change once openfisca/openfisca-doc#72 is merged.

Should be https://doc.openfisca.fr/coding-the-legislation/legislation_parameters.html I think.

Se placer dans le répertoire racine d'OpenFisca-France, là où se trouve le fichier `setup.py` :

```sh
./openfisca_france/scripts/parameters/baremes_ipp/convert_ipp_xlsx_to_openfisca_xml.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not work on my mac:

ERROR:convert_ipp_xlsx_to_openfisca_xml:Command "ssconvert" must be installed. It is provided by the "gnumeric" spreadsheet. Under a Debian GNU/Linux distribution, type `sudo apt install gnumeric`.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it with brew install gnumeric. Still fails, but further:

INFO:convert_ipp_xlsx_to_openfisca_xml:Temporary directory is ‘/var/folders/pw/p8wkr7ys2zl9m6mcltyh22c00000gn/T/baremes-ipp-QlRO8g’.
INFO:convert_ipp_xlsx_to_openfisca_xml:ZIP file downloaded and saved as u’/var/folders/pw/p8wkr7ys2zl9m6mcltyh22c00000gn/T/baremes-ipp-QlRO8g/xlsx_files.zip’.
INFO:convert_ipp_xlsx_to_openfisca_xml:ZIP file extracted to ‘/var/folders/pw/p8wkr7ys2zl9m6mcltyh22c00000gn/T/baremes-ipp-QlRO8g/ipp-tax-and-benefit-tables-xlsx-master-2c6936d6326eca306df2f87a1a0eb7c6c58586a0’.
INFO:convert_ipp_xlsx_to_openfisca_xml:Converting XLSX files to XLS...
(ssconvert:24579): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
** (ssconvert:24579): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24579): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
(ssconvert:24580): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24580): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24581): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24582): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24583): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
Unexpected element ‘ignoredErrors’ in state : 
    worksheet
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24583): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24584): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
** (ssconvert:24584): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24584): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24584): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24584): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24584): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24588): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
Unexpected element ‘dataConsolidate’ in state : 
    worksheet
Unexpected element ‘dataConsolidate’ in state : 
    worksheet
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24588): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24589): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24590): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
(ssconvert:24593): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback ‘C’ locale.
Unexpected element ‘a:off’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> xfrm
Unexpected element ‘a:ext’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> xfrm
Unexpected element ‘a:avLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:gdLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:ahLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:cxnLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:rect’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:pathLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> custGeom
Unexpected element ‘a:srgbClr’ in state : 
    theme -> objectDefaults -> spDef -> spPr -> solidFill
Unexpected element ‘a:ln’ in state : 
    theme -> objectDefaults -> spDef -> spPr
Unexpected element ‘a:effectLst’ in state : 
    theme -> objectDefaults -> spDef -> spPr
Unexpected element ‘a:xfrm’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
Unexpected element ‘a:custGeom’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
Unexpected element ‘a:solidFill’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
Unexpected element ‘a:ln’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
Unexpected element ‘a:effectLst’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
Unexpected element ‘a:extLst’ in state : 
    theme -> objectDefaults -> lnDef -> spPr
** (ssconvert:24593): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
** (ssconvert:24593): CRITICAL **: excel_write_string: assertion ‘txt != NULL’ failed
W Une partie des donn’ees sera perdue `a l’enregistrement. Ce format ne prend en charge que 256 colonnes, et ce classeur en comporte 16383
INFO:convert_ipp_xlsx_to_openfisca_xml:XLS files written to ‘/var/folders/pw/p8wkr7ys2zl9m6mcltyh22c00000gn/T/baremes-ipp-QlRO8g/xls’.
INFO:convert_ipp_xlsx_to_openfisca_xml:Converting XLS files to YAML raw...
INFO:xls_to_yaml_raw:Parsing file baremes-ipp-autonomie-autonomy.xls
Traceback (most recent call last):
  File “./openfisca_france/scripts/parameters/baremes_ipp/convert_ipp_xlsx_to_openfisca_xml.py”, line 127, in <module>
    sys.exit(main())
  File “./openfisca_france/scripts/parameters/baremes_ipp/convert_ipp_xlsx_to_openfisca_xml.py”, line 107, in main
    xls_to_yaml_raw.transform(xls_dir_path, yaml_raw_dir_path)
  File “/Users/fpagnoux/dev/openfisca/openfisca-france/openfisca_france/scripts/parameters/baremes_ipp/xls_to_yaml_raw.py”, line 249, in transform
    book = xlrd.open_workbook(filename = xls_path_encoded, formatting_info = True)
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/__init__.py”, line 441, in open_workbook
    ragged_rows=ragged_rows,
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/book.py”, line 119, in open_workbook_xls
    bk.get_sheets()
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/book.py”, line 678, in get_sheets
    self.get_sheet(sheetno)
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/book.py”, line 669, in get_sheet
    sh.read(self)
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/sheet.py”, line 1077, in read
    self.handle_hlink(data)
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/sheet.py”, line 1788, in handle_hlink
    h.textmark, offset = get_nul_terminated_unicode(data, offset)
  File “/Users/fpagnoux/.virtualenvs/ipp/lib/python2.7/site-packages/xlrd/sheet.py”, line 1713, in get_nul_terminated_unicode
    nb = unpack(‘<L’, buf[ofs:ofs+4])[0] * 2
struct.error: unpack requires a string argument of length 4

# -*- coding: utf-8 -*-


# OpenFisca -- A versatile microsimulation software
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this license here.


Le script [`convert_ipp_xlsx_to_openfisca_xml.py`](./convert_ipp_xlsx_to_openfisca_xml.py) prend en charge la conversion de XLSX vers XML.

Ce script nécessite le paquet [`xlrd`](https://pypi.python.org/pypi/xlrd). Pour l'installer :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il nécéssite aussi ssconvert. Cette information devrait figurer dans la doc.

# -*- coding: utf-8 -*-


# OpenFisca -- A versatile microsimulation software
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This license is not needed here.

# -*- coding: utf-8 -*-


# OpenFisca -- A versatile microsimulation software
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This license is not needed here.


if not cmd_exists('ssconvert'):
log.error(u'Command "ssconvert" must be installed. It is provided by the "gnumeric" spreadsheet. '
u'Under a Debian GNU/Linux distribution, type `sudo apt install gnumeric`.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Under OSX: brew install gnumeric

@fpagnoux
Copy link
Member

Si je comprends bien, le script ne fonctionne que sous linux, et pas sous MAC OSX, et on n'aura pas le temps de l'adapter dans cette itération.

Si c'est bien le cas, il faudrait à minima prévoir quelque chose sur le serveur pour pouvoir faire le boulot.

@cbenz
Copy link
Member Author

cbenz commented May 31, 2017

En effet, le script fait appel à ssconvert (fourni par le logiciel Gnumeric) afin de convertir les fichiers XLSX en XLS, puis utilise le paquet Python xlrd pour extraire les données du XLS.

Nous n'avons pas encore compris pourquoi (versions différentes ?) mais sous macOS les fichiers XLS écrits par ssconvert ne sont pas lisibles par xlrd. En revanche les fichiers écrits depuis Debian puis copiés sous macOS sont bien lisibles par xlrd.

Quoi qu'il en soit une piste alternative consisterait à utiliser openpyxl pour extraire les données directement depuis les fichiers XLSX, sans passer par ssconvert.
Cette piste nécessite d'adapter le script xls_to_yaml_raw.py pour utiliser l'API d'openpyxl, et après tentative j'en conclus que ce ne sera pas possible rapidement d'ici jeudi.

@cbenz cbenz requested a review from fpagnoux May 31, 2017 10:49
./openfisca_france/scripts/parameters/baremes_ipp/convert_ipp_xlsx_to_openfisca_xml.py
```

Le script génère un nouveau répertoire temporaire à chaque exécution dont une partie du nom est aléatoire. Il l'affiche en début de script, et ne l'efface pas à la fin. Le script termine en affichant cette ligne, indiquant le nom du répertoire temporaire. Par exemple (la partie `v3SAEz` peut changer) :

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ca me semble redondant et du coup peu clair.
"Le script génère un nouveau répertoire dans /tmp à chaque exécution, dont une partie du nom est aléatoire. Ce répertoire n'est pas effacé par le script. Par exemple : "


### Étape manuelle de transformation

Il existe une étape manuelle de transformation définie dans le fichier [`transform_ipp_tree.py`](./transform_ipp_tree.py) au niveau de la fonction portant le même nom. Cette fonction reçoit en entrée la racine de l'arbre des paramètres construit depuis les fichiers YAML clean de l'IPP, et modifie cet arbre pour correspondre aux noms d'OpenFisca.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ce n'est pas une étape manuelle puisqu'elle est exécutée par un script.


Il existe une étape manuelle de transformation définie dans le fichier [`transform_ipp_tree.py`](./transform_ipp_tree.py) au niveau de la fonction portant le même nom. Cette fonction reçoit en entrée la racine de l'arbre des paramètres construit depuis les fichiers YAML clean de l'IPP, et modifie cet arbre pour correspondre aux noms d'OpenFisca.

Lorsque les fichiers XLSX de l'IPP sont modifiés, il se peut que leur structure change. Dans ce cas la fonction `transform_ipp_tree` doit être adaptée en conséquence.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il n'y a pas un script qui permet de rechercher la variable qui a changé ?

@cbenz cbenz requested a review from michelbl May 31, 2017 17:54
Copy link

@michelbl michelbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ca marche chez moi (ubuntu)

@fpagnoux
Copy link
Member

Ne marche pas sur mon mac, mais avançons si c'est ok pour @michelbl.

@fpagnoux fpagnoux dismissed their stale review May 31, 2017 19:26

¯_(ツ)_/¯

@cbenz cbenz merged commit f8ea496 into master May 31, 2017
@cbenz cbenz deleted the baremes-ipp branch May 31, 2017 19:26
@MattiSG
Copy link
Member

MattiSG commented May 31, 2017

Avez-vous au moins documenté la contrainte de plateforme ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants