JuliaStats / RDatasets.jl

Julia package for loading many of the data sets available in R
GNU General Public License v3.0
160 stars 56 forks source link

fix read_rda deprecated error #43

Closed boathit closed 8 years ago

boathit commented 8 years ago

Replace read_rda with FileIO.load

nalimilan commented 8 years ago

Thanks! I think you need to add RData to the REQUIRES file to fix the test failure.

boathit commented 8 years ago

@nalimilan Yeah, sure. RData is required.

nalimilan commented 8 years ago

Could you also stop testing Julia 0.3 in .travis.yml? RData.jl doesn't support it. Then it should be good to go.

@johnmyleswhite Could you merge this when ready? Then I can tag a release for you. (BTW, you might consider moving the package to JuliaStats if you don't want to have to maintain it.)

randyzwitch commented 8 years ago

I can merge and tag when ready

On Sep 5, 2016, at 8:00 AM, Milan Bouchet-Valat notifications@github.com wrote:

Could you also stop testing Julia 0.3 in .travis.yml? RData.jl doesn't support it. Then it should be good to go.

@johnmyleswhite Could you merge this when ready? Then I can tag a release for you. (BTW, you might consider moving the package to JuliaStats if you don't want to have to maintain it.)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

nalimilan commented 8 years ago

Cool. It's ready AFAICT.

ararslan commented 8 years ago

I'm actually a little confused by this. In DataFrames we've deprecated read_rda in favor of FileIO.load, but it should still be calling FileIO.load with a warning. So while this change is good since read_rda is deprecated, I think it also reveals an issue in DataFrames.

tlnagy commented 8 years ago

Any updates on this? It would be great to having RDatasets working with the DataFrames as soon as possible.

ararslan commented 8 years ago

I have a tag pending for DataFrames that should fix the error, allowing things to work again. This PR is still good though, since rather than an error it will be a warning. +1 for merging.

tlnagy commented 8 years ago

@ararslan which PR are you referring to?

ararslan commented 8 years ago

@tlnagy This one, on RDatasets.jl, that changes read_rda to load.

tlnagy commented 8 years ago

Oh shoot. I meant the tag for DataFrames.

ararslan commented 8 years ago

https://github.com/JuliaLang/METADATA.jl/pull/6274?

tlnagy commented 8 years ago

Yeah, that includes this fix: https://github.com/JuliaStats/DataFrames.jl/pull/1056. Awesome. Thanks!

randyzwitch commented 8 years ago

Alright, merging since you folks say its ok. Will hold off on tagging until tomorrow, just to give everyone a few hours to really make sure this does what you want.

tlnagy commented 8 years ago

Can confirm that Gadfly tests pass locally with this change.

tlnagy commented 8 years ago

So tagging a new release of RDatasets is blocking for getting Gadfly tests to pass due to missing RData requirement. The latest release of DataFrames v0.8.2 still crashes.

WARNING: read_rda(args...) is deprecated, use FileIO.load(args...) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in read_rda(::String, ::Vararg{String,N}) at ./deprecated.jl:50
 in dataset(::String, ::String) at /Users/tamasnagy/.julia/v0.5/RDatasets/src/dataset.jl:6
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:442
 in run_tests(::String) at /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl:142
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/tamasnagy/.julia/v0.5/Gadfly/test/points.jl, in expression starting on line 4
WARNING: FileIO.NotInstalledError(:RData,"")
 in checked_import(::Symbol) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:12
 in #load#17(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:81
 in load(::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:73
 in #load#13(::Array{Any,1}, ::Function, ::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in load(::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in read_rda(::String, ::Vararg{String,N}) at ./deprecated.jl:52
 in dataset(::String, ::String) at /Users/tamasnagy/.julia/v0.5/RDatasets/src/dataset.jl:6
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:442
 in run_tests(::String) at /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl:142
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
Library RData is not installed but can load format: FileIO.File{FileIO.DataFormat{:RData}}("/Users/tamasnagy/.julia/v0.5/RDatasets/src/../data/datasets/iris.rda")
FAILED!
ERROR: LoadError: LoadError: RData is not installed.

 in checked_import(::Symbol) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:12
 in #load#17(::Array{Any,1}, ::Function, ::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:81
 in load(::FileIO.File{FileIO.DataFormat{:RData}}) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:73
 in #load#13(::Array{Any,1}, ::Function, ::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in load(::String) at /Users/tamasnagy/.julia/v0.5/FileIO/src/loadsave.jl:45
 in read_rda(::String, ::Vararg{String,N}) at ./deprecated.jl:52
 in dataset(::String, ::String) at /Users/tamasnagy/.julia/v0.5/RDatasets/src/dataset.jl:6
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:442
 in run_tests(::String) at /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl:142
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:262
 in _start() at ./client.jl:318
 in _start() at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/tamasnagy/.julia/v0.5/Gadfly/test/points.jl, in expression starting on line 4
while loading /Users/tamasnagy/.julia/v0.5/Gadfly/test/runtests.jl, in expression starting on line 187
===================================================[ ERROR: Gadfly ]====================================================
ararslan commented 8 years ago

Sounds like DataFrames needs the RData dependency after all? cc @nalimilan and @andreasnoack

andreasnoack commented 8 years ago

RData is a dependency of RDatasets so why is it not getting installed?

tlnagy commented 8 years ago

Is it a dependency for the tagged version in METADATA.jl? I think that one is still the old version.

tlnagy commented 8 years ago

We use the latest tagged version of RDatasets for Gadfly's tests.

ararslan commented 8 years ago

Is it a dependency for the tagged version in METADATA.jl? I think that one is still the old version.

The latest tagged version here includes the RData requirement, and there's a PR for the tag on METADATA. See https://github.com/JuliaLang/METADATA.jl/pull/6279. So the version exists but is not yet installable.

tlnagy commented 8 years ago

Looks like there's a versioning problem: https://travis-ci.org/JuliaLang/METADATA.jl/builds/158144062

ararslan commented 8 years ago

Ah yes, it should have been tagged as a minor release rather than a patch since the Julia version requirement changed. cc @randyzwitch

randyzwitch commented 8 years ago

Thanks for the notification, I’ll fix this in the next few minutes.

On Sep 7, 2016, at 1:12 PM, Alex Arslan notifications@github.com wrote:

Ah yes, it should have been tagged as a minor release rather than a patch. cc @randyzwitch https://github.com/randyzwitch — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/johnmyleswhite/RDatasets.jl/pull/43#issuecomment-245351637, or mute the thread https://github.com/notifications/unsubscribe-auth/ACooI62qq6RoEGw4qfYfNlnr4udE2wHcks5qnvCNgaJpZM4J01Jl.

randyzwitch commented 8 years ago

Bumped

https://github.com/JuliaLang/METADATA.jl/pull/6279/files