RHEOS.jl
RHEOS.jl copied to clipboard
(jld2) load save not working
The new log uses OrderedDicts which causes issues for JLD2. See the following issues for more discusison:
https://github.com/JuliaCollections/DataStructures.jl/issues/467
https://github.com/JuliaIO/JLD2.jl/issues/112
https://github.com/JuliaIO/JLD2.jl/issues/122
https://github.com/JuliaIO/JLD2.jl/issues/123
It seems that importing OrderedCollections may alleviate this issue. But there was some discussion earlier about replacing JLD2 with a different binary format.
I don't mind which we use but JLD2 has a nice interface and generally works well (apart from this bug obviously). It is my understanding that it will be the standard julia binary format in the longer term (analogous to Python pickle).
leaving binary load + save functions commented out for now, and their respective tests.
All the linked issues in JLD2 are now fixed.
Loading and saving of RheoTimeData
and RheoFreqData
structs seem to be working on ubuntu-latest
and windows-latest
machines.
https://github.com/JuliaRheology/RHEOS.jl/actions/runs/463959316
Unfortunately I can't get tests passing on my local machine as I'm still using windows 7 and there appears to be this bug which will not be fixed:
https://github.com/JuliaIO/JLD2.jl/issues/153
I was able to get BSON.jl to work on Windows 7 though, which seems to be a bit simpler than JLD2 but probably does everything we need.
@akabla and @ab2425 -- maybe we can discuss what to do on this when you both have time? Once we decide on whether to use JLD2 or BSON we should be able to quite quickly fix this issue, and https://github.com/JuliaRheology/RHEOS.jl/issues/16 and add then add relevant tests + documentation for both.
Serialization seems to be the standard approach for Serialization. There should not be issues with the OrderedDict either, as we just use a normal Vector now.
https://docs.julialang.org/en/v1/stdlib/Serialization/