Skip to content

Fix deprecated ODESystem and @mtkbuild usage in documentation examples #3856

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

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

ChrisRackauckas
Copy link
Member

Summary

  • Replace deprecated ODESystem with System constructor in README examples
  • Replace deprecated @mtkbuild with @mtkcompile macro in demo.jl
  • Update user-facing documentation to use current recommended syntax

Changes Made

  • README.md: Fixed 3 instances of deprecated constructors and macros
  • demo.jl: Fixed 6 instances of @mtkbuild@mtkcompile

Motivation

These changes eliminate deprecation warnings that new users encounter when following documentation examples. The deprecation system properly redirects to new APIs, but updating examples prevents confusion.

Impact

  • ✅ Better user onboarding experience
  • ✅ Eliminates deprecation warnings in documentation
  • ✅ Maintains same functionality with modern syntax
  • ✅ No breaking changes (old APIs still work via deprecation layer)

Test plan

  • Changes tested with existing test suite
  • Documentation examples verified to work with new syntax
  • Deprecation warnings eliminated

🤖 Generated with Claude Code

claude added 2 commits July 30, 2025 05:18
- Replace ODESystem with System (new unified constructor)
- Replace @mtkbuild with @mtkcompile
- Addresses deprecation warnings for better user onboarding

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

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace @mtkbuild macro calls with @mtkcompile
- Addresses deprecation warnings in demo examples
- Maintains functionality while using new recommended syntax

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

Co-Authored-By: Claude <noreply@anthropic.com>
@ChrisRackauckas ChrisRackauckas merged commit 2f84042 into master Jul 30, 2025
35 of 50 checks passed
@ChrisRackauckas ChrisRackauckas deleted the fix-structural-simplify-deprecation branch July 30, 2025 09:41
Copy link
Contributor

Benchmark Results (Julia v1)

Time benchmarks
master 5d03220... master / 5d03220...
ODEProblem 0.0802 ± 0.0059 s 0.0808 ± 0.0055 s 0.993 ± 0.1
init 0.0574 ± 0.012 ms 0.0567 ± 0.012 ms 1.01 ± 0.31
large_parameter_init/ODEProblem 0.712 ± 0.015 s 0.703 ± 0.022 s 1.01 ± 0.038
large_parameter_init/init 0.1 ± 0.011 ms 0.1 ± 0.011 ms 0.999 ± 0.16
mtkcompile 0.0342 ± 0.00074 s 0.0341 ± 0.00045 s 1 ± 0.025
time_to_load 5.63 ± 0.027 s 5.58 ± 0.008 s 1.01 ± 0.005
Memory benchmarks
master 5d03220... master / 5d03220...
ODEProblem 0.578 M allocs: 18.8 MB 0.579 M allocs: 18.8 MB 0.999
init 0.815 k allocs: 0.0318 MB 0.815 k allocs: 0.0318 MB 1
large_parameter_init/ODEProblem 4.68 M allocs: 0.169 GB 4.68 M allocs: 0.169 GB 0.997
large_parameter_init/init 1.66 k allocs: 0.0712 MB 1.66 k allocs: 0.0712 MB 1
mtkcompile 0.232 M allocs: 8.08 MB 0.233 M allocs: 8.08 MB 0.999
time_to_load 0.159 k allocs: 11.2 kB 0.159 k allocs: 11.2 kB 1

Copy link
Contributor

Benchmark Results (Julia vlts)

Time benchmarks
master 5d03220... master / 5d03220...
ODEProblem 0.089 ± 0.0067 s 0.0878 ± 0.0072 s 1.01 ± 0.11
init 0.062 ± 0.0023 ms 0.0618 ± 0.0021 ms 1 ± 0.05
large_parameter_init/ODEProblem 0.73 ± 0.0058 s 0.726 ± 0.0037 s 1.01 ± 0.0094
large_parameter_init/init 0.113 ± 0.0034 ms 0.113 ± 0.0031 ms 1 ± 0.041
mtkcompile 0.0374 ± 0.0021 s 0.0368 ± 0.0013 s 1.02 ± 0.067
time_to_load 5.91 ± 0.04 s 5.99 ± 0.044 s 0.986 ± 0.0098
Memory benchmarks
master 5d03220... master / 5d03220...
ODEProblem 0.588 M allocs: 20 MB 0.588 M allocs: 20 MB 1
init 0.908 k allocs: 0.0479 MB 0.908 k allocs: 0.0479 MB 1
large_parameter_init/ODEProblem 4.61 M allocs: 0.177 GB 4.61 M allocs: 0.177 GB 0.999
large_parameter_init/init 1.75 k allocs: 0.0874 MB 1.75 k allocs: 0.0874 MB 1
mtkcompile 0.233 M allocs: 8.64 MB 0.233 M allocs: 8.64 MB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

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.

2 participants