Skip to content

Commit 84998da

Browse files
committed
fix tests
1 parent c6a2039 commit 84998da

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/datasets/datasetinterface.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ function get_global_attrs(ds) end
1616

1717
#Functions to be implemented for Dataset sinks
1818
"Initialize and return a handle to a new empty dataset"
19-
create_empty(T::Type,path) =
20-
error("create_empty not implemented for $T")
19+
function create_empty(T::Type,path,gatts) end
2120

2221
"""
2322
add_var(ds, T, name, s, dimlist, atts)

src/datasets/netcdf.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function add_var(p::NetCDFDataset, T::Type, varname, s, dimnames, attr;
5252
NetCDFVariable{T,length(s)}(p.filename,varname,(s...,))
5353
end
5454

55-
function create_empty(::Type{NetCDFDataset}, path, gatts)
55+
function create_empty(::Type{NetCDFDataset}, path, gatts=Dict())
5656
NetCDF.create(_->nothing, path, NcVar[], gatts = gatts)
5757
NetCDFDataset(path)
5858
end

src/datasets/zarr.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function add_var(p::ZarrDataset, a::AbstractArray, varname, dimnames, attr;
3434
a
3535
end
3636

37-
create_empty(::Type{ZarrDataset}, path, gatts) = ZarrDataset(zgroup(path, attrs=gatts))
37+
create_empty(::Type{ZarrDataset}, path, gatts=Dict()) = ZarrDataset(zgroup(path, attrs=gatts))
3838

3939
backendlist[:zarr] = ZarrDataset
4040
push!(backendregex, r"(.zarr$)|(.zarr/$)"=>ZarrDataset)

0 commit comments

Comments
 (0)