This directory contains the API documentation for the hotel_management project.
It includes the main packages, classes, and functions that developers and data scientists can use.
Note: all detailed documentation is auto-generated from docstrings, using the
pdocpackage.
There are four folders, covering three of the main folders found in the repo - ml/, pipelines/ and scripts/, along with ml_service/.
To view the documentation:
- Ensure you have python installed and set up, e.g. a quick check:
python --version- Navigate to a folder of choice, e.g.:
cd docs/api/ml- Start the server on a port of your choice, e.g.
8000:
python -m http.server 8000- Open your browser and visit http://localhost:8000
The documentation is static HTML, so you do not need pdoc installed to view it — only Python to run the local server.
In order to generate documentation:
- Install
pdoc:
conda install -c conda-forge pdocor
pip install pdocNote:
pdocpackage is also included inenvironment.yml.
- Ensure
__init__.pyfiles exist
- Create them for each package, even if empty
- Adding a docstring for clarity is encouraged
pdocignores packages without__init__.py
- Generate the documentation:
- Run the following command from repo root.
pdoc -html {folder_of_choice} -o docs/api/{folder_of_choice}folder_of_choice= folder for which you are generating the documentation- keep the naming and file structure consistent
Best practice example:
pdoc -html ml -o docs/api/mlBad practice examples:
pdoc -html ml -o docs/api/stuffpdoc -html ml -o docs/mlpdoc -html ml -o ml