Skip to content

Commit

Permalink
Fix runs
Browse files Browse the repository at this point in the history
  • Loading branch information
asinghvi17 committed Sep 10, 2024
1 parent 7b45854 commit 5a474ec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,19 @@ add Kerchunk Zarr#as/filters ZarrDatasets#as/dataset_from_store
```julia
using Kerchunk, Zarr

za = Zarr.zopen(Kerchunk.ReferenceStore("path/to/kerchunk/catalog.json"))
za = Zarr.zopen("reference://path/to/kerchunk/catalog.json")
# and treat it like any other Zarr array!
# You can even wrap it in YAXArrays.jl to get DimensionalData.jl accessors:
using YAXArrays
YAXArrays.open_dataset(za)
# or open it as a Rasters.RasterStack:
using Rasters
Rasters.RasterStack(
"reference://catalog.json",
source = Rasters.Zarrsource(),
lazy = true, # need to include this
) # source must be explicit

```

## Background
Expand Down
1 change: 1 addition & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ makedocs(;
"API" => "api.md",
"Source code" => literate_pages,
],
warnonly = true,
)

deploydocs(;
Expand Down
5 changes: 4 additions & 1 deletion src/referencestore.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ Files can also be generated, so we have to parse that and then actually material
=#

"""
ReferenceStore(filename_or_dict)
ReferenceStore(filename_or_dict) <: Zarr.AbstractStore
A `ReferenceStore` is a
Generally, you will only need to construct this if you have an in-memory
Dict or other representation.
"""
struct ReferenceStore{MapperType <: AbstractDict, HasTemplates} <: Zarr.AbstractStore
mapper::MapperType
Expand Down
6 changes: 4 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ using YAXArrays # to open a raster
using Test

@testset "Kerchunk.jl" begin
include("python_local_kerchunk.jl")
include("its_live.jl")
@static if !(Sys.iswindows())
include("python_local_kerchunk.jl")
end
include("its_live_catalog.jl")
end

0 comments on commit 5a474ec

Please sign in to comment.