Skip to content

Commit 884b97c

Browse files
enable Aqua tests (issue #20)
1 parent dd486ca commit 884b97c

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

Project.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1717
[compat]
1818
CFTime = "0.1.1"
1919
DataStructures = "0.17, 0.18"
20+
Dates = "1"
2021
Preferences = "1.3"
21-
julia = "1.6"
22+
Printf = "1"
23+
Statistics = "1"
24+
julia = "1.6"

src/cfvariable.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ function Base.setindex!(v::CFVariable,data::Missing,indexes::TIndices...)
455455
v.var[indexes...] = fillvalue(v)
456456
end
457457

458-
function Base.setindex!(v::CFVariable,data::Union{T,Array{T,N}},indexes::TIndices...) where N where T <: Union{AbstractCFDateTime,DateTime,Union{Missing,DateTime,AbstractCFDateTime}}
458+
function Base.setindex!(v::CFVariable,data::Union{T,Array{T}},indexes::TIndices...) where T <: Union{AbstractCFDateTime,DateTime,Missing}
459459

460460
if calendar(v) !== nothing
461461
# can throw an convertion error if calendar attribute already exists and

src/rolling.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ end
1111

1212

1313
# multiple classes for overlapping groups
14-
struct MClass{N,TC}
15-
class::NTuple{N,TC}
14+
struct MClass{T <: NTuple}
15+
class::T
1616
end
1717

1818
Base.length(mc::MClass) = 1

test/Project.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
23
CFTime = "179af706-886a-5703-950a-314cd64e0468"
34
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
45
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
@@ -8,3 +9,6 @@ NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
89
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
910
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1011
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
12+
13+
[compat]
14+
Aqua = "0.8"

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ end
3434
include("test_groupby.jl")
3535
include("test_rolling.jl")
3636
end
37+
38+
@testset "aqua checks" begin
39+
include("test_aqua.jl")
40+
end

test/test_aqua.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using Aqua
22
using CommonDataModel
33

4-
Aqua.test_ambiguities(CommonDataModel)
4+
Aqua.test_all(CommonDataModel)

0 commit comments

Comments
 (0)