Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
"recommended": true,
"suspicious": {
"noConsole": "error"
},
"correctness": {
"noUnusedImports": "error",
"useHookAtTopLevel": "error"
}
}
},
Expand Down
2 changes: 0 additions & 2 deletions examples/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router';
import { DziDemo } from './dzi/dzi-demo';
import { Home } from './home';
import { OmezarrDemo } from './omezarr/omezarr-demo';
import { RedirectToLayersHTML } from './layers/tempLayers';

export function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion examples/src/common/image-renderer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { vec2, vec4 } from '@alleninstitute/vis-geometry';
import type { vec4 } from '@alleninstitute/vis-geometry';
import type REGL from 'regl';
import type { Framebuffer2D } from 'regl';

Expand Down
2 changes: 1 addition & 1 deletion examples/src/common/react/render-server-provider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { logger, RenderServer } from '@alleninstitute/vis-core';
import React, { createContext, useEffect, useRef, type PropsWithChildren } from 'react';
import { createContext, useEffect, useRef, type PropsWithChildren } from 'react';

export const renderServerContext = createContext<RenderServer | null>(null);

Expand Down
1 change: 0 additions & 1 deletion examples/src/data-renderers/lineRenderer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { box2D, vec2, vec4 } from '@alleninstitute/vis-geometry';
import type REGL from 'regl';
import type { AttributeConfig } from 'regl';
import type { ColumnData } from '~/common/loaders/scatterplot/scatterbrain-loader';

type Attrs = { pos: REGL.AttributeConfig };
Expand Down
2 changes: 1 addition & 1 deletion examples/src/data-renderers/scatterplot.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box2D, type box2D, type vec2, type vec4 } from '@alleninstitute/vis-geometry';
import { Box2D, type vec2, type vec4 } from '@alleninstitute/vis-geometry';
import type REGL from 'regl';
import type { Framebuffer2D } from 'regl';
import type { RenderSettings } from '~/common/loaders/scatterplot/data';
Expand Down
3 changes: 1 addition & 2 deletions examples/src/dzi/dzi-viewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import {
type DziRenderSettings,
type DziTile,
buildAsyncDziRenderer,
buildDziRenderer,
} from '@alleninstitute/vis-dzi';
import { Vec2, type vec2 } from '@alleninstitute/vis-geometry';
import type { RenderFrameFn, buildAsyncRenderer } from '@alleninstitute/vis-core';
import { useContext, useEffect, useRef, useState } from 'react';
import { useContext, useEffect, useRef } from 'react';
import { renderServerContext } from '~/common/react/render-server-provider';

