Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 8, 2024
1 parent 7f81021 commit 930ea2b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
9 changes: 5 additions & 4 deletions taxonium_component/src/webworkers/localBackendWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
import { processNewickAndMetadata } from "../utils/processNewick.js";
import { processNextstrain } from "../utils/processNextstrain.js";
import { ReadableWebToNodeStream } from "readable-web-to-node-stream";
import {parser } from "stream-json";
import {streamValues } from "stream-json/streamers/StreamValues";
import { parser } from "stream-json";
import { streamValues } from "stream-json/streamers/StreamValues";

console.log("worker starting");
postMessage({ data: "Worker starting" });
Expand Down Expand Up @@ -214,9 +214,10 @@ onmessage = async (event) => {
data.data,
sendStatusMessage,
ReadableWebToNodeStream,
parser,streamValues
parser,
streamValues
);

console.log("processedUploadedData created");
} else if (
data.type === "upload" &&
Expand Down
14 changes: 11 additions & 3 deletions taxonium_data_handling/importing.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,13 @@ function reduceMaxOrMin(array, accessFunction, maxOrMin) {
}
}

export const setUpStream = (the_stream, data, sendStatusMessage, parser, streamValues) => {
export const setUpStream = (
the_stream,
data,
sendStatusMessage,
parser,
streamValues
) => {
const splitter = new StreamSplitter();

// Custom header parser using json-stream
Expand Down Expand Up @@ -162,7 +168,9 @@ export const setUpStream = (the_stream, data, sendStatusMessage, parser, streamV
export const processJsonl = async (
jsonl,
sendStatusMessage,
ReadableWebToNodeStream, parser, streamValues
ReadableWebToNodeStream,
parser,
streamValues
) => {
console.log(
"Worker processJsonl" //, jsonl
Expand All @@ -178,7 +186,7 @@ export const processJsonl = async (
the_stream = new stream.PassThrough();
}
let new_data = {};
setUpStream(the_stream, new_data, sendStatusMessage,parser, streamValues);
setUpStream(the_stream, new_data, sendStatusMessage, parser, streamValues);

if (status === "loaded") {
const dataAsArrayBuffer = data;
Expand Down

0 comments on commit 930ea2b

Please sign in to comment.