You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
README backend-selection snippet at README.md:39 is not runnable as shown #239
Subcategory: executable documentation Current → target: 6 → 8
Problem
The "Linear solver backends" snippet at README.md:39 is not self-contained:
# Auto-detect best backend (default)solver=scs.SCS(data, cone)
# Explicitly select a solversolver=scs.SCS(data, cone, linear_solver=scs.LinearSolver.QDLDL)
It uses scs, data and cone, none of which are defined until the Usage fence at README.md:85. Running the README's python fences in order fails:
README.md: python fences exited 1 — NameError: name 'scs' is not defined
(reproduced with check_doc_examples.py --source-root scs --run, executed in a venv with
the package built and installed, so this is not a missing-dependency artefact).
The Usage quickstart at README.md:85 itself is correct — verified in the same environment,
it prints status: solved and a populated aa_stats dict, and both LinearSolver.QDLDL and LinearSolver.ACCELERATE solve successfully. Only the earlier
snippet is unrunnable as shown.
Files / lines to change
README.md:39 — either add the three lines that define data and cone (plus import scs),
or move the backend-selection fence after the Usage section.
Done when
Running the README's python fences in document order exits 0.
Activity
Make the README's python fences runnable in document order