diff --git a/Project.toml b/Project.toml index be8017e..27ff9e8 100644 --- a/Project.toml +++ b/Project.toml @@ -29,7 +29,7 @@ Aqua = "0.8" Dates = "1" DocStringExtensions = "0.8, 0.9" Makie = "0.24" -ModelingToolkit = "10.3.0" +ModelingToolkit = "10.3, 11" OhMyThreads = "0.8" StructArrays = "0.7" Symbolics = "6,7" diff --git a/ext/SolarPositionModelingToolkitExt.jl b/ext/SolarPositionModelingToolkitExt.jl index 5e446bc..25b52f4 100644 --- a/ext/SolarPositionModelingToolkitExt.jl +++ b/ext/SolarPositionModelingToolkitExt.jl @@ -44,7 +44,7 @@ function SolarPositionBlock(; refraction = NoRefraction(), ) @parameters t0::DateTime = t0 [tunable = false] - @parameters observer::Observer = observer [tunable = false] + @parameters observer::typeof(observer) = observer [tunable = false] @parameters algorithm::SolarAlgorithm = algorithm [tunable = false] @parameters refraction::RefractionAlgorithm = refraction [tunable = false] @@ -69,8 +69,8 @@ function SolarPositionBlock(; eqs, t, [azimuth, elevation, zenith], - #=vars=#[t0, observer, algorithm, refraction]; - #=params=#name = name, + [t0, observer, algorithm, refraction]; + #=vars=#name = name,#=params=# ) end diff --git a/test/Project.toml b/test/Project.toml index c2655a2..d44d55b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -14,7 +14,7 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" [sources] -SolarPosition = {path = ".."} +SolarPosition = { path = ".." } [compat] Aqua = "0.8" diff --git a/test/linting.jl b/test/linting.jl index d664ece..a44423f 100644 --- a/test/linting.jl +++ b/test/linting.jl @@ -2,14 +2,14 @@ using SolarPosition using Test using Aqua: Aqua -using JET: JET @testset "Aqua tests" begin @info "...with Aqua.jl" Aqua.test_all(SolarPosition) end -if VERSION > v"1.11" # JET v0.10 requires Julia v1.12 +if VERSION > v"1.11" # JET v0.11 requires Julia v1.11+ and PrecompileTools 1.3.2+ + using JET: JET @testset "JET tests" begin @info "...with JET.jl" JET.test_package(SolarPosition; target_modules = (SolarPosition,)) diff --git a/test/test-mtk.jl b/test/test-mtk.jl index 2f2d93f..b8d839d 100644 --- a/test/test-mtk.jl +++ b/test/test-mtk.jl @@ -5,6 +5,7 @@ using SolarPosition: HUGHES, BENNETT, ARCHER, MICHALSKY, SG2 using ModelingToolkit: @named, @variables, @parameters, unknowns, System, mtkcompile using ModelingToolkit: t_nounits as t, D_nounits as D using Dates: DateTime +using TimeZones: @tz_str, astimezone using OrdinaryDiffEq using CairoMakie