type Props = {
Expand Down
1 change: 0 additions & 1 deletion examples/src/home.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { Link } from 'react-router';

export function Home() {
Expand Down
1 change: 0 additions & 1 deletion examples/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { createRoot } from 'react-dom/client';
import { App } from './app';

Expand Down
1 change: 0 additions & 1 deletion examples/src/layers/layers.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button } from '@czi-sds/components';
import React from 'react';
import type { Demo } from '../layers';
import { AnnotationGrid } from '../ui/annotation-grid';
import { ContactSheetUI } from '../ui/contact-sheet';
Expand Down
11 changes: 1 addition & 10 deletions examples/src/omezarr/omezarr-demo.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
import {
Box2D,
CartesianPlane,
type Interval,
PLANE_XY,
type box2D,
type vec2,
type vec3,
} from '@alleninstitute/vis-geometry';
import { makeRGBColorVector } from '@alleninstitute/vis-core';
import { Box2D, type Interval, PLANE_XY, type box2D, type vec2 } from '@alleninstitute/vis-geometry';
import { type OmeZarrMetadata, loadMetadata, sizeInUnits } from '@alleninstitute/vis-omezarr';
import type { RenderSettings, RenderSettingsChannels } from '@alleninstitute/vis-omezarr';
import { logger, type WebResource } from '@alleninstitute/vis-core';
Expand Down
4 changes: 1 addition & 3 deletions examples/src/omezarr/omezarr-viewer.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Box2D, Vec2, type box2D, type vec2 } from '@alleninstitute/vis-geometry';
import { Box2D, type vec2 } from '@alleninstitute/vis-geometry';
import {
type RenderSettings,
type VoxelTile,
type OmeZarrMetadata,
buildAsyncOmezarrRenderer,
pickBestScale,
planeSizeInVoxels,
} from '@alleninstitute/vis-omezarr';
import type { RenderFrameFn, RenderServer } from '@alleninstitute/vis-core';
import { useContext, useEffect, useRef } from 'react';
Expand Down
2 changes: 1 addition & 1 deletion examples/src/omezarr/sliceview.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box2D, CartesianPlane, PLANE_XY, Vec2, Vec3, type box2D } from '@alleninstitute/vis-geometry';
import { Box2D, PLANE_XY, Vec2, type box2D } from '@alleninstitute/vis-geometry';
import {
type RenderSettings,
type VoxelTile,
Expand Down
1 change: 0 additions & 1 deletion examples/src/ui/annotation-grid.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { InputSlider } from '@czi-sds/components';
import React from 'react';
import type { Demo } from 'src/layers';
export function AnnotationGrid(props: { demo: Demo }) {
const { demo } = props;
Expand Down
1 change: 0 additions & 1 deletion examples/src/ui/contact-sheet.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button, InputSlider } from '@czi-sds/components';
import React from 'react';
import type { Demo } from 'src/layers';
export function ContactSheetUI(props: { demo: Demo }) {
const { demo } = props;
Expand Down
1 change: 0 additions & 1 deletion examples/src/ui/scatterplot-ui.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { InputSlider } from '@czi-sds/components';
import React, { useState } from 'react';
import type { Demo } from 'src/layers';
export function ScatterplotUI(props: { demo: Demo }) {
const { demo } = props;
Expand Down
1 change: 0 additions & 1 deletion examples/src/ui/slice-ui.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button, InputSlider } from '@czi-sds/components';
import React from 'react';
import type { Demo } from 'src/layers';
export function SliceViewLayer(props: { demo: Demo }) {
const { demo } = props;
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/test/render-cache.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { delay, partial, partialRight, uniqueId } from 'lodash';
import { partial, uniqueId } from 'lodash';
import { beforeEach, describe, expect, it } from 'vitest';
import { AsyncDataCache } from '../dataset-cache';
import { fakeFetch } from './test-utils';
type Columns = 'color' | 'position';
type vec3 = readonly [number, number, number];
type Data = { pretend: vec3 };
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/test/render-queue.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import delay from 'lodash/delay';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { beforeEach, describe, expect, it } from 'vitest';
import { AsyncDataCache } from '../dataset-cache';
import { type NormalStatus, beginLongRunningFrame } from '../render-queue';
import { fakeFetch } from './test-utils';
Expand Down
2 changes: 1 addition & 1 deletion packages/dzi/src/loader.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box2D } from '@alleninstitute/vis-geometry';
import { logger } from '@alleninstitute/vis-core';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { describe, expect, it } from 'vitest';
import { type DziImage, firstSuitableLayer, imageSizeAtLayer, tileWithOverlap, tilesInLayer } from './loader';

describe('tiling math', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/geometry/src/tests/interval.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { describe, expect, it, test } from 'vitest';
import { describe, expect, it } from 'vitest';
import { type Interval, fixOrder, intersection, isValid, limit, size, within } from '../interval';
function I(a: number, b: number): Interval {
return { min: a, max: b };
Expand Down
3 changes: 1 addition & 2 deletions packages/omezarr/src/sliceview/loader.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
// TODO Unit test for loading is no longer feasible, as it requires an actual Zarr group + arrays to resolve correctly.
// Best bet is to create a proper fake OmeZarr dataset and do a "unit" (really, integration) test that way.

import { Box2D, CartesianPlane, PLANE_XY, PLANE_YZ, type box2D } from '@alleninstitute/vis-geometry';
import { Box2D, PLANE_XY, PLANE_YZ, type box2D } from '@alleninstitute/vis-geometry';
import { describe, expect, it } from 'vitest';
import type * as zarr from 'zarrita';
import { OmeZarrMetadata } from '../zarr/types';
import { sizeInUnits } from '../zarr/loading';
import { getVisibleTiles } from './loader';
Expand Down
2 changes: 1 addition & 1 deletion packages/omezarr/src/zarr/loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
type vec2,
} from '@alleninstitute/vis-geometry';
import { getResourceUrl, logger, type WebResource } from '@alleninstitute/vis-core';
import { VisZarrDataError, VisZarrError } from '../errors';
import { VisZarrDataError } from '../errors';
import {
OmeZarrAttrsSchema,
OmeZarrMetadata,
Expand Down
5 changes: 2 additions & 3 deletions packages/omezarr/src/zarr/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Vec4, type CartesianPlane, type Interval, type vec3, type vec4 } from '@alleninstitute/vis-geometry';
import type { CartesianPlane, Interval, vec3, vec4 } from '@alleninstitute/vis-geometry';
import { VisZarrDataError, VisZarrIndexError } from '../errors';
import { logger, makeRGBAColorVector, makeRGBColorVector } from '@alleninstitute/vis-core';
import type * as zarr from 'zarrita';
import { logger, makeRGBAColorVector } from '@alleninstitute/vis-core';
import { z } from 'zod';

export type ZarrDimension = 't' | 'c' | 'z' | 'y' | 'x';
Expand Down