Skip to content
/ template-python Public template

A template repository for a python package. Pre configured sphinx and pytest.

License

Notifications You must be signed in to change notification settings

ericdaat/template-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

About

A template repository for a python package. Pre configured sphinx and pytest.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages