Skip to content

quequsha/python-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-template

A python template that provided default pre-commit and pip-compile-multi features.

How to install template for development?

  1. Install cookiecutter at your environment:
$ pip install cookiecutter
  1. Load structure:
$ cookiecutter gh:quequsha/python-template
  1. Install development dependicies:
$ pip install -Ur requirements/dev.txt
  1. Init git if needed:
$ git init
  1. Add remote repo if needed:
$ git remote add origin <repo>
  1. Init pre-commit:
$ pre-commit
  1. Install pre-commit hooks:
$ pre-commit install

How to use template?

Each core dependency add to requirements/base.in

Before commit run pip-compile-multi

After git commit ... will call pre-commit check automatically.

At production you should only install dependicies: pip install -Ur requirements/base.txt

Additional hooks

Your can add another pre-commit hooks to .pre-commit-config.yaml Explore:

Development packages

Useful commands

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •