-
-
Notifications
You must be signed in to change notification settings - Fork 232
Add docstring references to solver documentation for problem constructors #3857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
ChrisRackauckas
wants to merge
4
commits into
SciML:master
from
ChrisRackauckas:add-problem-docstring-references
Closed
Add docstring references to solver documentation for problem constructors #3857
ChrisRackauckas
wants to merge
4
commits into
SciML:master
from
ChrisRackauckas:add-problem-docstring-references
Conversation
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
…tors This adds comprehensive docstrings to all major problem constructors in ModelingToolkit.jl that reference the appropriate solver documentation for extended keyword arguments: - ODEProblem, SDEProblem, DAEProblem, BVProblem, DDEProblem, JumpProblem → DifferentialEquations.jl docs - NonlinearProblem → NonlinearSolve.jl docs - OptimizationProblem → Optimization.jl docs - LinearProblem → LinearSolve.jl docs Each docstring now clearly indicates that additional keyword arguments are supported beyond those listed, with links to the relevant solver documentation for complete details on available options. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Instead of only referencing generic solver documentation, the docstrings now point to ModelingToolkit's own problem building documentation as the primary reference, with solver-specific docs as secondary references. This provides better context for MTK-specific features and workflows while still pointing users to the underlying solver documentation for advanced options. All problem constructor docstrings now reference: 1. ModelingToolkit.jl problem building documentation (primary) 2. Relevant solver documentation (secondary) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…uctor docstrings Modified docs/src/API/problems.md to reference ModelingToolkit's exported problem constructors directly instead of always using SciMLBase references. This ensures that the generated documentation shows ModelingToolkit's enhanced docstrings that include references to both MTK's problem building documentation and the relevant solver documentation. Updated references: - ODEProblem, SDEProblem, JumpProblem → Now use MTK's enhanced docstrings - NonlinearProblem, OptimizationProblem, SteadyStateProblem → Now use MTK's enhanced docstrings - IntervalNonlinearProblem, DiscreteProblem, ImplicitDiscreteProblem → Now use MTK's enhanced docstrings Non-exported types (DAEProblem, DDEProblem, BVProblem, LinearProblem) still reference SciMLBase versions, but users calling these through ModelingToolkit will see the enhanced docstrings in the REPL help system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Updated @docs blocks in docs/src/API/problems.md to use proper Documenter.jl method signature syntax to catch ModelingToolkit's specific method dispatches. Now using explicit method signatures like: - SciMLBase.ODEProblem(::System, ::Any, ::Any) - SciMLBase.NonlinearProblem(::System, ::Any) - SciMLBase.OptimizationProblem(::System, ::Any) This ensures that Documenter.jl will find and display ModelingToolkit's enhanced docstrings that include references to both MTK's problem building documentation and the relevant solver documentation, instead of showing the generic SciMLBase docstrings. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
AayushSabharwal
requested changes
Jul 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs for problems/functions are done programmatically in src/problems/docs.jl
. Adding docstrings inline to the function constructors is not valid.
Well that's wrong haha. It should be using the docstring dispatch. |
1 similar comment
Well that's wrong haha. It should be using the docstring dispatch. |
ChrisRackauckas
added a commit
to ChrisRackauckas/ModelingToolkit.jl
that referenced
this pull request
Jul 30, 2025
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.
Summary
This PR adds comprehensive docstrings to all major problem constructors in ModelingToolkit.jl that reference the appropriate solver documentation for extended keyword arguments.
Changes Made
DifferentialEquations.jl References
NonlinearSolve.jl References
Other Solver References
Motivation
Previously, users had no clear indication that ModelingToolkit problem constructors accept additional keyword arguments beyond those explicitly listed. This led to confusion about available solver options.
Each docstring now includes:
kwargs...
are passed through to the solverTest Plan
🤖 Generated with Claude Code