openfisca / openfisca-core

OpenFisca core engine. See other repositories for countries-specific code & data.
https://openfisca.org
GNU Affero General Public License v3.0
168 stars 75 forks source link

Add script and methods to save YAML parameter tree on disk #1023

Open benjello opened 3 years ago

benjello commented 3 years ago

Thanks for contributing to OpenFisca! Remove this line, as well as any other in the following that don't fit your contribution :)

New features

benjello commented 3 years ago

@Sasha-Laniece @sandcha @eraviart : here is @cbenz script to unfold an normalize parameters. It would be nice to be able to use it for the convergence openfisca-france <-> barèmes IPP but it may be useful for larger purposes. But please review it to see if it is sufficient or can be improved.

It would be nice to have a complementary tool to fold parameters at a fixed directory depth/path length too.

This was used for exemple in https://github.com/openfisca/openfisca-france/pull/1414.

MattiSG commented 3 years ago

Thanks @benjello @cbenz for sharing this script which, if I understand correctly, generates a dump of all parameters in their full name in a YAML file!

In order to better assess how this could be useful to the wider community, could you please:

  1. Confirm what this does (I also see mentions of maximum name length, so maybe it does more than just dumping a YAML list?).
  2. Clarify what are the use cases (how does it help in converging two separate sets of parameters?).
  3. Provide an example output of this script (if possible on the Country Template, so that we have a clear and concise reference).

Thank you! 🙂