-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing deprecations in previously not included functions #3
Conversation
Pull Request Test Coverage Report for Build 83
💛 - Coveralls |
Pull Request Test Coverage Report for Build 85
💛 - Coveralls |
Codecov Report
@@ Coverage Diff @@
## master #3 +/- ##
===========================================
+ Coverage 62.08% 87.77% +25.68%
===========================================
Files 18 15 -3
Lines 240 229 -11
===========================================
+ Hits 149 201 +52
+ Misses 91 28 -63
Continue to review full report at Codecov.
|
Thank you for your contribution! Could I bother you to move the functions you need to the respective alphabetical file? I orginally wanted to group them by functionality but lost track due to the large number of functions in SPICE. If you don't have the time I will merge and move them myself. |
No Problem. Somewhere this week I will move everything to be in the correct alphabetical order. Additionally, I will also include some tests of the functions to improve the code coverage. |
Updated the branch, including additional tests. Not sure about the codecov/patch, maybe I don't fully understand how that features works yet. |
matrix = [1. 1. 1. | ||
2. 3. 4.] | ||
vecgood = [1., 2., 3.] | ||
@test mxvg(matrix, vecgood) == [6.,20.] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that CSPICE expects the matrix to be in row-major order whereas Julia uses column-major order.
We need to pass the transpose of the input matrix to the C code, e.g.:
function mxvg(m1, v2)
lm1, lm2 = size(m1)
lv = length(v2)
if lm2 != lv
error("Dimension mismatch.")
end
vout = Array{Float64}(lm1)
ccall((:mxvg_c, libcspice), Void, (Ptr{Float64}, Ptr{Float64}, Cint, Cint, Ptr{Float64}),
#= use transpose =# m1', v2, lm1, lm2, vout)
handleerror()
return vout
end
That was indeed the problem! It is working now. |
Please activate the test and then this is good to go 👍 Thank you! (BTW: You might want to add the email address you use for your Git commits to your GitHub account. This way they become associated to your account and become clickable in the interface.) |
Dear Maintainers,
Within the "Spice.jl" module definition, I included the files "constants.jl", "math.jl", "pck.jl", and "spk.jl". I required the use of the functions already created in these files, yet were previously not exported. Additionally, some deprecation warnings were fixed in those files regarding array definitions.
Please consider my changes.
With kind regards,
Dennis Brinkman