This project is a template for Python module. It includes a basic example of functions that allows users to do some simple arithmetic operations.
TODO
-
Documentation:
-
Code Quality:
- Black: A code formatters that automatically format the Python code.
- Flake8: A tool that checks the code for style and quality.
- Cspell: A spell checker that checks the spelling in the code, edit the
cspell.json
file to add custom words or languages.
-
Testing:
- Pytest: A testing framework for Python that makes it easy to write small tests.
-
Continuous Integration and Continuous Deployment:
- GitHub Actions: This project includes a GitHub Actions workflow that runs the tests, linters, pushes the Python module to the PyPI repository, and deploys the documentation to GitHub Pages.
The documentation is available at https://tomansion.github.io/Python-module-template/.
To use this Python module template, follow these steps:
# Clone the repository
git clone https://github.com/Tomansion/Python-module-template.git
# Install the python module
cd Python-module-template
pip install .
To run the tests using Pytest, follow these steps:
# Install the required dependencies:
pip install -r requirements.txt
# Run the tests
pytest
# Run the tests with coverage
pytest --cov=python_module_template
- Create basic functions
- Add unit tests with pytest
- Add tests CI/CD pipeline
- Add Sphinx documentation
- Add documentation CI/CD pipeline with GitHub Pages
- Pipelines badges
- Coverage check pipeline and display in the README badge
- Add to Pypi
- Pypi upload pipeline