Move dataframe utils to dataframe dir
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { FieldCache } from './FieldCache';
|
||||
import { toDataFrame } from '../utils';
|
||||
import { FieldType } from '../types/dataFrame';
|
||||
import { toDataFrame } from './processDataFrame';
|
||||
|
||||
describe('FieldCache', () => {
|
||||
it('when creating a new FieldCache from fields should be able to query cache', () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Field, DataFrame, DataFrameDTO, FieldDTO, FieldType } from '../types/dataFrame';
|
||||
import { KeyValue, QueryResultMeta, Labels } from '../types/data';
|
||||
import { guessFieldTypeFromValue, guessFieldTypeForField, toDataFrameDTO } from '../utils/processDataFrame';
|
||||
import { guessFieldTypeFromValue, guessFieldTypeForField, toDataFrameDTO } from './processDataFrame';
|
||||
import isArray from 'lodash/isArray';
|
||||
import isString from 'lodash/isString';
|
||||
import { makeFieldParser } from '../utils/fieldParser';
|
||||
|
||||
@@ -2,3 +2,4 @@ export * from './DataFrameView';
|
||||
export * from './FieldCache';
|
||||
export * from './CircularDataFrame';
|
||||
export * from './MutableDataFrame';
|
||||
export * from './processDataFrame';
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ import {
|
||||
sortDataFrame,
|
||||
} from './processDataFrame';
|
||||
import { FieldType, TimeSeries, TableData, DataFrameDTO } from '../types/index';
|
||||
import { dateTime } from './moment_wrapper';
|
||||
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
|
||||
import { dateTime } from '../utils/moment_wrapper';
|
||||
import { MutableDataFrame } from './MutableDataFrame';
|
||||
|
||||
describe('toDataFrame', () => {
|
||||
it('converts timeseries to series', () => {
|
||||
+3
-3
@@ -17,10 +17,10 @@ import {
|
||||
FieldDTO,
|
||||
DataFrameDTO,
|
||||
} from '../types/index';
|
||||
import { isDateTime } from './moment_wrapper';
|
||||
import { deprecationWarning } from './deprecationWarning';
|
||||
import { isDateTime } from '../utils/moment_wrapper';
|
||||
import { deprecationWarning } from '../utils/deprecationWarning';
|
||||
import { ArrayVector } from '../vector/ArrayVector';
|
||||
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
|
||||
import { MutableDataFrame } from './MutableDataFrame';
|
||||
import { SortedVector } from '../vector/SortedVector';
|
||||
|
||||
function convertTableToDataFrame(table: TableData): DataFrame {
|
||||
@@ -1,7 +1,7 @@
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { fieldMatchers } from './matchers';
|
||||
import { FieldMatcherID } from './ids';
|
||||
import { toDataFrame } from '../../utils/processDataFrame';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
|
||||
export const simpleSeriesWithTypes = toDataFrame({
|
||||
fields: [
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { getFieldMatcher } from './matchers';
|
||||
import { FieldMatcherID } from './ids';
|
||||
import { toDataFrame } from '../../utils/processDataFrame';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
|
||||
describe('Field Name Matcher', () => {
|
||||
it('Match all with wildcard regex', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DataTransformerID } from './ids';
|
||||
import { toDataFrame } from '../../utils/processDataFrame';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
import { transformersRegistry } from '../transformersRegistry';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { FieldType } from '../../types/dataFrame';
|
||||
import { DataTransformerID } from './ids';
|
||||
import { toDataFrame } from '../../utils/processDataFrame';
|
||||
import { toDataFrame } from '../../dataframe/processDataFrame';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
import { FieldMatcherID } from '../matchers/ids';
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { toDataFrame } from '../../utils/index';
|
||||
import { FieldType } from '../../index';
|
||||
import { FieldType, toDataFrame } from '../../index';
|
||||
import { DataTransformerID } from './ids';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ReducerID } from '../../utils/fieldReducer';
|
||||
import { DataTransformerID } from './ids';
|
||||
import { toDataFrame, toDataFrameDTO } from '../../utils/processDataFrame';
|
||||
import { toDataFrame, toDataFrameDTO } from '../../dataframe/processDataFrame';
|
||||
import { transformDataFrame } from '../transformDataFrame';
|
||||
|
||||
const seriesWithValues = toDataFrame({
|
||||
|
||||
@@ -5,7 +5,7 @@ import { alwaysFieldMatcher } from '../matchers/predicates';
|
||||
import { DataFrame, Field, FieldType } from '../../types/dataFrame';
|
||||
import { ArrayVector } from '../../vector/ArrayVector';
|
||||
import { KeyValue } from '../../types/data';
|
||||
import { guessFieldTypeForField } from '../../utils/processDataFrame';
|
||||
import { guessFieldTypeForField } from '../../dataframe/processDataFrame';
|
||||
import { getFieldMatcher } from '../matchers/matchers';
|
||||
|
||||
export interface ReduceTransformerOptions {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DataTransformerID } from './transformers/ids';
|
||||
import { transformersRegistry } from './transformersRegistry';
|
||||
import { toDataFrame } from '../utils/processDataFrame';
|
||||
import { toDataFrame } from '../dataframe/processDataFrame';
|
||||
import { ReducerID } from '../utils/fieldReducer';
|
||||
import { DataFrameView } from '../dataframe/DataFrameView';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { readCSV, toCSV, CSVHeaderStyle } from './csv';
|
||||
import { getDataFrameRow } from './processDataFrame';
|
||||
import { getDataFrameRow } from '../dataframe/processDataFrame';
|
||||
|
||||
// Test with local CSV files
|
||||
import fs from 'fs';
|
||||
import { toDataFrameDTO } from './processDataFrame';
|
||||
import { toDataFrameDTO } from '../dataframe/processDataFrame';
|
||||
|
||||
describe('read csv', () => {
|
||||
it('should get X and y', () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import isNumber from 'lodash/isNumber';
|
||||
|
||||
// Types
|
||||
import { DataFrame, Field, FieldType, FieldConfig } from '../types';
|
||||
import { guessFieldTypeFromValue } from './processDataFrame';
|
||||
import { guessFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
|
||||
|
||||
export enum CSVHeaderStyle {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Field, FieldType } from '../types/dataFrame';
|
||||
import { guessFieldTypeFromValue } from './processDataFrame';
|
||||
import { guessFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
|
||||
export function makeFieldParser(value: any, field: Field): (value: string) => any {
|
||||
if (!field.type) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import difference from 'lodash/difference';
|
||||
import { fieldReducers, ReducerID, reduceField } from './fieldReducer';
|
||||
|
||||
import { Field, FieldType } from '../types/index';
|
||||
import { guessFieldTypeFromValue } from './processDataFrame';
|
||||
import { guessFieldTypeFromValue } from '../dataframe/processDataFrame';
|
||||
import { MutableDataFrame } from '../dataframe/MutableDataFrame';
|
||||
import { ArrayVector } from '../vector/ArrayVector';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
export * from './string';
|
||||
export * from './registry';
|
||||
export * from './markdown';
|
||||
export * from './processDataFrame';
|
||||
export * from './deprecationWarning';
|
||||
export * from './csv';
|
||||
export * from './fieldReducer';
|
||||
|
||||
Reference in New Issue
Block a user