Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

simgunz/cookiecutter-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cookiecutter template for python

This cookiecutter is deprecated, it has evolved to https://github.com/flowtaleai/copier-python-poetry/

My opinionated cookiecutter for python projects.

WARNING: it is still a work in progress.

Features

Task Tool
Common style EditorConfig
Pre-commit hooks pre-commit
Autoformatter black with experimental string processing (--preview)
Testing framework pytest
Test mocking pytest-mock
Version management bump2version
Editor configuration vscode with suggested extensions

Initialization

  1. Create a new project based on this template

    cookiecutter https://github.com/simgunz/cookiecutter-python
  2. Commit all the files

    git init
    git add .
    git commit
  3. Generate the poetry (or pipenv) lock file

    poetry install
  4. Commit the lock file

    git add poetry.lock
    git commit
  5. Install the commit hooks

    poetry run pre-commit install
  6. Open VSCode and install the suggested extensions

Usage

  • VSCode should automatically detect the virtual environment (otherwise use Select python interpreter... to select the correct venv)

  • To perform actions in the shell, explicitly activate the virtual environment

    poetry shell

About

My opinionated cookiecutter for python projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages