sjoerdk / cookiecutter-pypackage

Cookiecutter template for a Python package.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookiecutter PyPackage

Updates https://travis-ci.org/sjoerdk/cookiecutter-pypackage.svg?branch=master

Fork of audryr's Cookiecutter template for a Python package. Uses github actions.

Features

Differences with original Cookiecutter template:

  • Uses github actions instead of Travis-CI for Continuous integration (has default github build workflow)
  • Includes pre-commit-hook config with black, flake8 and mypy
  • Supports only python 3.6 and higher in setup.py, dropped python 2
  • Includes tests/.__init__ BASE_PATH and RESOURCE_PATH so you can use from tests import RESOURCES_PATH
  • Uses factory-boy by default if you use pytest. Because its just so useful.
  • Docs use sphinx-rtd-theme by default, project includes .readthedocs.yml config file
  • Optimized for pycharm: .idea ignored by default

Quickstart

Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):

pip install -U cookiecutter

Generate a Python package project:

cookiecutter https://github.com/sjoerdk/cookiecutter-pypackage.git

If you are deploying to pypi:

* Push your project to pypi once (see https://packaging.python.org/tutorials/packaging-projects/)
* Generate an API key for your project on https://pypi.org/
* Save this API key in your github secrets under key `pypi_password`

This will push each tagged commit to pypi
Then:
Follow the instructions in the original Cookiecutter template

About

Cookiecutter template for a Python package.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 85.4%Language:Makefile 11.9%Language:Batchfile 2.7%