Home

Awesome

<p align="center"> <img alt="Plone Logo" width="200px" src="https://raw.githubusercontent.com/plone/.github/main/plone-logo.png"> </p> <h1 align="center"> Cookieplone 🍪 </h1> <div align="center">

PyPI PyPI - Python Version PyPI - Wheel PyPI - License PyPI - Status

Tests

GitHub contributors GitHub Repo stars

</div>

Welcome to Cookieplone, a powerful wrapper around Cookiecutter designed to streamline the development of Plone codebases. Whether you're building a backend add-on, a new Volto add-on, a full project with both backend and frontend, Cookieplone simplifies the process using robust Cookiecutter templates.

Key features 🌟

Cookieplone offers the following key features for each audience.

For users

For template creators

Installation 💾

First, ensure you have Python, pip, and pipx installed on your system.

Then install Cookieplone using pipx:

# pipx is strongly recommended.
pipx install cookieplone

Or, if pipx is not an option, you can install Cookieplone in your Python user directory.

python -m pip install --user cookieplone

Usage 🛠️

To see all available template options, run:

pipx run cookieplone

Cookieplone will walk you through the necessary steps, using sensible defaults and offering customization options where needed.

Use options to avoid prompts

Cookieplone will ask a lot of questions. You can use some of its options to avoid repeatedly entering the same values.

--no-input

You can use the --no-input option to make Cookieplone not prompt for parameters and only use cookiecutter.json file content.

--replay and --replay-file

You can use the options --replay and --replay-file to not prompt for parameters and only use information entered previously or from a specified file. See Replay Project Generation in the cookiecutter documentation for more information.

Specify a template

You can also specify other templates.

TemplateDescriptionCommand
backend_addonCreate a Plone add-on to be used with the backend.pipx run cookieplone backend_addon
frontend_addonCreate a Plone add-on to be used with the frontend.pipx run cookieplone frontend_addon

The updated list of templates can be found at the cookieplone-templates repository.

Configure Cookieplone

Environment VariableDescriptionExample
COOKIEPLONE_REPOSITORYWhere to look for templates to be used.COOKIEPLONE_REPOSITORY=/home/plone/cookiecutter-plone/ pipx run cookieplone
COOKIEPLONE_REPOSITORY_TAGWhich tag/branch to use from a remote repository.COOKIEPLONE_REPOSITORY_TAG=experimental pipx run cookieplone
COOKIEPLONE_REPO_PASSWORDPassword to use when using a remote repository that is password protected.COOKIEPLONE_REPO_PASSWORD=very-secure pipx run cookieplone

Contribute 🤝

We welcome contributions to Cookieplone.

You can create an issue in the issue tracker, or contact a maintainer.

Development requirements

Setup

Install all development dependencies, including Hatch, and create a local virtual environment with the following command.

make install

Check and format the codebase

make check

Run tests

pytest is this package's test runner.

Run all tests with the following command.

make test

Run all tests, but stop on the first error and open a pdb session with the following command.

hatch run test -x --pdb

Run only tests that match test_run_sanity_checks_fail with the following command.

hatch run test -k test_run_sanity_checks_fail

Run only tests that match test_run_sanity_checks_fail, but stop on the first error and open a pdb session with the following command.

hatch run test -k test_run_sanity_checks_fail -x --pdb

Support 📢

For support, questions, or more detailed documentation, visit the official Cookieplone repository.

Thank you for choosing Cookieplone for your Plone development needs!

This project is supported by

<p align="left"> <a href="https://plone.org/foundation/"> <img alt="Plone Foundation Logo" width="200px" src="https://raw.githubusercontent.com/plone/.github/main/plone-foundation.png"> </a> </p>

License

The project is released under the MIT License.