Skip to main content

Pseudo Python package to test the https://github.com/jedie/cookiecutter_templates cookiecutter templates

Project description

cookiecutter templates

tests codecov

All Templates are tested via unittests!

Patches welcome!

Django Project

  • Requirement management with pip-tools:
    • Used pip-compile to freeze/pin requirements with hashes
    • Used pip-sync to install all needed packages
  • manage_django_project:
    • Auto virtualenv bootstrap, just by calling the manage.py
    • Dev. managed commands
  • used pyproject.toml for everything

Cookiecutter template tests are here: managed-django-project/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory managed-django-project

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory managed-django-project ~/foobar/

pipenv based python package

  • Requirement management with pipenv
  • Makefile with a simple "help" menu
  • used pyproject.toml for everything
  • Has basic unittest

Cookiecutter template tests are here: pipenv-python/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory pipenv-python

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory pipenv-python ~/foobar/

pip-tools based python package

  • Requirement management with pip-tools:
    • Used pip-compile to freeze/pin requirements with hashes
    • Used pip-sync to install all needed packages
  • click based CLI for app and dev mode
  • Auto virtualenv bootstrap, just by calling the cli.py / dev-cli.py
  • used pyproject.toml for everything
  • Has basic unittest

Cookiecutter template tests are here: piptools-python/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory piptools-python

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory piptools-python ~/foobar/

Poetry based reuseable Django app

  • Requirement management with Poetry
  • Bootstrap via Makefile
  • Makefile with a simple "help" menu
  • used pyproject.toml for everything
  • Has basic unittest

Cookiecutter template tests are here: poetry-django-app/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory poetry-django-app

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory poetry-django-app ~/foobar/

Poetry based python package

  • Requirement management with Poetry
  • Bootstrap via Makefile
  • Typer based CLI
  • used pyproject.toml for everything
  • Has basic unittest

Cookiecutter template tests are here: poetry-python/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory poetry-python

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory poetry-python ~/foobar/

Base Django YunoHost app

YunoHost is a Open-Source, Debian based self-hosting solution.

This CookieCutter template is useful to build a YunoHost App for a Django based Web application

  • Contains all YunoHost scripts for install, backup, restore etc. action
  • Used django_yunohost_integration
  • Requirement management with pip-tools
  • click based CLI
  • Auto virtualenv bootstrap, just by calling dev-cli.py
  • used pyproject.toml for everything
  • Project unittest with Django integration tests

Cookiecutter template tests are here: yunohost_django_package/tests.py

Use with vanilla cookiecutter, e.g.:

cookiecutter https://github.com/jedie/cookiecutter_templates/ --directory yunohost_django_package

Use with manageprojects, e.g.:

./cli.py start-project https://github.com/jedie/cookiecutter_templates/ --directory yunohost_django_package ~/foobar/

contribute

setup local test enviorment

~$ git clone https://github.com/jedie/cookiecutter_templates.git
~$ cd cookiecutter_templates
~/cookiecutter_templates$ ./cli.py --help

The output of ./cli.py --help looks like:

Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ fix-file-content     Unify cookiecutter variables in file content. e.g.: "{{foo}}" -> "{{ foo    │
│                      }}"                                                                         │
│ fix-filesystem       Unify cookiecutter variables in the file/directory paths. e.g.:             │
│                      "/{{foo}}/{{bar}}.txt" -> "/{{ foo }}/{{ bar }}.txt"                        │
│ reverse              Reverse a /generated_templates/<pkg_name>/ back to Cookiecutter template    │
│                      in: ./<pkg_name>/                                                           │
│ templates2generated  Generate all cookiecutter templates                                         │
│ update-template-req  Update requirements of all cookiecutter templates                           │
│ version              Print version and exit                                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

Run tests, e.g.:

~/cookiecutter_templates$ ./cli.py test

# or sub tests:
~/cookiecutter_templates$ ./cli.py test managetemplates/tests/test_piptools_python.py

# It's just a "python3 -m unittest" wrapper cli, see:
~/cookiecutter_templates$ ./cli.py test --help

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

managetemplates-0.3.0.tar.gz (958.2 kB view hashes)

Uploaded Source

Built Distribution

managetemplates-0.3.0-py3-none-any.whl (33.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page