Copy Template¶
To use the TU Cookbook Python Template without issues, ensure you have the following software installed:
- Git v2 - A version control system (Download Git)
- Python 3 - The main Programming Language (Python.org)
- Copier - The Templateing Software (Copier Documentation)
- uv - A modern Python Package Manager (uv Documentation)
- just - A modern Taskrunner (just GitHub)
Prerequisets¶
Install Python via uv¶
Install uv with the following command:
Then install Python 3.12 for example using uv:
Install Copier¶
Run one of the following commands to install Copier as a CLI tool:
Creating Your Cookbook Repository¶
Command Line Instructions¶
To create a new cookbook repository from the TU Cookbooks template, run:
Template Prompts¶
When you run the copy command, the template will ask you several questions to configure your cookbook. These prompts will look similar to:
$ copier copy --trust "git+https://gitlab.tuwien.ac.at/cookbooks/templates/tu-cookbook-python" path/to/your/cookbook/
The cookbook's name:
my-cookbook
A short description of the cookbook:
A cookbook to...
The primary Author's full name:
John Doe
Choose an appropriate License:
- MIT
- Apache License 2.0
- Unlicense
The template will use your responses to configure the repository structure and initial content.
Next Steps¶
After creating your repository, you'll need to:
- Add your notebooks to the
notebooks/directory - Add any supporting code to the
src/directory - Commit and push your changes to make your cookbook available