File tree Expand file tree Collapse file tree 17 files changed +223
-212
lines changed Expand file tree Collapse file tree 17 files changed +223
-212
lines changed Original file line number Diff line number Diff line change 3030 ( and ( >= 4 .14.0) ) )
3131 ( yojson ( >= 1 .6.0) )
3232 ( stdint ( >= 0 .7.2) )
33+ ( zipc ( >= 0 .2.0) )
3334 ( checkseum ( >= 0 .4.0) )
3435 ( odoc :with -doc)
3536 ( ounit2 :with -test)
Original file line number Diff line number Diff line change 44 (ocamlopt_flags (:standard -O3))
55 (libraries zarr-eio camlzip))
66
7- (executable
8- (name inmemory_zipstore)
9- (modules inmemory_zipstore)
10- (ocamlopt_flags (:standard -O3))
11- (libraries zarr-lwt zipc))
12-
137(executable
148 (name picos_fs_store)
159 (modules picos_fs_store)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ module MemoryStore = struct
33 let create = Zarr.Memory. create
44end
55
6+ module ZipStore = struct
7+ module Z = Zarr.Zip. Make (Deferred )
8+ include Zarr.Storage. Make (Z )
9+ let with_open = Z. with_open
10+ end
11+
612module FilesystemStore = struct
713 module FS = struct
814 module Deferred = Deferred
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ module MemoryStore : sig
77 (* * [create ()] returns a new In-memory Zarr store type. *)
88end
99
10+ (* * An Eio-aware Zip file storage backend for a Zarr v3 hierarchy. *)
11+ module ZipStore : sig include Zarr.Zip. S with type 'a Deferred. t = 'a end
12+
1013module FilesystemStore : sig
1114 (* * A local filesystem storage backend for a Zarr V3 hierarchy. *)
1215
Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ let _ =
143143 (Zarr.Storage. Not_a_filesystem_store fn)
144144 (fun () -> FilesystemStore. open_store ~env fn);
145145
146+ (* test with non-existant archive *)
147+ let zpath = tmp_dir ^ " .zip" in
148+ ZipStore. with_open `Read_write zpath (fun z -> test_storage (module ZipStore ) z);
149+ (* test just opening the now exisitant archive created by the previous test. *)
150+ ZipStore. with_open `Read_only zpath (fun _ -> ZipStore.Deferred. return_unit);
146151 test_storage (module MemoryStore ) @@ MemoryStore. create () ;
147152 test_storage (module FilesystemStore ) s)
148153 ])
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ module MemoryStore = struct
33 let create = Zarr.Memory. create
44end
55
6+ module ZipStore = struct
7+ module Z = Zarr.Zip. Make (Deferred )
8+ include Zarr.Storage. Make (Z )
9+ let with_open = Z. with_open
10+ end
11+
612module FilesystemStore = struct
713 module FS = struct
814 module Deferred = Deferred
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ module MemoryStore : sig
77 (* * [create ()] returns a new In-memory Zarr store type. *)
88end
99
10+ (* * An Lwt-aware Zip file storage backend for a Zarr v3 hierarchy. *)
11+ module ZipStore : sig include Zarr.Zip. S with type 'a Deferred. t = 'a Lwt. t end
12+
1013module FilesystemStore : sig
1114 (* * A local filesystem storage backend for a Zarr V3 hierarchy. *)
1215
Original file line number Diff line number Diff line change @@ -141,8 +141,11 @@ let _ =
141141 (Zarr.Storage. Not_a_filesystem_store fn)
142142 (fun () -> FilesystemStore. open_store fn);
143143
144- Lwt_main. run @@
145- Lwt. join
146- [test_storage (module MemoryStore ) @@ MemoryStore. create ()
144+ let zpath = tmp_dir ^ " .zip" in
145+ Lwt_main. run @@ Lwt. join
146+ [ZipStore. with_open `Read_write zpath (fun z -> test_storage (module ZipStore ) z)
147+ (* test just opening the now exisitant archive created by the previous test. *)
148+ ;ZipStore. with_open `Read_only zpath (fun _ -> ZipStore.Deferred. return_unit)
149+ ;test_storage (module MemoryStore ) @@ MemoryStore. create ()
147150 ;test_storage (module FilesystemStore ) s])
148151])
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ module MemoryStore = struct
33 let create = Zarr.Memory. create
44end
55
6+ module ZipStore = struct
7+ module Z = Zarr.Zip. Make (Deferred )
8+ include Zarr.Storage. Make (Z )
9+ let with_open = Z. with_open
10+ end
11+
612module FilesystemStore = struct
713 module F = struct
814 module Deferred = Deferred
You can’t perform that action at this time.
0 commit comments