Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 868 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 868 Bytes

Template for a python repository

Installation

Use a virtual environment, with python3:

virtualenv venv -p python3;
source venv/bin/activate;

pip install -r requirements.txt  # install existing librairaries
pip install requests;  # install new librairies
pip freeze > requirements.txt  # export the new librairies

Code

Add your code in ./package (and rename the package).

Unit tests

Use pytest for unit testing.

Run your tests with pytest tests.

Docs

Use sphinx for generating the docs from your code.

Use Napoleon style when writing your docstrings.

sphinx-apidoc ./package -o ./docs/source -M;
cd docs;
make clean;
make html;
open docs/build/html/index.html;