Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericdaat/template-python
A template repository for a python package. Pre configured sphinx and pytest.
https://github.com/ericdaat/template-python
python repository-pattern repository-template sphinx template
Last synced: 3 months ago
JSON representation
A template repository for a python package. Pre configured sphinx and pytest.
- Host: GitHub
- URL: https://github.com/ericdaat/template-python
- Owner: ericdaat
- License: other
- Created: 2019-11-28T16:39:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:14:40.000Z (almost 2 years ago)
- Last Synced: 2024-05-28T04:53:55.105Z (6 months ago)
- Topics: python, repository-pattern, repository-template, sphinx, template
- Language: Python
- Size: 11.7 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - ericdaat/template-python - A template repository for a python package. Pre configured sphinx and pytest. (Python)
README
# Template for a python repository
## Installation
Use a virtual environment, with `python3`:
``` bash
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](./package) (and rename the package).
## Unit tests
Use [pytest](https://docs.pytest.org/en/latest/) for unit testing.
Run your tests with `pytest tests`.
## Docs
Use [sphinx](http://www.sphinx-doc.org/en/master/) for generating the docs
from your code.Use [Napoleon](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/)
style when writing your docstrings.``` bash
sphinx-apidoc ./package -o ./docs/source -M;
cd docs;
make clean;
make html;
open docs/build/html/index.html;
```