Skip to content

noodlehaus/python-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Project Template

This is a minimal Python project template.

Instructions

  1. Install Python3 (of course).
  2. Clone this repository, remove the .git folder, then initialise.
git clone https://github.com/noodlehaus/python-project-template <your-project-name>
cd <project-name> && rm -rf .git
git init
  1. Install the pre-commit hook.
make hooks
  1. Run make commands to setup the project.
# create and activate venv
make venv && source .venv/bin/activate

# install initial deps (tools)
make reqs
  1. Check Makefile so all your target files are specified in SOURCES.
  2. Run make to run the tool chain.

Pre-commit Hook

Running make hooks installs a pre-commit hook on git. This pre-commit hoook runs

  1. linting with flake8 and pylint
  2. formatting with black
  3. type checking with mypy
  4. code security check with bandit
  5. unit tests with pytest

Failure in any of the steps will stop the commit.

About

Minimal template for Python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published