From c6e8a28e5e4349a0261b30288ff31ce7cea43d2c Mon Sep 17 00:00:00 2001 From: Alexey Stukalov Date: Fri, 10 Aug 2018 14:35:36 +0200 Subject: [PATCH] update to julia-0.7 --- .travis.yml | 3 ++- REQUIRE | 6 +++--- src/RDatasets.jl | 5 ++--- src/datasets.jl | 2 +- test/dataset.jl | 2 +- test/datasets.jl | 2 +- test/runtests.jl | 4 ++-- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index de798f5..ce62379 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,8 @@ language: julia os: - linux julia: - - 0.6 + - 0.7 + - 1.0 - nightly matrix: allow_failures: diff --git a/REQUIRE b/REQUIRE index 0f9bc94..ec3108d 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,7 +1,7 @@ -julia 0.6 +julia 0.7 Reexport -DataFrames 0.11.4 1.0.0 +DataFrames 0.13 RData 0.3 CodecZlib 0.4 CSV 0.2.3 -FileIO 0.5 +FileIO 1.0.0 diff --git a/src/RDatasets.jl b/src/RDatasets.jl index 3fd534f..30f9a29 100644 --- a/src/RDatasets.jl +++ b/src/RDatasets.jl @@ -1,7 +1,6 @@ -__precompile__() - module RDatasets - using Reexport, FileIO, CSV, CodecZlib + using Reexport, FileIO, RData, CSV, CodecZlib + using Printf: @sprintf @reexport using DataFrames export dataset diff --git a/src/datasets.jl b/src/datasets.jl index 73a4e7c..8f0b921 100644 --- a/src/datasets.jl +++ b/src/datasets.jl @@ -1,6 +1,6 @@ function datasets(package_name::AbstractString) d = datasets() - d[d[:Package] .== package_name, :] + d[findfirst(isequal(package_name), d[:Package]), :] end function datasets() diff --git a/test/dataset.jl b/test/dataset.jl index 318d095..8cb6914 100644 --- a/test/dataset.jl +++ b/test/dataset.jl @@ -1,5 +1,5 @@ @testset "Datasets validity" begin - goodname(sym) = ismatch(r"^[A-Za-z0-9_][A-Za-z0-9_.]*$", string(sym)) + goodname(sym) = occursin(r"^[A-Za-z0-9_][A-Za-z0-9_.]*$", string(sym)) allsets = RDatasets.datasets() for pkgsets in groupby(allsets, :Package) diff --git a/test/datasets.jl b/test/datasets.jl index 64af1a4..23bcab5 100644 --- a/test/datasets.jl +++ b/test/datasets.jl @@ -4,7 +4,7 @@ dfs_found = vcat(map(readdir(package_directory)) do directory fns = readdir(joinpath(package_directory, directory)) pkgs = fill(directory, length(fns)) - sets = replace.(fns, r"(\.(rda|csv|gz))+$", "") + sets = replace.(fns, Ref(r"(\.(rda|csv|gz))+$" => "")) DataFrame(Package = pkgs, Dataset = sets) end...) diff --git a/test/runtests.jl b/test/runtests.jl index 519cfc1..ca34a16 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,13 +3,13 @@ # using RDatasets -using Base.Test +using Test my_tests = ["packages.jl", "datasets.jl", "dataset.jl"] @testset "$my_test" for my_test in my_tests - info("Running $(my_test)...") + @info "Running $(my_test)..." include(my_test) end