b10263b4f2
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).
1.3 KiB
1.3 KiB
Getting Started
This guide prepares a fresh environment, builds the Rust extension, and validates the install.
1. Install dependencies
# 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
pip install .
# or editable mode for development
maturin develop --release
3. Quick verification
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
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 andmaturinis installed. - On Apple Silicon, set
export MACOSX_DEPLOYMENT_TARGET=12.0before building if you hit ABI errors. - Delete stale builds with
rm -rf build dist target *.egg-infothen reinstall.