A template for a python package with setup scripts, testing and continuous integration.
The python package can be installed directly from github using
pip install --index-url https://github.com/joesdesk/pytemplate pytemplate
It can also be installed from a local source (presumably after being downloaded). In development mode (using the -e
option), editing the source files also changes the installed package in real time. First change directory to the repository root
cd path/to/pytemplate
and run
pip install -e ./
To install the package as a normal package, where changing the source files will not change change the installed package without reinstallation, run
pip install ./
To perform a clean uninstall of the package, run
pip uninstall pytemplate
Having tests to ensure changes don't create new bugs is essential in software development.
To run all the tests in the tests/
folder, change directory to the repository root
cd path/to/pytemplate
and run
pytest
Sphinx generates documentation for the package. The source code for the documentation is in the sphinx/ folder. It contains a Makefile which can be used to generate the documentation after changes. To generate the documentation, run
make html
The generated documentation is made in the docs/ folder. This allows a github pages website to be created for the documentation of the project in the project's repository.
- Documentation Extensions: Include documentation from docstrings. link.
- reStructuredText Markup Specification. link.
- The GitHub Blog. Publish Your Project Documentation with GitHub Pages. 2016. link.
- Author: Jomar Sastrillo
- Date created: November 19, 2017