# Sphinx Documentation

This directory contains the Sphinx documentation for the VIPR Core Framework.

## Quick Start

### 1. Install Dependencies

```bash
pip install -r docs-sphinx-requirements.txt
```

### 2. Generate API Documentation (RST files)

```bash
cd vipr-core/docs-sphinx

# Generate RST files for all Python modules
sphinx-apidoc -o api ../vipr --force --module-first
```

### 3. Build Documentation

```bash
# Build HTML documentation
make html

# Clean previous builds
make clean
```

### 4. Local Preview

```bash
# Serve documentation locally
python -m http.server 8000 -d _build/html

# Open in browser
open http://localhost:8000
```

## Complete Workflow

```bash
# 1. Install dependencies
pip install -r docs-sphinx-requirements.txt

# 2. Generate API docs
sphinx-apidoc -o api ../vipr --force --module-first

# 3. Build HTML
make html

# 4. Serve locally
python -m http.server 8000 -d _build/html
```

## GitLab Pages

Documentation is automatically built and deployed to GitLab Pages on every commit to `main` or `master` branch.

**URL:** https://vipr.gitlab.io/vipr-core/

## Notes

- RST files in `api/` are auto-generated - don't edit manually
- Add `api/` and `_build/` to `.gitignore` (already done)
- This is API-only documentation - for user guides, see the vipr-framework documentation
