Skip to content
Public template

About

A template for my Python package.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

254 Commits

Folders and files

Repository files navigation

python-template

CI docs release-pypi

Ruff mypy

Using this as a template

Bulk-replace the project name, set up ssh-agent on the host, etc.

Installation

# standard
pip install git+https://github.com/yu9824/python-template.git

# with Cython compiling
pip install git+https://github.com/yu9824/python-template.git#subdirectory=packages/setuptools/cython

Docker

git clone https://github.com/yu9824/python-template.git
cd python-template
docker build -f docker/Dockerfile -t python-template .
docker run --rm -it python-template

The image contains the package with its optional dependencies and starts a Python shell. The development container lives in .devcontainer/ instead.

Directory layout

Directory Purpose
src/python_template/ Package source
tests/ pytest tests
notebooks/ Notebooks for experimentation (paired with .py via jupytext)
data/raw/ Raw, as-obtained data. Contents are not tracked
data/processed/ Preprocessed data. Contents are not tracked
models/ Trained models. Contents are not tracked
docs_src/ Sphinx source
packages/ Package templates for different build configurations
examples/ Example scripts
docker/ Docker image for users of the package
.devcontainer/ Development container (VS Code Dev Containers)

The setup.cfg-based template for old Python versions (packages/setuptools/pep517/) was removed. See v0.0.14 for the last version whose whole template supported Python 3.7, or v0.4.0 for the last copy of that directory (its src/ already required Python 3.9 there).

About

A template for my Python package.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages