Skip to content

Commit c41ebc7

Browse files
committed
Revert "write metadata to store"
This reverts commit 908bd2b.
1 parent 7c4d240 commit c41ebc7

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ polars-arrow = { version = "0.44" }
2121
pyo3 = { version = "0.21", features = ["extension-module"] }
2222
pyo3-polars = { version = "0.18", features = ["dtype-categorical"] }
2323
rayon = { version = "1.8" }
24-
serde_json = { version = "1" }
2524
sprs = { version = "= 0.11.1", features = ["serde"] }
2625
zarrs = { version = "0.16.4", features = ["ndarray", "gzip"] }

src/cosine_zarr.rs

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
use ndarray::{Array2, Array3, NdFloat};
22
use num::zero;
3-
use serde_json::Map;
4-
use std::{collections::BTreeMap, error::Error, path::PathBuf, sync::Arc};
3+
use std::{error::Error, path::PathBuf, sync::Arc};
54
use zarrs::{
65
array::{
76
chunk_grid::RegularChunkGrid, codec::GzipCodec, Array as ZarrArray, ArrayBuilder,
87
ChunkGrid, DataType, Element, FillValue,
98
},
10-
group::{Group, GroupMetadataV3},
9+
group::Group,
1110
storage::store::FilesystemStore,
1211
};
1312

@@ -34,17 +33,12 @@ pub fn initialize_cosine_zarrstore(
3433
));
3534

3635
// generate root
37-
let mut root_meta = Map::new();
38-
root_meta.insert("shape".into(), serde_json::to_value(shape.clone())?);
39-
root_meta.insert("celltypes".into(), serde_json::to_value(celltypes)?);
40-
root_meta.insert("chunk_size".into(), serde_json::to_value(chunk_size)?);
41-
42-
Group::new_with_metadata(
43-
store.clone(),
44-
"/",
45-
GroupMetadataV3::new(root_meta, BTreeMap::new()).into(),
46-
)?
47-
.store_metadata()?;
36+
// Group::new_with_metadata(
37+
// store.clone(),
38+
// path.to_str().expect("Valid path"),
39+
// serde_json::json!({"shape", shape}),
40+
// )?
41+
Group::open(store.clone(), "/")?.store_metadata()?;
4842

4943
// generate cosine group
5044
Group::open(store.clone(), CT_PATH_PREFIX)?.store_metadata()?;

0 commit comments

Comments
 (0)