Cookiecutter template for a Protean Application Repository.
Table of Contents
This template chooses some project implementations to be available default:
- Pytest as the Test Framework
- bumpversion for maintaining a semantic version
Projects using this template have these dependencies:
- Cookiecutter - just for creating the project
- Setuptools - for building the package, wheels etc. Setuptools is now packaged by default with most Python Virtual environment managers.
To get quickly started on a new system, just install setuptools and then install pip. That's the bare minimum to required install Cookiecutter, with this command in your shell or command prompt:
pip install cookiecutter
First generate your project:
cookiecutter gh:proteanhq/cookiecutter-protean
You will be asked for these fields:
Template variable | Default | Description |
---|---|---|
full_name |
"Subhash Bhushan C" |
Main author of this library or application (used in Can be set in your |
email |
Contact email of the author (used in Can be set in your |
|
website |
"https://proteanhq.com" |
Website of the author. Can be set in your |
github_username |
"proteanhq" |
GitHub user name of this project (used for GitHub link). Can be set in your |
project_name |
"Domain" |
Verbose project name, used in headings (docs, readme, etc). |
repo_name |
"python-domain" |
Repository name on GitHub (and project's root directory name). |
package_name |
"domain" |
Python package name (whatever you would import). |
distribution_name |
"domain" |
PyPI distribution name (what you would pip install ). |
project_short_description |
"An example package [...]" |
One line description of the project (used in README.rst and setup.py ). |
version |
"0.1.0" |
Release version (see .bumpversion.cfg ). |
After this you can create the initial repository (make sure you create an empty Github project):
git init . git add . git commit -m "Initial commit" git remote add origin [email protected]:<username>/<repo_name>.git git push -u origin master
To run all the tests, just run:
pytest
This template provides a basic bumpversion configuration. It's as simple as running:
bumpversion patch
to increase version from 1.0.0 to 1.0.1.bumpversion minor
to increase version from 1.0.0 to 1.1.0.bumpversion major
to increase version from 1.0.0 to 2.0.0.
You should read Semantic Versioning 2.0.0 before bumping versions.