openfisca / country-template

Start modelling the tax and benefit system of your country in a few minutes.
https://legislation.demo.openfisca.org
GNU Affero General Public License v3.0
31 stars 15 forks source link

Use `cookiecutter` for bootstrapping #109

Closed bonjourmauko closed 1 month ago

bonjourmauko commented 3 years ago

When I'm creating a new extension for my country model, I want it to be easy as tools that I already know like cookiecutter, si I can spend more time adding value to users.

MattiSG commented 3 years ago

I'm not sure what that would entail exactly: does this mean this repository would have to become a cookiecutter-based template, replacing its bootstrap.sh file with a cookiecutter declaration, and requiring users to install and execute cookiecutter?

bonjourmauko commented 3 years ago

Hello @MattiSG !

does this mean this repository would have to become a cookiecutter-based template, replacing its bootstrap.sh file with a cookiecutter declaration, and requiring users to install and execute cookiecutter?

Yes!

Bootstrapping a country/city would then be something like:

$ pip install cookiecutter
$ cookiecutter https://github.com/openfisca/country-template
organisation: segpres
country: chile

And then it would be iso functional —thanks to pre/post-hooks.

Pros
Cons
MattiSG commented 3 years ago

Another con: third-party dependency.

This sounds like an interesting venue to solve #82, but also like a big investment. I would not personally invest in it for the moment considering the production experience there is with the current system, and the limited practical existing problems this seems to solve.

bonjourmauko commented 3 years ago

I was going to invest personally on this until some other issues took priority.

I still believe it is worth doing, maybe there are other options closer to what we do now that are easier to implement.

verbman commented 5 months ago

Did not see this thread, but thanks for pointing it out @MattiSG. Pull Request #139 does not change this conversation and possibly better prepares the way for it. I note the offline conversation also about utilising github workflows? to achieve the same objectives (but for github only).

MattiSG commented 5 months ago

Indeed, the reference for using GitHub Actions is https://github.com/OpenTermsArchive/demo-declarations/pull/12.

bonjourmauko commented 1 month ago

Thanks both @MattiSG and @verbman. I'm closing this issue as, even if the problem is still there, it is bound to a how from which I have distanced myself. I a need for a solution arises in the future, I'd rather open a new ticket.