# Intersphinx Configuration

## Overview

Intersphinx enables cross-project documentation links between VIPR components.

## Setup

Each Sphinx documentation uses pre-downloaded inventory files in `_intersphinx/`:

```python
# conf.py
intersphinx_mapping = {
    'vipr-core': ('https://vipr-core-7e5b5b.pages.hzdr.de/', '_intersphinx/vipr-core.inv'),
    'vipr-reflectometry': ('https://vipr-reflectorch-plugin-1d1e89.pages.hzdr.de/', '_intersphinx/vipr-reflectometry.inv'),
}
```

## Usage

Reference other projects' documentation:

```rst
:class:`vipr.plugins.inference.DataSet`
:func:`vipr_reflectometry.data_loader.load_data`
```

## Updating Inventories

When documentation is updated, refresh the inventory files:

```bash
# vipr-framework
curl -o _intersphinx/vipr-core.inv https://vipr-core-7e5b5b.pages.hzdr.de/objects.inv
curl -o _intersphinx/vipr-reflectometry.inv https://vipr-reflectorch-plugin-1d1e89.pages.hzdr.de/objects.inv

# vipr-reflectometry-plugin  
curl -o docs-sphinx/_intersphinx/vipr-core.inv https://vipr-core-7e5b5b.pages.hzdr.de/objects.inv
```

## Projects

| Project | Docs URL | Inventory |
|---------|----------|-----------|
| vipr-core | https://vipr-core-7e5b5b.pages.hzdr.de/ | `_intersphinx/vipr-core.inv` |
| vipr-reflectometry | https://vipr-reflectorch-plugin-9adacf.pages.hzdr.de/ | `_intersphinx/vipr-reflectometry.inv` |

## Benefits

- Works in CI/CD with authenticated GitLab Pages
- No network dependency during builds
