How to use cookiecutter template from Heptapod

Hi,

I’d love to know how am I supposed to use the recently released cookiecutter folder on Heptapod.

I’ve tried using cookiecutter against /tryton/tryton and /tryton/tryton/-/tree/branch/default/cookiecutter-module, but it gets stuck right after hitting enter on the CLI command.

I don’t know if I’m missing something. I’ve recently also experienced some degraded performance on Tryton repository due to the size of the monorepo itself… Maybe the cookiecutter is having the same issue?

❯ cookiecutter --version
Cookiecutter 2.1.1 from /opt/homebrew/lib/python3.11/site-packages (Python 3.11.1 (main, Dec 23 2022, 09:28:24) [Clang 14.0.0 (clang-1400.0.29.202)])
❯ hg --version
Mercurial Distributed SCM (version 6.3.2)
(see https://mercurial-scm.org for more information)

Copyright (C) 2005-2023 Olivia Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
❯ python --version
Python 3.11.1

Thank you beforehand

$ cookiecutter hg+https://code.tryton.org/tryton --directory cookiecutter-module
See Update cookiecutter url in module tutorial (!209) · Merge requests · Tryton / Tryton · GitLab

1 Like

Not working when doing this

cookiecutter hg+https://code.tryton.org/tryton --directory cookiecutter-module
The repository https://code.tryton.org/tryton could not be found, have you made a typo?

Doing:

cookiecutter hg+https://foss.heptapod.net/tryton/tryton --directory cookiecutter-module

Works fine for me.
It usually takes a while, but I do not often re-download it.

Maybe you got issues with the code.tryton.org redirect?

❯ cookiecutter hg+https://code.tryton.org/tryton --directory cookiecutter-module
You've downloaded /Users/hodeinavarro/.cookiecutters/tryton before. Is it okay to delete and re-download it? [yes]: yes
module_name [my_module]:

I do not think it is needed to redownload the repository each time. I guess the cache is just updated.
Also if you have already the tryton repository cloned somewhere, you can run cookiecutter <path>tryton//cookiecutter-module.

You need at least cookiecutter 2.1.

Even with cookiecutter 2.1.1, Tryton / Tryton · GitLab is not working:

╰─ cookiecutter --version
Cookiecutter 2.1.1 from /home/mrichez/.local/lib/python3.10/site-packages (Python 3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0])
╭─ mrichez@richez/tmp                                                
╰─ cookiecutter hg+https://code.tryton.org/tryton --directory cookiecutter-module         
You've downloaded /home/mrichez/.cookiecutters/tryton before. Is it okay to delete and re-download it? [yes]: yes
The repository https://code.tryton.org/tryton could not be found, have you made a typo?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.