build: support SymbolicUtils 4 / Symbolics 7#74
Open
oameye wants to merge 1 commit into
Open
Conversation
* `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 Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
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.
substitute_allnow recurses into callable variable arguments by passingfilterer = _ -> truetoSymbolicUtils.substitute, matching the pre-SU 4 behaviour wheresubstitute(x(t), t => T)reached insidex(t).is_trigcompares the operation againstcos/sinwith===so that a callable variable head (e.g.v1(T)) no longer triggers symbolicin.my_isnan(::BasicSymbolic)unwraps Const-wrapped numbers before callingisnan, sohasnanon a matrix ofNum(NaN)returnstrueagain.Symbolics.substituteimport.Checklist
Thank you for contributing to
QuestBase.jl! Please make sure you have finished the following tasks before finishing the PR.make test.juliaformatted by running:make format.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