cluster-deps-optional-with-graceful-skip
IN premise
The clustering module (`reasons_lib.cluster`) is behind an optional `[cluster]` install extra; when `sentence-transformers` or `scikit-learn` are missing, `_require_cluster_deps` raises `ImportError` and all dependent tests skip cleanly.
Summary
The clustering feature is designed as an optional add-on rather than a core requirement. If the machine learning libraries it needs aren't installed, the system detects this upfront and raises a clear error, and the test suite gracefully skips those tests instead of failing — so the rest of the system works fine without it.
Details
| Source | entries/2026/05/08/tests-test_cluster.md |