GjjvdBurg / PythonPackageTemplate

Script to create a Python package skeleton that includes Poetry, Travis, Sphinx + Read the Docs, and Green

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python Package Skeleton

This repository contains a script create_package.py that generates a template directory for a new Python package. The generated package uses poetry for packaging, Travis for continuous integration, Sphinx with autodoc and Read the Docs for documentation, and Green for unit testing. It also comes with a handy Makefile that ties everything together.

This script was created because I don't want to reinvent the wheel everytime I create a new Python package. Hopefully it's useful for others too. If you find a problem, please open an issue or submit a pull request.

The script takes a package name as command line argument:

python create_package.py newpkg

and creates the following package structure:

├── CHANGELOG.md
├── docs
│   ├── _build
│   ├── changelog.rst
│   ├── conf.py
│   ├── index.rst
│   ├── make.bat
│   ├── Makefile
│   ├── readme.rst
│   ├── source
│   ├── _static
│   └── _templates
├── Makefile
├── make_release.py
├── MANIFEST.in
├── newpkg
│   ├── __init__.py
│   └── __version__.py
├── poetry.lock
├── pyproject.toml
├── README.md
└── setup.py

Note: The generated package doesn't yet fully use Poetry for packaging and publishing the Python package and instead relies on a separate setup.py and a generated requirements.txt. Doing all this using Poetry is planned for the future.

About

Script to create a Python package skeleton that includes Poetry, Travis, Sphinx + Read the Docs, and Green

License:MIT License


Languages

Language:Python 100.0%