Skip to main content

upgrade projects created from a Cookiecutter template

Project description

=============================
Cookiecutter Project Upgrader
=============================


.. image:: https://img.shields.io/pypi/v/cookiecutter_project_upgrader.svg
:target: https://pypi.python.org/pypi/cookiecutter_project_upgrader

.. image:: https://img.shields.io/travis/thomasjahoda/cookiecutter_project_upgrader.svg
:target: https://travis-ci.org/thomasjahoda/cookiecutter_project_upgrader

.. image:: https://readthedocs.org/projects/cookiecutter-project-upgrader/badge/?version=latest
:target: https://cookiecutter-project-upgrader.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status




upgrade projects created from a Cookiecutter template


* Free software: MIT license
* Documentation: https://cookiecutter-project-upgrader.readthedocs.io.

Features
--------

Cookiecutter Project Upgrader allows for the update of projects that are created using cookiecutter.
When run the first time on a project, it creates a new branch that contains the latest cookiecuttered code,
using a JSON file with context that matches the existing service.
This file can be created through cookiecutter with the following contents:

`{{ cookiecutter | jsonify }}`

The script uses the [Click](https://github.com/pallets/click) framework.

```
Usage: cookiecutter_project_upgrader [OPTIONS]

Upgrade projects created from a Cookiecutter template

Options:
-c, --context-file PATH Default: docs/cookiecutter_input.json
-b, --branch TEXT Default: cookiecutter-template
-m, --merge-now Execute a git merge after a successful update
--help Show this message and exit.
```

Note that you will need a recent version of git for this to work. (it needs --no-checkout on git worktree)


Auto-Completion
---------------
Because the script uses Click, you can enable completion for Zsh and Bash.

For Bash, add the following to your `.bashrc` or some other profile initialization file.
`eval "$(_COOKIECUTTER_PROJECT_UPGRADER_COMPLETE=source cookiecutter_project_upgrader)"`

For Zsh, please read [the Click documentation](https://click.palletsprojects.com/en/7.x/bashcomplete/#activation).

Credits
-------

The concept and some code is heavily based on https://github.com/senseyeio/cupper, with some changes
to use Click and some flags and default values to ease usage. Also cleanup has been done and automated tests have been added.

This package was created with Cookiecutter_ and the `thomasjahoda/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/thomasjahoda/cookiecutter
.. _`thomasjahoda/cookiecutter-pypackage`: https://github.com/thomasjahoda/cookiecutter-pypackage


=======
History
=======

1.0.0 (2019-03-22)
------------------

* First release on PyPI.


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

cookiecutter_project_upgrader-1.0.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

cookiecutter_project_upgrader-1.0.0-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file cookiecutter_project_upgrader-1.0.0.tar.gz.

File metadata

  • Download URL: cookiecutter_project_upgrader-1.0.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for cookiecutter_project_upgrader-1.0.0.tar.gz
Algorithm Hash digest
SHA256 e2800be02c675935f58d1edf0a13bdd0235232fd3d2c6c34ee50ca5ba6e0163a
MD5 12acf70bd7da296c6eed2c9a11456607
BLAKE2b-256 5672c198e54f0c0e3c490a62ed9bcee6bfb6d160cbf47bcd18e3785c114721e6

See more details on using hashes here.

File details

Details for the file cookiecutter_project_upgrader-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cookiecutter_project_upgrader-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for cookiecutter_project_upgrader-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e18805377296c4cb480bdeb627ed4b8c9460ab29da4fcec8a84e9cd51bd8692
MD5 08817cf9eeda57263880f43457fd5dbe
BLAKE2b-256 6988e62f961550d297581bc41e78c3f1c9d01fcc35942e26d028fd3f305f9a0e

See more details on using hashes here.

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