Files
optimiz-rs/docs/source/getting-started.md
T
ThotDjehuty b10263b4f2 docs: Rebrand OptimizR to Optimiz-rs throughout documentation
Updated Branding in ReadTheDocs:
-  All 'OptimizR' → 'Optimiz-rs' (17 files)
-  Project name in conf.py
-  HTML title and short title
-  All algorithm documentation
-  Getting started guide
-  Installation guide
-  Theory/mathematical foundations
-  Archive documentation

Documentation now consistently uses the new 'optimiz-rs' branding that
matches both PyPI and crates.io package names.

Note: Python module name 'optimizr' in import statements intentionally
unchanged (that's the actual module name).
2026-02-17 10:09:15 +01:00

54 lines
1.3 KiB
Markdown

# Getting Started
This guide prepares a fresh environment, builds the Rust extension, and validates the install.
## 1. Install dependencies
```bash
# Python deps for docs and benchmarks
python -m venv .venv
source .venv/bin/activate
pip install -r docs/requirements.txt
pip install maturin numpy
```
## 2. Build and install Optimiz-rs locally
```bash
pip install .
# or editable mode for development
maturin develop --release
```
## 3. Quick verification
```bash
python - <<'PY'
import optimizr
from optimizr import differential_evolution, HMM
print("Optimiz-rs version:", optimizr.__version__)
# Simple objective
f = lambda x: sum(v * v for v in x)
pt, val = differential_evolution(f, bounds=[(-2, 2)] * 3, maxiter=50)
print("DE ok →", round(float(val), 4))
model = HMM(n_states=2).fit([0.01, -0.02, 0.0, 0.03])
print("HMM states →", model.predict([0.01, -0.02, 0.0, 0.03]))
PY
```
## 4. Build docs locally
```bash
cd docs
make html # or: sphinx-build -b html source build/html
open build/html/index.html
```
## 5. Troubleshooting
- If the Rust extension fails to compile, ensure `rustc --version` ≥ 1.70 and `maturin` is installed.
- On Apple Silicon, set `export MACOSX_DEPLOYMENT_TARGET=12.0` before building if you hit ABI errors.
- Delete stale builds with `rm -rf build dist target *.egg-info` then reinstall.