Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
molti-tasking committed Nov 15, 2024
1 parent 205b741 commit e48cf2e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 200 deletions.
161 changes: 0 additions & 161 deletions src/components/DataCompressionPreferencesPopover.tsx

This file was deleted.

4 changes: 3 additions & 1 deletion src/lib/clustering.bench.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ChartPresentationSettings } from "./ChartPresentationSettings.ts";
import { aggregator } from "./clustering.ts";
import { aggregatorB } from "./clusteringB.ts";

Expand Down Expand Up @@ -431,10 +432,11 @@ const dimensions = [
"Col 7",
"Col 8",
];
const presentationSettings = {
const presentationSettings: ChartPresentationSettings = {
dataTicks: 20,
mode: "multiline" as const,
eps: 15,
ignoreBoringDataMode: "off",
};

// @ts-expect-error We only use this deno benchmarking locally to measure performance of different implementations
Expand Down
7 changes: 5 additions & 2 deletions src/lib/clustering.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { expect, test } from "vitest";
import { aggregator } from "./clustering";
import { aggregatorB } from "./clusteringB.ts";
import { ChartPresentationSettings } from "./ChartPresentationSettings.ts";
/*
test("Test the regrouping", () => {
const input = [
Expand Down Expand Up @@ -521,10 +522,11 @@ test("Test the DBSCAN", () => {
"Col 7",
"Col 8",
];
const presentationSettings = {
const presentationSettings: ChartPresentationSettings = {
dataTicks: 20,
mode: "multiline" as const,
eps: 15,
ignoreBoringDataMode: "off",
};

const expectedResult = {
Expand Down Expand Up @@ -1272,10 +1274,11 @@ test("Test the DBSCAN with second impl", () => {
"Col 7",
"Col 8",
];
const presentationSettings = {
const presentationSettings: ChartPresentationSettings = {
dataTicks: 20,
mode: "multiline" as const,
eps: 15,
ignoreBoringDataMode: "off",
};

const expectedResult = {
Expand Down
36 changes: 2 additions & 34 deletions src/lib/clustering.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,4 @@
export type ClusterChartPreferences = (
| {
clusterCount: number;
}
| {
/**
* A number between 0 and 1 to be used as a percentage and based on it there will be different clusters created, but the resulting cluster count will be unknown
*/
eps: number;
}
) &
(
| object
| {
/**
* This value is a threshold. Whenever one of the values of a given range is outside of the a relative range apart from the mean, it will be considered as significant. Should be a number between 0 and 1.
*
*/
meanRange: number;
/**
* Ticks to be taken into account for the check if there is a relevant threshold. Should be at least 3.
* @default 3
*/
tickRange: number;
}
) & {
mode: "multiline" | "envelope";

dataTicks?: number;
timeScale?: { from: number; to: number };

ignoreBoringDataMode: "off" | "standard";
};
import { ChartPresentationSettings } from "./ChartPresentationSettings";

type AggregatedProps = {
aggregated: Record<string, number>[][];
Expand All @@ -49,7 +17,7 @@ type AggregatedProps = {
export const aggregator = (
rawData: Record<string, number>[],
dimensions: string[],
settings: ClusterChartPreferences
settings: ChartPresentationSettings
): AggregatedProps => {
console.count("Called aggregator");
let dataToBeClustered = rawData;
Expand Down
2 changes: 0 additions & 2 deletions src/lib/wrapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ test("Test wrapping on a one dimensional array with a range of 3 data points", (
const { filteredData } = wrapper(input, ["Col 1"], {
meanRange: 0.2,
tickRange: 3,
mode: "multiline",
});

// Assert
Expand Down Expand Up @@ -87,7 +86,6 @@ test("Test wrapping on a one dimensional array with a range of 5 data points", (
const { filteredData } = wrapper(input, ["Col 1"], {
meanRange: 0.2,
tickRange: 5,
mode: "envelope",
});

// Assert
Expand Down

0 comments on commit e48cf2e

Please sign in to comment.