Author: Jared Cook
Version: 0.1.0
Python3 cookiecutter template project + Github docs template generation + Sphinx docs template generation.
Note: Unless you are using a newer version of cookiecutter >= 2, --no-input is necessary for template generation without error.
Example: Pull from main branch.
Note: Nutri-Matic is needed in active python environment.
- Pull Project with cookiecutter command:
$ cookiecutter git@github.com:jcook3701/python3-cookiecutter.git \
--no-input \
project_name="test-project"
Example: Pull from develop branch.
- Pull code from development branch while testing updates.
$ cookiecutter git@github.com:jcook3701/python3-cookiecutter.git \
--checkout develop \
--no-input \
project_name="test-project"
replace test-project or any of the other variables with real context configuration variables:
Note: replace test-project or any of the other variables with real context configuration variables.
Note: All Makefile commands are used in ci/cd to ensure that if they pass locally they should also pass once pushed to github.
$ make install
$ make dependency-check
$ make security
$ make format-check
$ make format-fix
$ make lint-check
$ make lint-fix
$ make spellcheck
$ make typecheck
$ make test
$ make release
$ make help
Note: Commits are required to be conventional git commit message. This helps with the auto-generation of the changelog files and is enforced by pre-commit.
example:
<type>[optional scope]: <description>[optional body]
[optional footer(s)]
<type>: A required noun that describes the nature of the change.[optional scope]: An optional phrase within parentheses that specifies the part of the codebase being affected (e.g., fix(parser):).<description>: A required short, imperative-mood summary of the changes.[optional body]: A longer description providing additional context and “what and why” details.[optional footer(s)]: Used for adding meta-information, such as issue references (Fixes #123) or indicating breaking changes.
Python 3.11
$ sudo apt install python3.11
Nutri-Matic
Note: This is needed for the cookiecutter hooks to run correctly. Without this package installed in active python environment cookiecutter pull will fail.
$ pip install nutri-matic
rustup
Note: I found that it is easiest to use rustup to manage rustc and cargo but this is not required.
Example: Install rustup with the following:
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git-cliff
Note: git-cliff can generate changelog files from the Git history by utilizing conventional commits as well as regex-powered custom parsers.
$ cargo install git-cliff
- Organizing cookiecutters in directories
- Add freecad paths for freecad projects.
- etc.
- Create python repository to make it easy to swap nested vars but might eventually use newer version of cookiecutter from pypi.
- Update configuration file to include or disclude the Dockerfile (Only needed for a webapp)
- Create separate repo to utilize cookiecutter 1.7 with custom json config in order to update pyproject.toml variables in ‘config’ variable.
- This code currently works with cookiecutter 1.7 from Ubuntu’s apt repositories.