Skip to content

Commit 6075edc

Browse files
authored
Merge pull request #53 from davidanthoff/julia-0.7
Update to julia 0.7
2 parents 731657c + e548fd1 commit 6075edc

File tree

6 files changed

+25
-20
lines changed

6 files changed

+25
-20
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ os:
33
- osx
44
- linux
55
julia:
6-
- 0.6
6+
- 0.7
7+
- nightly
78
notifications:
89
email: false
910
branches:

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ExcelReaders.jl v0.10.0 Release Notes
2+
* Drop julia 0.6 support, add julia 0.7 support
3+
14
# ExcelReaders.jl v0.9.0 Release Notes
25
* Drop support for DataFrames.
36
* Use Dates.Time.

REQUIRE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
julia 0.6
2-
DataValues
3-
PyCall 1.5
1+
julia 0.7-
2+
DataValues 0.4.1
3+
PyCall 1.17.1

appveyor.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
environment:
22
matrix:
33
# Releases
4-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
4+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
55
PYTHONDIR: "C:\\Python36"
66
PYTHON: "C:\\Python36\\python.exe"
77

8-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
8+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
99
PYTHONDIR: "C:\\Python36-x64"
1010
PYTHON: "C:\\Python36-x64\\python.exe"
1111

12-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.6/julia-0.6-latest-win32.exe"
12+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x86/0.7/julia-0.7-latest-win32.exe"
1313
PYTHONDIR: "use_conda"
1414
PYTHON: "use_conda"
1515

16-
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.6/julia-0.6-latest-win64.exe"
16+
- JULIA_URL: "https://julialang-s3.julialang.org/bin/winnt/x64/0.7/julia-0.7-latest-win64.exe"
1717
PYTHONDIR: "use_conda"
1818
PYTHON: "use_conda"
1919

src/ExcelReaders.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ __precompile__()
22

33
module ExcelReaders
44

5-
using PyCall, DataValues
5+
using PyCall, DataValues, Dates
66

77
export openxl, readxl, readxlsheet, ExcelErrorCell, ExcelFile, readxlnames, readxlrange
88

@@ -213,7 +213,7 @@ function get_cell_value(ws, row, col, wb)
213213
elseif celltype == xlrd[:XL_CELL_DATE]
214214
date_year,date_month,date_day,date_hour,date_minute,date_sec = xlrd[:xldate_as_tuple](cellval, wb[:datemode])
215215
if date_month==0
216-
return Base.Dates.Time(date_hour, date_minute, date_sec)
216+
return Time(date_hour, date_minute, date_sec)
217217
else
218218
return DateTime(date_year, date_month, date_day, date_hour, date_minute, date_sec)
219219
end
@@ -235,7 +235,7 @@ function readxl_internal(file::ExcelFile, sheetname::AbstractString, startrow::I
235235
return get_cell_value(ws, startrow, startcol, wb)
236236
else
237237

238-
data = Array{Any}(endrow-startrow+1,endcol-startcol+1)
238+
data = Array{Any}(undef,endrow-startrow+1,endcol-startcol+1)
239239

240240
for row in startrow:endrow
241241
for col in startcol:endcol

test/runtests.jl

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
using ExcelReaders
2-
using Base.Test
2+
using Dates
33
using PyCall
44
using DataValues
5+
using Test
56

67
@testset "ExcelReaders" begin
78

89
# TODO Throw julia specific exceptions for these errors
910
@test_throws PyCall.PyError openxl("FileThatDoesNotExist.xlsx")
1011
@test_throws PyCall.PyError openxl("runtests.jl")
1112

12-
filename = normpath(Pkg.dir("ExcelReaders"),"test", "TestData.xlsx")
13+
filename = normpath(@__DIR__, "TestData.xlsx")
1314
file = openxl(filename)
1415
@test file.filename == "TestData.xlsx"
1516

@@ -39,7 +40,7 @@ for f in [file, filename]
3940
@test data[2,9] == Date(2015,3,3)
4041
@test data[3,9] == DateTime(2015,2,4,10,14)
4142
@test data[4,9] == DateTime(1988,4,9,0,0)
42-
@test data[5,9] == Dates.Time(15,2,0)
43+
@test data[5,9] == Time(15,2,0)
4344
@test data[3,10] == DateTime(1950,8,9,18,40)
4445
@test DataValues.isna(data[5,10])
4546
@test isa(data[2,11], ExcelErrorCell)
@@ -67,7 +68,7 @@ for f in [file, filename]
6768
@test data[2,1] == 1.
6869
@test data[5,2] == "CCC"
6970
@test data[3,3] == false
70-
@test data[6,6] == Dates.Time(15,2,00)
71+
@test data[6,6] == Time(15,2,00)
7172
@test DataValues.isna(data[4,3])
7273
@test DataValues.isna(data[4,6])
7374

@@ -76,7 +77,7 @@ for f in [file, filename]
7677
@test data[2,1] == 1.
7778
@test data[5,2] == "CCC"
7879
@test data[3,3] == false
79-
@test data[6,6] == Dates.Time(15,2,00)
80+
@test data[6,6] == Time(15,2,00)
8081
@test DataValues.isna(data[4,3])
8182
@test DataValues.isna(data[4,6])
8283

@@ -85,7 +86,7 @@ for f in [file, filename]
8586
@test data[2+7,1+3] == 1.
8687
@test data[5+7,2+3] == "CCC"
8788
@test data[3+7,3+3] == false
88-
@test data[6+7,6+3] == Dates.Time(15,2,00)
89+
@test data[6+7,6+3] == Time(15,2,00)
8990
@test DataValues.isna(data[4+7,3+3])
9091
@test DataValues.isna(data[4+7,6+3])
9192

@@ -94,7 +95,7 @@ for f in [file, filename]
9495
@test data[2+7,1] == 1.
9596
@test data[5+7,2] == "CCC"
9697
@test data[3+7,3] == false
97-
@test data[6+7,6] == Dates.Time(15,2,00)
98+
@test data[6+7,6] == Time(15,2,00)
9899
@test DataValues.isna(data[4+7,3])
99100
@test DataValues.isna(data[4+7,6])
100101

@@ -103,7 +104,7 @@ for f in [file, filename]
103104
@test data[2,1+3] == 1.
104105
@test data[5,2+3] == "CCC"
105106
@test data[3,3+3] == false
106-
@test data[6,6+3] == Dates.Time(15,2,00)
107+
@test data[6,6+3] == Time(15,2,00)
107108
@test DataValues.isna(data[4,3+3])
108109
@test DataValues.isna(data[4,6+3])
109110

@@ -112,7 +113,7 @@ for f in [file, filename]
112113
@test data[2+6,1+2] == 1.
113114
@test data[5+6,2+2] == "CCC"
114115
@test data[3+6,3+2] == false
115-
@test_throws BoundsError data[6+6,6+2] == Dates.Time(15,2,00)
116+
@test_throws BoundsError data[6+6,6+2] == Time(15,2,00)
116117
@test DataValues.isna(data[4+6,2+2])
117118
end
118119
end

0 commit comments

Comments
 (0)