-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
120da8d
commit 5ea1198
Showing
7 changed files
with
122 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/Manifest.toml | ||
/docs/Manifest.toml | ||
Manifest.toml | ||
/docs/build/ | ||
|
||
/test/ref.parquet/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
[deps] | ||
# netcdf4 = "" | ||
virtualizarr = "" | ||
xarray = "" | ||
# virtualizarr = "" | ||
zarr = "" | ||
certifi = "" | ||
s3fs = "" | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
using JSON3, Kerchunk, Zarr, YAXArrays | ||
using Test | ||
|
||
# We need to set the AWS config to say we're coming from the "us-west-2" region, | ||
# otherwise AWS will actually refuse to recognize the s3 URL as a bucket, | ||
# and instead will require us to use the HTTP endpoint, which AWSS3.jl won't support. | ||
import AWS | ||
AWS.global_aws_config(AWS.AWSConfig(; region="us-west-2")) | ||
|
||
@testset "ITS_LIVE catalog" begin | ||
catalog_json = JSON3.read(open(joinpath(dirname(dirname(pathof(Kerchunk))), "test", "data", "its_live_catalog.json"))) | ||
# We make the catalog path relative to the module Kerchunk.jl, so that it can be run from the REPL. | ||
catalog_path = joinpath(dirname(dirname(pathof(Kerchunk))), "test", "data", "its_live_catalog.json") | ||
catalog_json = JSON3.read(open(catalog_path)) | ||
# This catalog is actually a collection of catalogs, since the data is stored in different projections. | ||
# We simply access the first in the list. | ||
arbitrary_choice_dictionary = catalog_json[first(keys(catalog_json))] | ||
# We create a ReferenceStore, which is a dictionary of references to the data. | ||
st = Kerchunk.ReferenceStore(arbitrary_choice_dictionary) | ||
# We open the Zarr array from the ReferenceStore. | ||
za = Zarr.zopen(st) | ||
# We test that reading works. | ||
@test_nowarn za["vx"][1, 1] # test that reading works | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters