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

DataFrames not installed by default #1

Closed simonbyrne closed 11 years ago

simonbyrne commented 11 years ago

I don't know enough about the package system, but for some reason DataFrames isn't installed by default. Starting from a clean .julia directory:

julia> Pkg.add("RDatasets")
Installing RDatasets: v0.0.0
Cloning into 'RDatasets'...
remote: Counting objects: 582, done.
remote: Compressing objects: 100% (571/571), done.
remote: Total 582 (delta 7), reused 582 (delta 7)
Receiving objects: 100% (582/582), 10.53 MiB | 1.87 MiB/s, done.
Resolving deltas: 100% (7/7), done.

julia> load("RDatasets") 
Cannot find DataFrames.jl
 in realpath at file.jl:151
 in find_in_path at util.jl:197
 in require at util.jl:174
 in load_now at util.jl:228
 in load_now at util.jl:242
 in require at util.jl:176
at /Users/simon/.julia/RDatasets/src/RDatasets.jl:1
 in load_now at util.jl:228
 in load_now at util.jl:242
 in require at util.jl:176
 in load_now at util.jl:253
 in require at util.jl:176
johnmyleswhite commented 11 years ago

I'm not sure what's happening here. Maybe I have the wrong REQUIRE settings.

simonbyrne commented 11 years ago

I'm not sure either. But I did notice that other packages have requires files in METADATA.jl. e.g. https://github.com/JuliaLang/METADATA.jl/blob/master/ArgParse/versions/0.0.1/requires

johnmyleswhite commented 11 years ago

This should be fixed. @StefanKarpinski, why are we including a REQUIRE file in the package itself if we must also puts a requires file in METADATA.jl? Is the first file totally irrelevant?

StefanKarpinski commented 11 years ago

The idea is that what goes into METADATA just gets copied from the in-package REQUIRE file. However, one may publish a package version and subsequently discover that it actually has stricter requirements than one though when publishing it. You can edit METADATA without needing to push a new version of the package. Although fixing the package REQUIRE file and bumping the patch number is probably not a terrible idea, it's not required.

Another reason: when you check out a specific package version, like master, there is no longer going to generally be information in METADATA about what that particular version requires, so then you have to look at the REQUIRE file to figure out what it needs.