From 930ea2b094939138c2ce47feb954fc543678c149 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:59:09 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../src/webworkers/localBackendWorker.js | 9 +++++---- taxonium_data_handling/importing.js | 14 +++++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/taxonium_component/src/webworkers/localBackendWorker.js b/taxonium_component/src/webworkers/localBackendWorker.js index f0d86a59..36e030fe 100644 --- a/taxonium_component/src/webworkers/localBackendWorker.js +++ b/taxonium_component/src/webworkers/localBackendWorker.js @@ -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" }); @@ -214,9 +214,10 @@ onmessage = async (event) => { data.data, sendStatusMessage, ReadableWebToNodeStream, - parser,streamValues + parser, + streamValues ); - + console.log("processedUploadedData created"); } else if ( data.type === "upload" && diff --git a/taxonium_data_handling/importing.js b/taxonium_data_handling/importing.js index 6ab33881..de5fa15b 100644 --- a/taxonium_data_handling/importing.js +++ b/taxonium_data_handling/importing.js @@ -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 @@ -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 @@ -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;