P2 Project

This project is an example of how we can write a professional documentation using mkdocs module in Python.
To learn MarkDown notation, use this Cheatsheet.


Python Version

This project was built using Python 3.12.1


Modules

  • mkdocs >= 1.6.1
  • mkdocstrings-python>=1.12.2
  • numpy >= 2.1.3
  • pandas >= 2.2.3
  • scikit-learn >= 1.5.2
  • seaborn >= 0.13.2
  • streamlit >= 1.40.1

Quick Start

To create a documentation with MkDocs, these are the main bash commands:

  • Install mkdocs: pip install mkdocs
  • Create a new documentation folder: mkdocs new .
  • mkdocs.yml is the file to customize the web page, such as creating tabs, changing titles and themes.
  • The files in the folder docs are the ones to hold the documentation text, using MarkDown notation.
  • Once the docs files are ready, build the page: mkdocs build
  • Deploy to your GitHub repository: mkdocs gh-deploy

Functions

These are the functions used in the code hello.py

My function to say hello to the world from Python

Source code in hello.py
1
2
3
def main_func():
    '''My function to say hello to the world from Python'''
    print("Hello from p2!")

Calculate sum of two numbers * Inputs: * n1: int or float * n2: int or float

Source code in hello.py
 6
 7
 8
 9
10
11
12
13
14
def calculations(n1, n2):
    '''
    Calculate sum of two numbers
    * Inputs:
        * n1: int or float
        * n2: int or float
        '''

    return n1 + n2