ModelParameters.jl
ModelParameters.jl copied to clipboard
Add unitful extension with convenience dispatches
This is a very minor addition, but I have been pirating these convenience dispatches in my own code for a while now. It would be nice to actually add them to the package via an extension.
@rafaqz I am getting a type inference test failure on 1.10.4 that appears unrelated to this PR (happens on master too). Are you aware of it?
Tables interface: Error During Test at /home/bgroenke/.julia/dev/ModelParameters/test/runtests.jl:156
Got exception outside of a @test
return type Model does not match inferred return type Any
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] macro expansion
@ ~/.julia/dev/ModelParameters/test/runtests.jl:180 [inlined]
[3] macro expansion
@ ~/.julia/juliaup/julia-1.10.4+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
[4] top-level scope
@ ~/.julia/dev/ModelParameters/test/runtests.jl:157
[5] include(fname::String)
@ Base.MainInclude ./client.jl:489
[6] top-level scope
@ none:6
[7] eval
@ ./boot.jl:385 [inlined]
[8] exec_options(opts::Base.JLOptions)
@ Base ./client.jl:291
[9] _start()
@ Base ./client.jl:552
Test Summary: | Pass Error Total Time
Tables interface | 9 1 10 2.6s
Oh not sure what that is from . Maybe Julia got worse at working out the type somewhere?. It seems we need go use Base.@assume_effects more and more to force these things.
Assuming there are no test failures, it would be great if we could merge this finally.
We can probably add some math to it as well... if not to AbstractNumbers.jl. I've been hitting some ambiguities between Params and units.
Sorry this took so long, hoping to be more responsive here fir the next few years
Oh, weren't there failing tests?
Ugh damn looks like there was, not sure how I missed that
Fixed in 36770b5