Skip to content

build: support SymbolicUtils 4 / Symbolics 7#74

Open
oameye wants to merge 1 commit into
mainfrom
symbolicsv7-upgrade
Open

build: support SymbolicUtils 4 / Symbolics 7#74
oameye wants to merge 1 commit into
mainfrom
symbolicsv7-upgrade

Conversation

@oameye
Copy link
Copy Markdown
Member

@oameye oameye commented May 25, 2026

  • substitute_all now recurses into callable variable arguments by passing filterer = _ -> true to SymbolicUtils.substitute, matching the pre-SU 4 behaviour where substitute(x(t), t => T) reached inside x(t).
  • is_trig compares the operation against cos / sin with === so that a callable variable head (e.g. v1(T)) no longer triggers symbolic in.
  • my_isnan(::BasicSymbolic) unwraps Const-wrapped numbers before calling isnan, so hasnan on a matrix of Num(NaN) returns true again.
  • Drop the now-unused Symbolics.substitute import.

Checklist

Thank you for contributing to QuestBase.jl! Please make sure you have finished the following tasks before finishing the PR.

  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in docs/ folder) related to code changes were updated and able to build locally by running: make docs.

Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.

Description

Describe the proposed change here.

Related issues or PRs

Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #[id]

Additional context

* `substitute_all` now recurses into callable variable arguments by passing
  `filterer = _ -> true` to `SymbolicUtils.substitute`, matching the pre-SU 4
  behaviour where `substitute(x(t), t => T)` reached inside `x(t)`.
* `is_trig` compares the operation against `cos` / `sin` with `===` so that a
  callable variable head (e.g. `v1(T)`) no longer triggers symbolic `in`.
* `my_isnan(::BasicSymbolic)` unwraps Const-wrapped numbers before calling
  `isnan`, so `hasnan` on a matrix of `Num(NaN)` returns `true` again.
* Drop the now-unused `Symbolics.substitute` import.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 25, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.80%. Comparing base (273c52f) to head (83f2fab).

Files with missing lines Patch % Lines
src/utils.jl 0.00% 4 Missing ⚠️
src/Symbolics/Symbolics_utils.jl 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
- Coverage   82.20%   81.80%   -0.40%     
==========================================
  Files          10       10              
  Lines         500      511      +11     
==========================================
+ Hits          411      418       +7     
- Misses         89       93       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant