Skip to content

Commit d0e36df

Browse files
authored
chore: prune unused deps and exports with knip (#82)
1 parent 51956d7 commit d0e36df

File tree

9 files changed

+15
-54
lines changed

9 files changed

+15
-54
lines changed

docs/.vitepress/config.mjs

-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { defineConfig } from "vitepress";
2-
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";
32

43
// https://vitepress.dev/reference/site-config
54
export default defineConfig({
@@ -48,9 +47,4 @@ export default defineConfig({
4847
copyright: `Copyright 2020–${new Date().getUTCFullYear()} Trevor Manz`,
4948
},
5049
},
51-
markdown: {
52-
config(md) {
53-
md.use(tabsMarkdownPlugin);
54-
},
55-
},
5650
});

docs/.vitepress/theme/index.ts

-11
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
// https://vitepress.dev/guide/custom-theme
2-
import { h } from "vue";
32
import Theme from "vitepress/theme";
4-
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client";
5-
63
import "./style.css";
74

85
export default {
96
extends: Theme,
10-
Layout: () => {
11-
return h(Theme.Layout, null, {
12-
// https://vitepress.dev/guide/extending-default-theme#layout-slots
13-
});
14-
},
15-
enhanceApp({ app, router, siteData }) {
16-
enhanceAppWithTabs(app);
17-
},
187
};

docs/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
"preview": "vitepress preview"
66
},
77
"devDependencies": {
8-
"vitepress": "1.0.0-rc.4",
9-
"vitepress-plugin-tabs": "^0.3.0",
10-
"vue": "^3.3.4"
8+
"vitepress": "1.0.0-rc.4"
119
}
1210
}

docs/storage.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# @zarrita/core
1+
# @zarrita/storage
22

3-
- Central component of Zarr.
4-
- Offers `open` (for `Readable` stores) and `create` (for `Writeable` stores)
5-
functions.
6-
- Main function: Initialize `zarr.Array` or `zarr.Group` based on the path
7-
hierarchy.
8-
- A `zarr.Array` allows loading and decompressing individual _chunks_ by their
9-
coordinates – useful for applications needing direct chunk access like
10-
tile-based viewers.
3+
- Provides a set of storage backends for Zarr.
4+
- Stores can be `Readable` and optionally `Writeable`.
5+
- Basic store example: JavaScript `Map` for in-memory storage.
6+
- Implements stores for the Node filesystem API and `fetch` API for reading Zarr
7+
from file system and HTTP requests respectively.
8+
- Ideal for Zarr users in the browser: `FetchStore`.
9+
- Implement your own store!

packages/core/src/create.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ import type {
1111
import { json_encode_object } from "./util.js";
1212
import { Array, Group, Location } from "./hierarchy.js";
1313

14-
export interface CreateGroupOptions {
14+
interface CreateGroupOptions {
1515
attributes?: Record<string, any>;
1616
}
1717

18-
export interface CreateArrayOptions<Dtype extends DataType> {
18+
interface CreateArrayOptions<Dtype extends DataType> {
1919
shape: number[];
2020
chunk_shape: number[];
2121
data_type: Dtype;

packages/core/src/util.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function encode_chunk_key(
115115

116116
const endian_regex = /^([<|>])(.*)$/;
117117

118-
export function coerce_dtype(
118+
function coerce_dtype(
119119
dtype: string,
120120
): { data_type: DataType } | { data_type: DataType; endian: "little" | "big" } {
121121
let match = dtype.match(endian_regex);

packages/indexing/src/indexer.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function normalize_integer_selection(dim_sel: number, dim_len: number) {
5050
return dim_sel;
5151
}
5252

53-
export interface IntChunkDimProjection {
53+
interface IntChunkDimProjection {
5454
dim_chunk_ix: number;
5555
dim_chunk_sel: number;
5656
}
@@ -85,7 +85,7 @@ class IntDimIndexer {
8585
}
8686
}
8787

88-
export interface SliceChunkDimProjection {
88+
interface SliceChunkDimProjection {
8989
dim_chunk_ix: number;
9090
dim_chunk_sel: Indices;
9191
dim_out_sel: Indices;
@@ -201,6 +201,7 @@ export type IndexerProjection = { from: number; to: null } | {
201201
from: Indices;
202202
to: Indices;
203203
};
204+
204205
interface ChunkProjection {
205206
chunk_coords: number[];
206207
mapping: IndexerProjection[];

packages/indexing/src/util.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
import type { ChunkQueue, Indices, Slice } from "./types.js";
22

3-
export function ensure_array<T>(maybe_arr: T | T[]): T[] {
4-
return Array.isArray(maybe_arr) ? maybe_arr : [maybe_arr];
5-
}
6-
73
/** Similar to python's `range` function. Supports positive ranges only. */
84
export function* range(
95
start: number,

pnpm-lock.yaml

-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)