# Conventions

## Code Style

- **Line length**: 100
- **Formatter**: ruff
- **Python version**: 3.12

## Workspace Layout

Multi-package uv workspace with a shared `.venv` at the repo root.

| Package | Description |
|---------|-------------|
| `unstructured_prop/` | Proprietary extensions to `unstructured` |
| `unstructured_inference_prop/` | Proprietary extensions to `unstructured-inference` |
| `unstructured-api/` | FastAPI service entry point |

## Installation

```bash
make install
```

Requires `UV_EXTRA_INDEX_URL` for the private Azure DevOps PyPI registry.

## Testing

```bash
make test-unit
```

## Benchmarks

Benchmarks live in `.codeflash/benchmarks/` and use pytest-benchmark.

```bash
# Run all benchmarks (pin to 1 CPU to match production pod)
taskset -c 0 .venv/bin/python -m pytest .codeflash/benchmarks/ -v

# Fast iteration (1-page fixture only)
taskset -c 0 .venv/bin/python -m pytest .codeflash/benchmarks/ -v -k "1p"
```

## Production Profile

- **Runtime**: Knative
- **CPU**: 1 request
- **RAM**: 32 GB
- **Benchmark VM**: Azure Standard_E4s_v5, `taskset -c 0` to match
