Skip to content

Conversation

@AayushSabharwal
Copy link
Member

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

Add any other context about the problem here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remaining comments which cannot be posted as a review comment to avoid GitHub Rate Limit

JuliaFormatter

[JuliaFormatter] reported by reviewdog 🐶

SymbolicUtils.promote_symtype(::typeof(instream_rt), ::Type{T}, ::Type{S}, ::Type{R}) where {T, S, R} = Real


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

const MaybeArrayIndexT = Union{Int, UnitRange{Int}, Base.ReshapedArray{Int, N, UnitRange{Int}} where {N}}


[JuliaFormatter] reported by reviewdog 🐶

parse_callbacks_for_discretes!(cevs, disc_param_callbacks, constant_buffers, nonnumeric_buffers, 0)
parse_callbacks_for_discretes!(devs, disc_param_callbacks, constant_buffers, nonnumeric_buffers, length(cevs))


[JuliaFormatter] reported by reviewdog 🐶

push!(disc_syms_by_symtype_by_partition[i], filter(==(partition) Base.Fix1(getindex, disc_param_callbacks), buffer))


[JuliaFormatter] reported by reviewdog 🐶

push!(disc_buffer_templates, map(Base.Fix1(BufferTemplate, symtype) length, disc_syms_by_partition))


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f, args) => begin
f === getindex && (idx = get(disc_idxs, args[1], nothing)) !== nothing
end
_ => false


[JuliaFormatter] reported by reviewdog 🐶

function parse_callbacks_for_discretes!(events::Vector, disc_param_callbacks::Dict{SymbolicT, BitSet}, constant_buffers::Dict{TypeT, Set{SymbolicT}}, nonnumeric_buffers::Dict{TypeT, Set{SymbolicT}}, offset::Int)


[JuliaFormatter] reported by reviewdog 🐶

function SymbolicIndexingInterface.parameter_index(ic::IndexCache, sym::Union{Num, Symbolics.Arr, Symbolics.CallAndWrap})


[JuliaFormatter] reported by reviewdog 🐶

function check_index_map(idxmap::Dict{SymbolicT, V}, sym::SymbolicT)::Union{V, Nothing} where {V}


[JuliaFormatter] reported by reviewdog 🐶

mask[i] = !iscall(eq.rhs) || operation(eq.rhs) !== StructuralTransformations.change_origin


[JuliaFormatter] reported by reviewdog 🐶

if (checks isa Bool && checks === true || checks isa Int && (checks & CheckComponents) > 0) && iv !== nothing


[JuliaFormatter] reported by reviewdog 🐶


[JuliaFormatter] reported by reviewdog 🐶

fullvars[i], discmap; filterer = Symbolics.FPSubFilterer{Union{Sample, Hold, Pre}}()))


[JuliaFormatter] reported by reviewdog 🐶

issym(op) && return SSym(nameof(op); type = FnType{Tuple{symtype(iv)}, Real}, shape = SU.ShapeVecT())(iv)


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f) && if f isa Differential end => begin


[JuliaFormatter] reported by reviewdog 🐶

function process_variables!(var_to_name::Dict{Symbol, SymbolicT}, defs::SymmapT, guesses::SymmapT, vars::Vector{SymbolicT})


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f, args) && if f === getindex end => args[1]


[JuliaFormatter] reported by reviewdog 🐶

hasmetadata(x, VariableSource) || iscall(x) && operation(x) === getindex && isvariable(arguments(x)[1])::Bool


[JuliaFormatter] reported by reviewdog 🐶

function collect_scoped_vars!(unknowns::OrderedSet{SymbolicT}, parameters::OrderedSet{SymbolicT}, sys::AbstractSystem, iv::Union{SymbolicT, Nothing}; depth = 1, op = Differential)


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f) && if f isa O end => true


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f) && if f isa Operator end => f isa O


[JuliaFormatter] reported by reviewdog 🐶

function collect_vars!(unknowns::OrderedSet{SymbolicT}, parameters::OrderedSet{SymbolicT}, expr::SymbolicT, iv::Union{SymbolicT, Nothing}; depth = 0, op = Symbolics.Operator)


[JuliaFormatter] reported by reviewdog 🐶

function collect_vars!(unknowns::OrderedSet{SymbolicT}, parameters::OrderedSet{SymbolicT}, expr::AbstractArray{SymbolicT}, iv::Union{SymbolicT, Nothing}; depth = 0, op = Symbolics.Operator)


[JuliaFormatter] reported by reviewdog 🐶

check_scope_depth(getmetadata(var, SymScope, LocalScope())::AllScopes, depth) || return nothing


[JuliaFormatter] reported by reviewdog 🐶

iscall(x) && operation(x) === getindex && return safe_getmetadata(m, arguments(x)[1], default)


[JuliaFormatter] reported by reviewdog 🐶

BSImpl.Term(; f, args, shape, type, metadata) && if f isa Operator end => begin


[JuliaFormatter] reported by reviewdog 🐶

getunshifted(x::SymbolicT) = Symbolics.getmetadata(x, VariableUnshifted, nothing)::Union{SymbolicT, Nothing}

@AayushSabharwal AayushSabharwal changed the title [WIP] refactor: update to SymbolicUtils@4 and Symbolics@7 refactor: update to SymbolicUtils@4 and Symbolics@7 Dec 5, 2025
@AayushSabharwal AayushSabharwal marked this pull request as ready for review December 5, 2025 11:52
@AayushSabharwal AayushSabharwal merged commit a78cf3a into master Dec 5, 2025
11 of 114 checks passed
@AayushSabharwal AayushSabharwal deleted the as/su-v4 branch December 5, 2025 13:24
@hersle hersle mentioned this pull request Dec 5, 2025
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.

3 participants