Metadata-Version: 2.1
Name: cookie-composer
Version: 0.11.0rc52.dev57
Summary: Create new projects from a composition of several templates
Author-email: Corey Oordt <coreyoordt@gmail.com>
License: BSD-3-Clause
Project-URL: Homepage, https://github.com/callowayproject/cookie-composer
Project-URL: Documentation, https://callowayproject.github.io/cookie-composer/
Keywords: cookie-composer,cookiecutter,scaffold
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click-log
Requires-Dist: cookiecutter>=2.4.0
Requires-Dist: fsspec[http]
Requires-Dist: ghapi
Requires-Dist: gitpython>=3.1.37
Requires-Dist: immutabledict
Requires-Dist: orjson
Requires-Dist: pydantic>2.0.0
Requires-Dist: questionary
Requires-Dist: requests
Requires-Dist: rich-click
Requires-Dist: ruamel.yaml
Requires-Dist: toml
Provides-Extra: dev
Requires-Dist: bump-my-version>=0.11.0; extra == "dev"
Requires-Dist: git-fame>=1.12.2; extra == "dev"
Requires-Dist: generate-changelog; extra == "dev"
Requires-Dist: pip-tools; extra == "dev"
Provides-Extra: docs
Requires-Dist: astroid<3.0.0; extra == "docs"
Requires-Dist: ghp-import; extra == "docs"
Requires-Dist: linkify-it-py; extra == "docs"
Requires-Dist: myst-parser; extra == "docs"
Requires-Dist: Sphinx>=7.2.0; extra == "docs"
Requires-Dist: sphinx-autodoc2; extra == "docs"
Requires-Dist: sphinx-click; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-material; extra == "docs"
Provides-Extra: test
Requires-Dist: coverage>=6.1.2; extra == "test"
Requires-Dist: pre-commit>=2.15.0; extra == "test"
Requires-Dist: pytest-cov>=3.0.0; extra == "test"
Requires-Dist: pytest-env; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest>=6.0.0; extra == "test"

# Cookie Composer

<!-- start-badges -->

[![PyPI](https://img.shields.io/pypi/v/cookie-composer)][pypi_]
[![Status](https://img.shields.io/pypi/status/cookie-composer)][status]
[![Python Version](https://img.shields.io/pypi/pyversions/cookie-composer)][python version]
[![License](https://img.shields.io/pypi/l/cookie-composer)][license]
[![codecov](https://codecov.io/gh/callowayproject/cookie-composer/branch/master/graph/badge.svg?token=YO2JQLV1OB)](https://codecov.io/gh/callowayproject/cookie-composer)

[pypi_]: https://pypi.org/project/cookie-composer/
[status]: https://pypi.org/project/cookie-composer/
[python version]: https://pypi.org/project/cookie-composer
[license]: https://github.com/callowayproject/cookie-composer/blob/master/LICENSE

Documentation: https://callowayproject.github.io/cookie-composer/

<!-- end-badges -->

Cookie composer builds on the [cookie cutter](https://github.com/cookiecutter/cookiecutter) project to generate projects based on one or more cookiecutter templates.

## Goals

- Create new projects from a composition of several templates
- Add new capabilities to an existing repository by applying a template
- Apply template updates to the generated project

## Introduction

Cookie Cutter treats templates like sandwiches. There are templates for hamburgers, clubs, and any other kind of sandwich you can dream up. You might have options and defaults on a template, like `Hold the mustard?[False]:` or `Mustard type [dijon]:`, but those are decided by the template author. 


<img src="https://raw.githubusercontent.com/coordt/cookie-composer/master/docsrc/_static/img/sandwiches.png" alt="Templates are treated like finished sandwiches" style="zoom:50%;" />

If you look closely at the sandwiches (templates), there is usually many things in common. What if we treated the templates as compositions of other templates:

<img src="https://raw.githubusercontent.com/coordt/cookie-composer/master/docsrc/_static/img/compositions.png" alt="Sandwiches as a composition of layers" style="zoom:50%;" />

You now can manage several smaller and specialized templates that provide functionality. Each template's options will be specific to what that template needs.

<img src="https://raw.githubusercontent.com/coordt/cookie-composer/master/docsrc/_static/img/layers.png" alt="Templates broken out as layers on a sandwich" style="zoom:50%;" />

Cookie Composer uses a composition file to describe the layers required, and even override a template's default answers.

```yaml
template: bottom-bun
context:
  toasting_level: light
  buttered: False
---
template: burger
---
template: cheese
context:
  kind: swiss
---
template: bacon
context:
  cooking_level: crispy
---
template: ketchup
---
template: mustard
context:
  type: yellow
---
template: top-bun
context:
  toasting_level: light
  buttered: False
```

We have created [a repo of highly composable templates](https://github.com/coordt/cookiecomposer-templates) as examples or reference. However, Cookie Composer is designed to handle any Cookie Cutter template.

## Purpose

- Separate out parts to a repo into composable templates
  - Boilerplate
    - README, CONTRIBUTING, docs, Makefile, license, tooling configurations
  - Project-specific
    - Django
    - Flask
    - Library
    - Data science
  - CI/CD specific
    - Helm chart
    - GitHub Actions vs. Jenkins vs. ...
  - Documentation specific
    - Sphinx
    - MkDocs
- Each composable template is managed and updated individually
- A project can update itself based on chages in layers


## Please contribute

- Documentation critiques
- Documentation suggestions
- Feature suggestions
- Feature improvements
- Edge case identification
- Code improvements
