# Installation Guide

---

## 1. Core Features

Install CrystFlux core functionality (Crystallizer only):

```bash
# Using pip
pip install crystflux

# Using uv
uv pip install crystflux
```

**Note**: Core installation has no external dependencies (Python standard library only).

---

## 2. Adapters

### 2.1 NumPy Integration
Enable NumPy array conversion:

```bash
# Using pip
pip install "crystflux[numpy]"

# Using uv
uv pip install "crystflux[numpy]"
```

### 2.2 Pydantic Integration
Enable Pydantic model conversion:

```bash
# Using pip
pip install "crystflux[pydantic]"

# Using uv
uv pip install "crystflux[pydantic]"
```

### 2.3 Multiple Adapters
Combine multiple adapters:

```bash
# Using pip
pip install "crystflux[numpy,pydantic]"

# Using uv
uv pip install "crystflux[numpy,pydantic]"
```

### 2.4 All Adapters
Install all optional adapters:

```bash
# Using pip
pip install "crystflux[all]"

# Using uv
uv pip install "crystflux[all]"
```

---

## 3. Development Environment

### 3.1 Development Setup (with dev tools)

Clone the repository：

```bash
git clone https://codeberg.org/latentium/crystflux.git
cd crystflux/
```

Full development environment setup:

```bash
# Using uv (recommended)
uv venv
source .venv/bin/activate  # Linux/macOS
# or
.venv\Scripts\activate     # Windows
uv sync

# Using pip
# python -m venv .venv
source .venv/bin/activate  # Linux/macOS
# or
.venv\Scripts\activate     # Windows
pip install pytest pytest-cov ruff basedpyright mypy
```

### 3.2 Core Only Test (without dev tools)
Test core functionality without development tools:

```bash
# Using uv
uv sync --no-dev

# Using pip
pip install -e .
```

### 3.3 Add Adapters for Testing
Add adapters to development environment:

```bash
# Using uv (add specific adapter)
uv sync --extra numpy
uv sync --extra pydantic
uv sync --extra all

# Using pip
pip install numpy>=2.3
pip install pydantic
```

---

## Command Quick Reference

| Purpose | pip | uv |
|----------|-----|-----|
| Core Features | `pip install crystflux` | `uv pip install crystflux` |
| NumPy Adapter | `pip install "crystflux[numpy]"` | `uv pip install "crystflux[numpy]"` |
| Pydantic Adapter | `pip install "crystflux[pydantic]"` | `uv pip install "crystflux[pydantic]"` |
| All Adapters | `pip install "crystflux[all]"` | `uv pip install "crystflux[all]"` |
| Multiple Adapters | `pip install "crystflux[numpy,pydantic]"` | `uv pip install "crystflux[numpy,pydantic]"` |
| Dev Setup | `pip install pytest pytest-cov ruff basedpyright mypy` | `uv sync` |
| Core Only Test | `pip install -e .` | `uv sync --no-dev` |
| Add Adapter | `pip install numpy>=2.3` | `uv sync --extra numpy` |

---

## Notes

- **Library users**: Use `uv pip install` or `pip install`. `uv sync` is for developers.
- **Developers**: Use `uv sync` for full dev setup, `uv sync --no-dev` for core only.
- **pip limitation**: `pip` does not support `[dependency-groups]`, install dev tools individually.
