From 5a474ec9bbe2aeddcec7411a05992d4de56bb873 Mon Sep 17 00:00:00 2001 From: Anshul Singhvi Date: Tue, 10 Sep 2024 14:33:30 -0700 Subject: [PATCH] Fix runs --- README.md | 10 +++++++++- docs/make.jl | 1 + src/referencestore.jl | 5 ++++- test/runtests.jl | 6 ++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4ce271b..841460a 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docs/make.jl b/docs/make.jl index 6aec4dc..66db018 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -80,6 +80,7 @@ makedocs(; "API" => "api.md", "Source code" => literate_pages, ], + warnonly = true, ) deploydocs(; diff --git a/src/referencestore.jl b/src/referencestore.jl index 5cf2bff..f80a520 100644 --- a/src/referencestore.jl +++ b/src/referencestore.jl @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 3322a62..ea8c25e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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