docs: pre-0.5.0 doc cleanup#265
Merged
Merged
Conversation
- Fix broken intra-doc links in twine-observers lib.rs: PlotObserver and ShowConfig are behind the plot feature gate, so the links broke when docs built without it. Use cfg_attr to include linked text only when the feature is active. - Add crate-level docs to twine-core: describes the shared abstractions (Model, Snapshot, Observer, problem traits) that make up the crate. - Add module-level docs to twine-solvers equation and optimization modules: explains the role of each module and lists the available solvers. - Clarify in README that GoodEnough is an example observer, not a real type, and that the point is its genericity over capability traits.
The capability traits live in twine_observers::traits, not at the crate root. The old import wouldn't compile.
dyreby
added a commit
that referenced
this pull request
Feb 28, 2026
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 #263.
Changes
twine-observers/src/lib.rs— ThePlotObserverandShowConfigintra-doc links in the Features section broke when docs built without theplotfeature. Replaced the//!bullet with twocfg_attrblocks: one that includes the linked form whenfeature = "plot"is active, and one with plain backtick names otherwise.crates/core/src/lib.rs— Added crate-level//!docs listing the shared abstractions the crate provides (Model,Snapshot,Observer, and the problem traits).crates/solvers/src/equation.rsandoptimization.rs— Added module-level//!docs describing the module's role and listing available solvers.README.md(beyond original issue scope):GoodEnoughparagraph to make clear it's an example illustrating cross-solver genericity via capability traits, not a real framework type.twine_observers::{HasResidual, CanStopEarly}should betwine_observers::traits::{...}. The traits aren't re-exported at the crate root, so the old code wouldn't compile.Verification
cargo doc --workspace --no-deps— no warningscargo test --workspace— all passcargo clippy --workspace -- -D warnings— cleancargo fmt --check— clean