diff --git a/.travis.yml b/.travis.yml index dd3c45d..723226c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,17 +4,12 @@ os: - linux - osx julia: - - 0.6 + - 0.7 + - nightly notifications: email: false git: depth: 99999999 - -addons: - apt: - packages: - - liblzma-dev - after_success: # push coverage results to Codecov - julia -e 'cd(Pkg.dir("StatFiles")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())' diff --git a/LICENSE.md b/LICENSE.md index 5eaaaa3..88238bb 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ The StatFiles.jl package is licensed under the MIT "Expat" License: -> Copyright (c) 2017: David Anthoff. +> Copyright (c) 2017-2018: David Anthoff. > > > Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/NEWS.md b/NEWS.md index 62bcba1..dd15363 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,6 @@ +# StatFiles.jl v0.6.0 +* Drop julia 0.6 support, add julia 0.7 support + # StatFiles.jl v0.5.0 * Add show method diff --git a/REQUIRE b/REQUIRE index 2eb4161..dc629b8 100644 --- a/REQUIRE +++ b/REQUIRE @@ -1,9 +1,9 @@ -julia 0.6 -TableTraits 0.0.3 -ReadStat 0.3.0 -IterableTables 0.5.0 -DataValues 0.3.0 -FileIO 0.9.0 -TableTraitsUtils 0.1.2 -IteratorInterfaceExtensions 0.0.2 -TableShowUtils 0.0.1 +julia 0.7- +TableTraits 0.3.0 +ReadStat 0.4.0 +IterableTables 0.8.0 +DataValues 0.4.1 +FileIO +TableTraitsUtils 0.2.0 +IteratorInterfaceExtensions 0.1.0 +TableShowUtils 0.1.0 diff --git a/appveyor.yml b/appveyor.yml index 106f971..cef7280 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,14 +1,17 @@ environment: matrix: - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe" - - JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe" + - julia_version: 0.7 + - julia_version: latest + +platform: + - x86 + - x64 ## uncomment the following lines to allow failures on nightly julia ## (tests will run but not make your overall status red) #matrix: # allow_failures: -# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x86/julia-latest-win32.exe" -# - JULIA_URL: "https://julialangnightlies-s3.julialang.org/bin/winnt/x64/julia-latest-win64.exe" +# - julia_version: latest branches: only: @@ -22,24 +25,12 @@ notifications: on_build_status_changed: false install: - - ps: "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12" -# If there's a newer build queued for the same PR, cancel this one - - ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod ` - https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | ` - Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { ` - throw "There are newer queued builds for this pull request, failing early." } -# Download most recent Julia Windows binary - - ps: (new-object net.webclient).DownloadFile( - $env:JULIA_URL, - "C:\projects\julia-binary.exe") -# Run installer silently, output to C:\projects\julia - - C:\projects\julia-binary.exe /S /D=C:\projects\julia + - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/master/bin/install.ps1')) build_script: -# Need to convert from shallow to complete for Pkg.clone to work - - IF EXIST .git\shallow (git fetch --unshallow) - - C:\projects\julia\bin\julia -e "versioninfo(); - Pkg.clone(pwd(), \"StatFiles\"); Pkg.build(\"StatFiles\")" + - echo "%JL_BUILD_SCRIPT%" + - julia -e "%JL_BUILD_SCRIPT%" test_script: - - C:\projects\julia\bin\julia -e "Pkg.test(\"StatFiles\")" + - echo "%JL_TEST_SCRIPT%" + - julia -e "%JL_TEST_SCRIPT%" diff --git a/test/runtests.jl b/test/runtests.jl index 74de53d..a560869 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,33 +1,32 @@ using StatFiles using IteratorInterfaceExtensions using TableTraits -using NamedTuples using DataValues -using Base.Test +using Test @testset "StatFiles" begin ar = load("types.dta") |> IteratorInterfaceExtensions.getiterator |> collect @test length(ar) == 3 -@test ar[1] == @NT(vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) -@test ar[2] == @NT(vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) -@test ar[3] == @NT(vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) +@test ar[1] == (vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) +@test ar[2] == (vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) +@test ar[3] == (vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) ar = load("types.sas7bdat") |> IteratorInterfaceExtensions.getiterator |> collect @test length(ar) == 3 -@test ar[1] == @NT(vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) -@test ar[2] == @NT(vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) -@test ar[3] == @NT(vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) +@test ar[1] == (vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) +@test ar[2] == (vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) +@test ar[3] == (vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) ar = load("types.sav") |> IteratorInterfaceExtensions.getiterator |> collect @test length(ar) == 3 -@test ar[1] == @NT(vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) -@test ar[2] == @NT(vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) -@test ar[3] == @NT(vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) +@test ar[1] == (vfloat=DataValue{Float32}(3.14), vdouble=DataValue(3.14), vlong=DataValue{Int32}(2), vint=DataValue{Int16}(2), vbyte=DataValue{Int8}(2), vstring=DataValue("2")) +@test ar[2] == (vfloat=DataValue{Float32}(7.), vdouble=DataValue(7.), vlong=DataValue{Int32}(7), vint=DataValue{Int16}(7), vbyte=DataValue{Int8}(7), vstring=DataValue("7")) +@test ar[3] == (vfloat=DataValue{Float32}(), vdouble=DataValue{Float64}(), vlong=DataValue{Int32}(), vint=DataValue{Int16}(), vbyte=DataValue{Int8}(), vstring=DataValue("")) end