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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file managetemplates-0.3.0.tar.gz.

File metadata

  • Download URL: managetemplates-0.3.0.tar.gz
  • Upload date:
  • Size: 958.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for managetemplates-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2413b1a7cd9a9ba8494b950c7429ba6e51e9ace880b1d5c59dd6ef960cc00ea3
MD5 3f6e7fa2c3d1891c5640b42131cafff4
BLAKE2b-256 6b8d11aafea8ef813115fc3fc4142b01a0dd82baa26d8f1a6a32f10016306469

See more details on using hashes here.

Provenance

File details

Details for the file managetemplates-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for managetemplates-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b685b3c86e5b2cfa933ffe5bf89d27115ef23d39b98a2b49af63db11b20c63a4
MD5 8c7d798433d060c9424f8378aa872dde
BLAKE2b-256 9ff3106feda9cdb9d711c4bbafa835c3a786643f2aad324f24f700c4e2c9d3da

See more details on using hashes here.

Provenance

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