Skip to content

Conversation

@ChrisRackauckas-Claude
Copy link

Summary

This PR fixes the deprecated ODEProblem API calls in the documentation to use the new API that was introduced in recent versions of ModelingToolkit.jl.

Changes

Updated the following documentation files to replace the deprecated 4-argument ODEProblem(sys, u0, tspan, p) signature with the new 3-argument signature where initial conditions and parameters are merged:

  1. docs/src/tutorials/ode_modeling.md (Line 39)

    • Changed: ODEProblem(fol, [], (0.0, 10.0), [])
    • To: ODEProblem(fol, [], (0.0, 10.0))
  2. docs/src/tutorials/programmatically_generating.md (Line 52)

    • Changed: ODEProblem(fol, [], (0.0, 10.0), [])
    • To: ODEProblem(fol, [], (0.0, 10.0))
  3. docs/src/basics/Events.md (Lines 421, 442)

    • Changed: ODEProblem(sys, [x => 0.0], (0.0, 2pi), [c => 1.0])
    • To: ODEProblem(sys, [x => 0.0, c => 1.0], (0.0, 2pi))
  4. docs/src/basics/Composition.md (Line 60)

    • Changed: ODEProblem(simplified_sys, x0, (0.0, 100.0), p)
    • To: ODEProblem(simplified_sys, [x0; p], (0.0, 100.0))

Impact

These changes eliminate deprecation warnings that users encounter when running the "Copy-Pastable Simplified Example" and other tutorial code from the documentation. The updated examples now use the current recommended API.

Test Plan

  • Documentation builds successfully without errors
  • Example code blocks run without deprecation warnings
  • CI tests pass

Fixes #3996

🤖 Generated with Claude Code

Updated documentation to use the new ODEProblem API that was introduced
to replace the deprecated 4-argument signature. Changes include:

- Changed ODEProblem(sys, u0, tspan, p) to ODEProblem(sys, [u0; p], tspan)
- Changed ODEProblem(sys, [], tspan, []) to ODEProblem(sys, [], tspan)

This fixes the deprecation warnings in the "Copy-Pastable Simplified Example"
and other tutorial sections.

Files modified:
- docs/src/tutorials/ode_modeling.md: Line 39
- docs/src/tutorials/programmatically_generating.md: Line 52
- docs/src/basics/Events.md: Lines 421, 442
- docs/src/basics/Composition.md: Line 60

Fixes SciML#3996

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@ChrisRackauckas-Claude
Copy link
Author

Implementation Process

Discovery Phase

  1. Viewed issue Deprecated calling of ODEProblem in the getting-started "Copy-Pastable Simplified Example" #3996 to understand the problem: The getting started documentation was using the deprecated ODEProblem(sys, u0, tspan, p) API
  2. Searched the codebase for all instances of the deprecated 4-argument ODEProblem calls
  3. Analyzed each occurrence to determine which were in documentation vs test/source code
  4. Focused on documentation files only as per the issue requirements

Changes Made

Updated 4 documentation files with 5 total changes:

  • docs/src/tutorials/ode_modeling.md: Fixed the "Copy-Pastable Simplified Example" that was reported in the issue
  • docs/src/tutorials/programmatically_generating.md: Fixed similar example
  • docs/src/basics/Events.md: Fixed 2 occurrences where parameters and initial conditions were separated
  • docs/src/basics/Composition.md: Fixed 1 occurrence using the [x0; p] syntax to merge arrays

Notes

  • Only documentation (markdown) files were modified
  • No Julia source code changes were made
  • The fixes follow the new API pattern where initial conditions and parameters are merged into a single array argument
  • Examples now match the current best practices shown in the deprecation message

Next Steps

  • Waiting for CI to complete
  • Will address any CI failures if they occur

@ChrisRackauckas-Claude
Copy link
Author

⎿ Setting 2-hour timer for CI completion as per CLAUDE.md instructions...
Current time: Wed Oct 29 09:29 AM EDT 2025
Will check CI results at: Wed Oct 29 11:29 AM EDT 2025

Based on analysis of recent PRs (e.g., #3997), typical CI runtime is 1-2 hours for full test suite.
Since this PR only modifies documentation (markdown files), CI should complete faster.

@ChrisRackauckas-Claude
Copy link
Author

Format Check Status Update

The Format Check has failed, but this appears to be expected behavior based on recent PRs:

Pattern observed:

  • ❌ Format Check / Check Formatting / Check Formatting: FAILURE
  • ✅ Format Check / Comment Formatting Suggestions on PR: SUCCESS

Since only markdown files were modified in this PR (no Julia source code), and recent merged PRs show the same pattern, this format check failure does not appear to be a blocker for merging.

The main CI tests (build and test suite) are still running.

@ChrisRackauckas
Copy link
Member

RROR: LoadError: HTMLSizeThresholdError: Some generated HTML files are above size_threshold.
See logged errors for details.

😅 but unrelated.

@ChrisRackauckas ChrisRackauckas merged commit cc3f4bd into SciML:master Oct 29, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecated calling of ODEProblem in the getting-started "Copy-Pastable Simplified Example"

2 participants