This repository can serve as a starting point when making a new Python module.
It is set up for:
- Knowing its checkout version via git
- Automatic documentation using Sphinx
- Unit testing
- Setuptools for installation
The root folder contains:
- .gitattributes / .gitignore: Git control files
- version.py: Git versioning clean and smudge filters.
- Makefile / conf.py: basic setup for Sphinx + sphinx-apidoc to do HTML documentation only
- index.rst: the documentation main page
- SPEC.rst: the package specification
- TODO.rst: a todo list
- README.md: This file.
- setup.py: The setuptools file.
Subfolders are:
- bin: Place user-facing scripts here which should go onto the system PATH
- lib: Modules and code
- tests: Unit tests
- After cloning run this to enable the versioning hooks (after this, git checkout
should automatically update version.py):
python version.py --install
-- you can update the version number for the first time (and test the hook) by running:sh .git/hooks/post-checkout
- Read TODO.rst, SPEC.rst, index.rst
- Look at the example code in lib, test, and bin
- To run unit tests, run
python setup.py test
- To make documentation, run
make
, then check doc/html - To install in development mode (useful when still changing code):
python setup.py build develop
- To install in system-wide:
python setup.py build install