Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
demo_template/
├── .uip
│   └── config
│       └── uip.yml
├── __init__.py
├── requirements.txt
├── setup.cfg
├── setup.py
└── src
    ├── __init__.py
    ├── extension.py
    ├── extension.yml
    └── templates
        └── template.json

The basic structure of the custom template is almost finished! Go ahead and create a file called template_config.yml at the same level as the src/ folder. The resulting directory tree is as follows:

Code Block
demo_template/
├── .uip
│   └── config
│       └── uip.yml
├── __init__.py
├── requirements.txt
├── setup.cfg
├── setup.py
├── src
│   ├── __init__.py
│   ├── extension.py
│   ├── extension.yml
│   └── templates
│       └── template.json
└── template_config.yml

...

Step 3 - Packaging the Initial Template

Although the example is a bit contrived, we have managed to create a fully-functional customized template.

To package the template, simply zip up everything into a file called example_template.zip (or whatever you want to call it). Its structure should be as follows (if *.pyc and __pycache__ files are there, it’s fine):

Code Block
Archive:  example_template.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
        0  2023-04-04 15:37   __init__.py
      306  2023-04-04 15:37   requirements.txt
       43  2023-04-05 11:03   setup.cfg
    12088  2023-04-05 11:03   setup.py
        0  2023-04-05 11:03   src/
     1723  2023-04-05 11:03   src/extension.py
      221  2023-04-05 11:03   src/extension.yml
        0  2023-04-05 11:03   src/templates/
     3278  2023-04-05 11:09   src/templates/template.json
        0  2023-04-04 15:37   src/__init__.py
      349  2023-04-05 11:05   template_config.yml
---------                     -------
    18008                     11 files

...