A python
template that provided default pre-commit
and pip-compile-multi
features.
- Install
cookiecutter
at your environment:
$ pip install cookiecutter
- Load structure:
$ cookiecutter gh:quequsha/python-template
- Install
development
dependicies:
$ pip install -Ur requirements/dev.txt
- Init git if needed:
$ git init
- Add remote repo if needed:
$ git remote add origin <repo>
- Init
pre-commit
:
$ pre-commit
- Install
pre-commit
hooks:
$ pre-commit install
Each core dependency add to
requirements/base.in
Before commit run
pip-compile-multi
After
git commit ...
will callpre-commit
check automatically.
At production you should only install dependicies:
pip install -Ur requirements/base.txt
Your can add another pre-commit
hooks to .pre-commit-config.yaml
Explore:
Run commit without pre-commit
:
$ git commit --no-verify
Run pre-commit
against all the files:
$ pre-commit run --all-files
Configure dependicies:
$ pip-compile-multi