Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Xun Li <[email protected]>
  • Loading branch information
lixun910 committed Nov 1, 2023
1 parent f0c572a commit a4ae70a
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 225 deletions.
2 changes: 1 addition & 1 deletion src/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"@kepler.gl/actions": "3.0.0-alpha.1",
"@kepler.gl/cloud-providers": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/localization": "3.0.0-alpha.1",
"@kepler.gl/processors": "3.0.0-alpha.1",
"@kepler.gl/reducers": "3.0.0-alpha.1",
Expand Down
4 changes: 2 additions & 2 deletions src/effects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"umd"
],
"dependencies": {
"suncalc": "^1.9.0",
"@deck.gl/core": "^8.9.12",
"@luma.gl/core": "^8.5.19",
"@luma.gl/shadertools": "^8.5.19",
"@kepler.gl/utils": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/types": "3.0.0-alpha.1",
"suncalc": "^1.9.0"
"@kepler.gl/types": "3.0.0-alpha.1"
},
"nyc": {
"sourceMap": false,
Expand Down
2 changes: 1 addition & 1 deletion src/layers/src/geojson-layer/geojson-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import normalize from '@mapbox/geojson-normalize';
import bbox from '@turf/bbox';
import {parseSync} from '@loaders.gl/core';
import {WKBLoader, WKTLoader} from '@loaders.gl/wkt';
import { binaryToGeometry } from '@loaders.gl/gis';
import {binaryToGeometry} from '@loaders.gl/gis';

import {Feature, BBox} from 'geojson';
import {getSampleData} from '@kepler.gl/utils';
Expand Down
14 changes: 9 additions & 5 deletions src/processors/src/file-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ import {parseInBatches} from '@loaders.gl/core';
import {JSONLoader, _JSONPath} from '@loaders.gl/json';
import {CSVLoader} from '@loaders.gl/csv';
import {ArrowLoader} from '@loaders.gl/arrow';
import {processArrowTable, processGeojson, processKeplerglJSON, processRowObject} from './data-processor';
import {
processArrowTable,
processGeojson,
processKeplerglJSON,
processRowObject
} from './data-processor';
import {generateHashId, isPlainObject} from '@kepler.gl/utils';
import {DATASET_FORMATS} from '@kepler.gl/constants';
import {Loader} from '@loaders.gl/loader-utils';
Expand Down Expand Up @@ -158,7 +163,7 @@ export async function* readBatch(
// Only json parse will have `FINAL_RESULT`
if (batch.batchType === BATCH_TYPE.FINAL_RESULT) {
if (batch.container) {
result = { ...batch.container };
result = {...batch.container};
}
// Set the streamed data correctly is Batch json path is set
// and the path streamed is not the top level object (jsonpath = '$')
Expand All @@ -179,7 +184,7 @@ export async function* readBatch(

yield {
...batch,
...(batch.schema ? { headers: Object.keys(batch.schema) } : {}),
...(batch.schema ? {headers: Object.keys(batch.schema)} : {}),
fileName,
// if dataset is CSV, data is set to the raw batches
data: result ? result : batches
Expand Down Expand Up @@ -227,8 +232,7 @@ export function processFileData({
if (isArrowData(data)) {
format = DATASET_FORMATS.arrow;
processor = processArrowTable;
}
else if (isKeplerGlMap(data)) {
} else if (isKeplerGlMap(data)) {
format = DATASET_FORMATS.keplergl;
processor = processKeplerglJSON;
} else if (isRowObject(data)) {
Expand Down
4 changes: 2 additions & 2 deletions src/reducers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
"@kepler.gl/cloud-providers": "3.0.0-alpha.1",
"@kepler.gl/constants": "3.0.0-alpha.1",
"@kepler.gl/deckgl-layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/layers": "3.0.0-alpha.1",
"@kepler.gl/effects": "3.0.0-alpha.1",
"@kepler.gl/localization": "3.0.0-alpha.1",
"@kepler.gl/processors": "3.0.0-alpha.1",
"@kepler.gl/schemas": "3.0.0-alpha.1",
"@kepler.gl/table": "3.0.0-alpha.1",
"@kepler.gl/tasks": "3.0.0-alpha.1",
"@kepler.gl/types": "3.0.0-alpha.1",
"@kepler.gl/utils": "3.0.0-alpha.1",
"@loaders.gl/loader-utils": "^3.4.14",
"@loaders.gl/loader-utils": "^4.0.1",
"@types/lodash.clonedeep": "^4.5.7",
"@types/lodash.flattendeep": "^4.4.7",
"@types/lodash.get": "^4.4.6",
Expand Down
2 changes: 1 addition & 1 deletion src/table/src/kepler-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class KeplerTable {
const inputDataFormat = data.cols ? DataForm.COLS_ARRAY : DataForm.ROWS_ARRAY;

const dataContainer = createDataContainer(dataContainerData, {
// @ts-expect-error
// @ts-expect-error ProtoDataset field missing property fieldIdx, valueAccessor
fields: data.fields,
inputDataFormat
});
Expand Down
213 changes: 0 additions & 213 deletions test/fixtures/test-arrow-data.js

This file was deleted.

0 comments on commit a4ae70a

Please sign in to comment.