Skip to content

Commit 0d427c9

Browse files
test ambiguities
1 parent 9fe0df9 commit 0d427c9

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

Project.toml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,4 @@ DataStructures = "0.17, 0.18"
1616
DiskArrays = "0.3.22, 0.4"
1717
JSON = "0.21"
1818
Zarr = "0.9.2"
19-
julia = "1"
20-
21-
[extras]
22-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
23-
24-
[targets]
25-
test = ["Test"]
19+
julia = "1.6"

src/dataset.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ function ZarrDataset(url::AbstractString,mode = "r";
137137
zg = zgroup(store, "",attrs = Dict(attrib))
138138
iswritable = true
139139
end
140-
ZarrDataset(zg,parentdataset,dimensions,iswritable,maskingvalue)
140+
ZarrDataset(parentdataset,zg,dimensions,iswritable,maskingvalue)
141141
end
142142

143143

src/types.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11

2-
struct ZarrVariable{T,N,TZA,TZG} <: CDM.AbstractVariable{T,N} where TZA <: AbstractArray{T,N}
2+
struct ZarrVariable{T,N,TZA <: AbstractArray{T,N},TZG} <: CDM.AbstractVariable{T,N}
33
zarray::TZA
44
parentdataset::TZG
55
end
66

7-
struct ZarrDataset{TZ,TP,Tmaskingvalue} <: CDM.AbstractDataset
7+
struct ZarrDataset{TDS <: Union{CDM.AbstractDataset,Nothing},Tmaskingvalue,TZ} <: CDM.AbstractDataset
8+
parentdataset::TDS
89
zgroup::TZ
9-
parentdataset::TP
1010
dimensions::OrderedDict{Symbol,Int}
1111
iswritable::Bool
1212
maskingvalue::Tmaskingvalue

src/variable.jl

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

2-
Base.getindex(v::ZarrVariable,ij...) = v.zarray[ij...]
2+
Base.getindex(v::ZarrVariable,ij::Union{Integer,Colon,AbstractVector{<:Integer}}...) = v.zarray[ij...]
33
CDM.load!(v::ZarrVariable,buffer,ij...) = buffer .= view(v.zarray,ij...)
44

5-
function Base.setindex!(v::ZarrVariable,data,ij...)
5+
function Base.setindex!(v::ZarrVariable,data,ij::Union{Integer,Colon,AbstractVector{<:Integer}}...)
66
v.zarray[ij...] = data
77
end
88
Base.size(v::ZarrVariable) = size(v.zarray)

test/Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
23
CommonDataModel = "1fbeeb36-5f17-413c-809b-666fb144f157"
34
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
45
DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
56
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
67
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
78

89
[compat]
10+
Aqua = "0.8"
911
NCDatasets = "0.14"
1012
julia = "1"

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ using ZarrDatasets
55
include("test_cdm.jl")
66
include("test_multifile.jl")
77
include("test_write.jl")
8+
include("test_aqua.jl")
89
end

test/test_aqua.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using Aqua
2+
using ZarrDatasets
3+
4+
Aqua.test_ambiguities(ZarrDatasets)

0 commit comments

Comments
 (0)