Repository navigation
Make the README's python fences runnable in document order - #242
Merged
Merged
Conversation
The "Linear solver backends" snippet used `scs`, `data` and `cone` roughly 45 lines before anything defined them, so running the README's python fences in order failed with `NameError: name 'scs' is not defined`. It now sets up a minimal LP first. The Usage fence built `A` with an unseeded `sp.random` while its comment asserted the status would be 'solved'; seeded so the documented output is actually reproducible. Closes bodono#239 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #239
The "Linear solver backends" snippet used
scs,dataandconeabout 45 lines before anything defined them, so running the README's python fences in order failed:It now sets up a minimal LP first, so the section stands on its own.
Second change in the same spirit: the Usage fence built
Awith an unseededsp.randomwhile its comment asserted the printed status would be'solved'. Seeded so the documented output is actually reproducible.Verified with the doc-example checker (executed in a venv with the package built and installed, so this isn't a missing-dependency artefact) — exits 0, no violations.
🤖 Generated with Claude Code