Skip to content

Tomansion/Python-module-template

Repository files navigation

Python module template

License

Code style: black Code style: flake8


This project is a template for Python module. It includes a basic example of functions that allows users to do some simple arithmetic operations.

Template features

TODO

  • Documentation:

    • Docstring: A way to document the code using comments.
    • Sphinx: A tool that makes it easy to create intelligent and beautiful 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.

Python module documentation

The documentation is available at https://tomansion.github.io/Python-module-template/.

Getting started

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 .

Test

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

TODO

  • 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

About

Python3 module quickstart template with doc, tests and CICD

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages