This repository contains the documentation for the Qualytics platform, built using Material for MkDocs.
This project requires the following tools:
- Python 3.13+
- MkDocs
- pre-commit
- typos
- mkdocs-print-site-plugin
- VS Code with the Run on Save extension (recommended)
To preview the documentation locally
- Activate the virtual environment
- Run the following command:
mkdocs serveNote
By default, the documentation will be served at http://localhost:8000.
Tip
To run it on a custom port (e.g., 8080):
mkdocs serve -a localhost:8080To enable PDF export via the print-site plugin:
- Open the mkdocs.yml file.
- Set the print-site plugin to enabled.
- Run mkdocs build or mkdocs serve.
Create a Python virtual environment:
python3 -m venv <your_env_name>Note
Replace <your_env_name> with your desired virtual environment folder name.
Use the appropriate command based on your operating system and shell:
| Platform | Shell | Command |
|---|---|---|
| POSIX | bash/zsh | source <venv>/bin/activate |
| fish | source <venv>/bin/activate.fish |
|
| csh/tcsh | source <venv>/bin/activate.csh |
|
| pwsh | <venv>/bin/Activate.ps1 |
|
| Windows | cmd.exe | <venv>\Scripts\activate.bat |
| PowerShell | <venv>\Scripts\Activate.ps1 |
Note
Replace <venv> with the path to your virtual environment folder.
python -m pip install --upgrade pippip install -r requirements.txtThis repository uses pre-commit hooks to catch issues before they reach the repository. Two hooks are configured:
- typos - Spell checking across all documentation files using typos. Custom word allowances are defined in
.typos.toml. - mkdocs-warnings - Runs
mkdocs buildand reports anyWARNINGlines (broken links, missing nav entries, etc.). This hook reports warnings without failing the build to avoid blocking commits on acceptable warnings.
pip install pre-commitpre-commit installTo run all pre-commit checks manually:
pre-commit run --all-filesThe mkdocs.yml file includes a validation section that controls which link and reference issues produce warnings during the build. This can be expanded to catch more issues:
# Example: expanded validation config
validation:
nav:
omitted_files: info
absolute_links: warn
links:
anchors: warn
absolute_links: warn
unrecognized_links: warnTo enforce stricter checks, the hook can be updated to use mkdocs build --strict (turns warnings into errors) or to filter out known acceptable warnings while failing on the rest.
If you are using Visual Studio Code, it's recommended to install the Run on Save extension.
With this extension, every time you save a file in the project, it automatically executes Typos to check for misspelled words throughout the codebase. The results will be shown in the Output panel under the Run On Save section.
To configure it, add the following snippet to your .vscode/settings.json:
{
"emeraldwalk.runonsave": {
"commands": [
{
"match": ".*",
"cmd": "pre-commit run --all-files"
}
]
}
}Note
Make sure pre-commit is installed and the virtual environment is activated in your terminal when using this setup.