Stay in sync with your
Alexander Frenzel�alexander.frenzel@wolt.com��June 9th, 2021
This is Alex
Content & Personalisation
Enjoys climbing & bouldering
Alexander Frenzel
Python Developer��alexander.frenzel@wolt.com
🧗
“A command-line utility that creates projects from cookiecutters (project templates), �e.g. creating a Python package project from a Python package project template.”
https://github.com/cookiecutter/cookiecutter
Active community
Let’s see it in action.
Backup slide
How does it work?
How does it work?
How does it work?
How does it work?
How does it work?
Template Language - jinja2
https://jinja.palletsprojects.com/en/3.0.x/
How does it work?
How does it work?
cookiecutter.json
https://cookiecutter.readthedocs.io/
What’s next?
How do I update my projects?
🤬
https://github.com/cruft/cruft
Cruft
https://github.com/cruft/cruft
Cruft
https://github.com/cruft/cruft
Sounds great. How do i use it?
Backup slide
Let’s update our template
Backup slide
...and our project.
Backup slide
Backup slide
Amazing
Where does the magic happen?
Where does the magic happen?
.cruft.json
.cruft.json
.cruft.json
What happens on a conflict?
Backup slide
Backup slide
Backup slide
Backup slide
Backup slide
That was easy!
Cruft
https://github.com/cruft/cruft
Bonus
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
Let’s automate it
Powered by GitHub actions :)
.github/workflow/update.yml
“ready to merge” PRs
Questions?
Links
Cookiecutter template used in this presentation
My opinionated cookiecutter templates with auto update
Cookiecutter
Cruft
Thank you
Templates maintained by the cookiecutter team
https://cookiecutter.readthedocs.io/en/1.7.2/README.html#cookiecutter-specials
Template Language - jinja2
and much more...
https://jinja.palletsprojects.com/en/3.0.x/