This repo contains a jupyter-book with documentation for cortex.
Create a virtual environment with uv or a conda environment with mamba. Install requirements with
uv venv -n ~/.venv/cortex-docs --python 3.10
source ~/.venv/cortex-docs/bin/activate
export UV_PROJECT_ENVIRONMENT=$VIRTUAL_ENV
uv pip install -r requirements.inor from requirements.in and run publish.sh.
To render notebook output, install cortex.
To build and view the docs locally
jupyter-book build docs
open docs/_build/html/index.htmland when changes are ready, publish with
ghp-import -n -p -f docs/_build/htmlProtip: load the part of the cortex codebase that you're writing docs for into LLM project context and prompt to generate markdown and .py files. Then use jupytext to convert from code to executable ipynb.
jupytext --to notebook myfile.pyIn VSCode, select the .venv as the kernel.
Thanks to Miguel González Duque and the poli documentation for inspiration!