From 66849441461682142b5ddf741207259588b1337a Mon Sep 17 00:00:00 2001 From: "vikaskatiyar@live.com" Date: Sat, 18 Apr 2020 22:18:21 +0530 Subject: [PATCH 01/10] #98 : create file change --- src/commands/showfile.ts | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/commands/showfile.ts diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts new file mode 100644 index 0000000..e69de29 From 1d41bc5e7b16f38ce4ac0acfaded0e0f84f73081 Mon Sep 17 00:00:00 2001 From: "vikaskatiyar@live.com" Date: Sun, 19 Apr 2020 10:06:58 +0530 Subject: [PATCH 02/10] #98 : csv file viewer in console changes --- src/commands/showfile.ts | 105 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts index e69de29..ab1569e 100644 --- a/src/commands/showfile.ts +++ b/src/commands/showfile.ts @@ -0,0 +1,105 @@ +// code here to write the tool for csv tool show +import {Command, flags} from '@oclif/command' + +import Logger from '../utilities/logger' +import Utilities from '../utilities/utilities' + +export default class ShowFile extends Command { + static description = 'File Minifier' + + static flags = { + help: flags.help({char: 'h'}), + file: flags.string({char: 'f' , description: 'formatted file to be shown'}) + } + + static args = [{name: 'file'}] + + // required FILE + async run() { + const {args, flags} = this.parse(ShowFile) + + args.file = this.getFilePath(flags, args) + + this.checkParameters(flags, args) + this.showFile(args) + } + + private getFilePath(flags: any, args: any) { + if (args.file) + return args.file + if (flags.file) + return flags.file + Logger.error(this, 'File path not passed') + } + + // tslint:disable-next-line:no-unused + private checkParameters(flags: unknown, args: { [p: string]: any }) { + if (args.file === undefined || args.file === '') + Logger.error(this, 'File path is empty') + // others already checked + } + + + private showFile(args: any) { + + let data = Utilities.getStringFromFile(this, args.file) + let rows = data.split('\n') + + let widthArray = [] + + let recordsToShow = 10 + + for(let i = 0; i < rows[0].length; i++){ + widthArray[i] = 0 + } + + for(let i = 0; i < recordsToShow; i++){ + let row = rows[i].split(","); + let s = '' + for(let j = 0; j < row.length; j ++){ + s = s + row[j] + if(widthArray[j] < row[j].length){ + widthArray[j] = row[j].length + } + } + } + + this.printRow(rows[0].split(","), widthArray, "+", true) + for(let i = 0; i < recordsToShow-1; i++){ + let row = rows[i] + this.printRow(row.split(','), widthArray, '|', false) + this.printRow(row.split(','), widthArray, '+', true) + } + + } + + private printRow(row: any, widthArray: any, seperator: any, isLineSeparator: any){ + let output = seperator + for(let i = 0; i < row.length; i ++){ + let totalSize = widthArray[i] + + let dataLength = 0; + let space = "-" + if(!isLineSeparator){ + let data = row[i] + data = data.split(/\r/)[0] + output += data + dataLength = data.length + space = ' ' + // this.log(`The output log upto here is : ${output}`) + } + + for(let j = 0; j < totalSize - dataLength; j++){ + output += space + } + + output += seperator + if(!isLineSeparator){ + // this.log(`The output log upto here is : ${output}`) + // Logger.info(this, output) + } + } + this.log('' + output) + output = '' + } +} From f27d20ea375f3a14bfaee0c45e9bc1aa11d859d1 Mon Sep 17 00:00:00 2001 From: "vikaskatiyar@live.com" Date: Sun, 19 Apr 2020 10:15:27 +0530 Subject: [PATCH 03/10] #98 : csv file viewer in console changes --- src/commands/showfile.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts index ab1569e..3599ce3 100644 --- a/src/commands/showfile.ts +++ b/src/commands/showfile.ts @@ -43,6 +43,7 @@ export default class ShowFile extends Command { private showFile(args: any) { let data = Utilities.getStringFromFile(this, args.file) + let rows = data.split('\n') let widthArray = [] @@ -53,6 +54,10 @@ export default class ShowFile extends Command { widthArray[i] = 0 } + if(recordsToShow > rows.length){ + recordsToShow = rows.length + } + for(let i = 0; i < recordsToShow; i++){ let row = rows[i].split(","); let s = '' From baedace85031f5a3854c23753ffbf09387b32068 Mon Sep 17 00:00:00 2001 From: "vikaskatiyar@live.com" Date: Sun, 19 Apr 2020 16:27:28 +0530 Subject: [PATCH 04/10] #98 : test cases and bug fixes --- src/commands/showfile.ts | 96 ++-- test/commands/avro.test.ts | 2 +- test/commands/showfile.test.ts | 44 ++ test/resources/showfile.csv | 892 +++++++++++++++++++++++++++++++++ 4 files changed, 981 insertions(+), 53 deletions(-) create mode 100644 test/commands/showfile.test.ts create mode 100644 test/resources/showfile.csv diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts index 3599ce3..b2b9659 100644 --- a/src/commands/showfile.ts +++ b/src/commands/showfile.ts @@ -9,7 +9,8 @@ export default class ShowFile extends Command { static flags = { help: flags.help({char: 'h'}), - file: flags.string({char: 'f' , description: 'formatted file to be shown'}) + file: flags.string({char: 'f' , description: 'formatted file to be shown'}), + num: flags.string({char: 'n' , description: 'rows to show'}) } static args = [{name: 'file'}] @@ -19,6 +20,9 @@ export default class ShowFile extends Command { const {args, flags} = this.parse(ShowFile) args.file = this.getFilePath(flags, args) + args.num = this.getFileLinesToShow(flags) + + // args.rowsToShow this.checkParameters(flags, args) this.showFile(args) @@ -28,10 +32,13 @@ export default class ShowFile extends Command { if (args.file) return args.file if (flags.file) - return flags.file + return flags.file9 Logger.error(this, 'File path not passed') } + private getFileLinesToShow(flags: any) { + return flags.num || 10 + } // tslint:disable-next-line:no-unused private checkParameters(flags: unknown, args: { [p: string]: any }) { if (args.file === undefined || args.file === '') @@ -39,72 +46,57 @@ export default class ShowFile extends Command { // others already checked } - private showFile(args: any) { - let data = Utilities.getStringFromFile(this, args.file) - let rows = data.split('\n') - let widthArray = [] - let recordsToShow = 10 + let recordsToShow = parseInt(args.num, 10) + 1 - for(let i = 0; i < rows[0].length; i++){ - widthArray[i] = 0 + for (let i = 0; i < rows[0].length; i++) { + widthArray[i] = 0 } - if(recordsToShow > rows.length){ - recordsToShow = rows.length + if (recordsToShow > rows.length) { + recordsToShow = rows.length - 1 } - for(let i = 0; i < recordsToShow; i++){ - let row = rows[i].split(","); - let s = '' - for(let j = 0; j < row.length; j ++){ - s = s + row[j] - if(widthArray[j] < row[j].length){ - widthArray[j] = row[j].length - } + for (let i = 0; i < recordsToShow; i++) { + let row = rows[i].split(',') + for (let j = 0; j < row.length; j ++) { + if (widthArray[j] < row[j].length) { + widthArray[j] = row[j].length } + } } - this.printRow(rows[0].split(","), widthArray, "+", true) - for(let i = 0; i < recordsToShow-1; i++){ - let row = rows[i] - this.printRow(row.split(','), widthArray, '|', false) - this.printRow(row.split(','), widthArray, '+', true) + this.printRow(rows[0].split(','), widthArray, '+', true) + for (let i = 0; i < recordsToShow; i++) { + let row = rows[i] + this.printRow(row.split(','), widthArray, '|', false) + this.printRow(row.split(','), widthArray, '+', true) } - + this.log(`showing top ${recordsToShow} rows.`) } - private printRow(row: any, widthArray: any, seperator: any, isLineSeparator: any){ - let output = seperator - for(let i = 0; i < row.length; i ++){ - let totalSize = widthArray[i] - - let dataLength = 0; - let space = "-" - if(!isLineSeparator){ - let data = row[i] - data = data.split(/\r/)[0] - output += data - dataLength = data.length - space = ' ' - // this.log(`The output log upto here is : ${output}`) - } - - for(let j = 0; j < totalSize - dataLength; j++){ - output += space - } - - output += seperator - if(!isLineSeparator){ - // this.log(`The output log upto here is : ${output}`) - // Logger.info(this, output) - } + private printRow(row: any, widthArray: any, seperator: any, isLineSeparator: any) { + let output = seperator + for (let i = 0; i < row.length; i ++) { + let totalSize = widthArray[i] + let dataLength = 0 + let space = '-' + if (!isLineSeparator) { + let data = row[i] + data = data.split(/\r/)[0] + output += data + dataLength = data.length + space = ' ' } - this.log('' + output) - output = '' + for (let j = 0; j < totalSize - dataLength; j++) { + output += space + } + output += seperator + } + this.log('' + output) } } diff --git a/test/commands/avro.test.ts b/test/commands/avro.test.ts index 5f35b8a..8f63f89 100644 --- a/test/commands/avro.test.ts +++ b/test/commands/avro.test.ts @@ -57,7 +57,7 @@ describe('avro', () => { .it('if get_schema outputs to console', ctx => { setTimeout(() => expect(ctx.stdout).to.contain('success') - , 5000) // wait for it to write stuff on console + , 9000) // wait for it to write stuff on console }) test diff --git a/test/commands/showfile.test.ts b/test/commands/showfile.test.ts new file mode 100644 index 0000000..5a2e29a --- /dev/null +++ b/test/commands/showfile.test.ts @@ -0,0 +1,44 @@ +import {expect, test} from '@oclif/test' + +describe('showfile', () => { + test + .stdout() + .command(['showfile']) + .exit(0) + .it('File path not passed', ctx => { + expect(ctx.stdout).to.contain('File path not passed') + }) + + test + .stdout() + .command(['showfile', 'test/resources/showfile.csv']) + .it('check 10 lines are found', ctx => { + expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') + }) + test + .stdout() + .command(['showfile', 'test/resources/showfile.csv', '-n', '5']) + .it('check 5th line is found', ctx => { + expect(ctx.stdout).to.contain('|0 |3 |0 |35.0|8.05 |0 |0 |') + }) + + test + .stdout() + .command(['showfile', 'test/resources/showfile.csv', '-n', '900']) + .it('check if the given number is greater than total lines', ctx => { + expect(ctx.stdout).to.contain('|0 |3 |0 |32.0 |7.75 |0 |0 |') + }) + test + .stdout() + .command(['showfile', 'test/resources/showfile.csv', '-n', '900']) + .it('check if 900 count is used, it shows only total present rows', ctx => { + expect(ctx.stdout).to.contain('showing top 892 rows.') + }) + test + .stdout() + .command(['showfile', 'test/resources/showfile.csv', '-n', '0']) + .it('check if the given number is greater than total lines', ctx => { + expect(ctx.stdout).to.contain('|Survived|Pclass|Sex|Age|Fare|Family_count|Cabin_ind |') + }) + //|Survived|Pclass|Sex|Age|Fare|Family_count|Cabin_ind | +}) diff --git a/test/resources/showfile.csv b/test/resources/showfile.csv new file mode 100644 index 0000000..c1a6306 --- /dev/null +++ b/test/resources/showfile.csv @@ -0,0 +1,892 @@ +Survived,Pclass,Sex,Age,Fare,Family_count,Cabin_ind +0,3,0,22.0,7.25,1,0 +1,1,1,38.0,71.2833,1,1 +1,3,1,26.0,7.925,0,0 +1,1,1,35.0,53.1,1,1 +0,3,0,35.0,8.05,0,0 +0,3,0,29.69911764705882,8.4583,0,0 +0,1,0,54.0,51.8625,0,1 +0,3,0,2.0,21.075,4,0 +1,3,1,27.0,11.1333,2,0 +1,2,1,14.0,30.0708,1,0 +1,3,1,4.0,16.7,2,1 +1,1,1,58.0,26.55,0,1 +0,3,0,20.0,8.05,0,0 +0,3,0,39.0,31.275,6,0 +0,3,1,14.0,7.8542,0,0 +1,2,1,55.0,16.0,0,0 +0,3,0,2.0,29.125,5,0 +1,2,0,29.69911764705882,13.0,0,0 +0,3,1,31.0,18.0,1,0 +1,3,1,29.69911764705882,7.225,0,0 +0,2,0,35.0,26.0,0,0 +1,2,0,34.0,13.0,0,1 +1,3,1,15.0,8.0292,0,0 +1,1,0,28.0,35.5,0,1 +0,3,1,8.0,21.075,4,0 +1,3,1,38.0,31.3875,6,0 +0,3,0,29.69911764705882,7.225,0,0 +0,1,0,19.0,263.0,5,1 +1,3,1,29.69911764705882,7.8792,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,1,0,40.0,27.7208,0,0 +1,1,1,29.69911764705882,146.5208,1,1 +1,3,1,29.69911764705882,7.75,0,0 +0,2,0,66.0,10.5,0,0 +0,1,0,28.0,82.1708,1,0 +0,1,0,42.0,52.0,1,0 +1,3,0,29.69911764705882,7.2292,0,0 +0,3,0,21.0,8.05,0,0 +0,3,1,18.0,18.0,2,0 +1,3,1,14.0,11.2417,1,0 +0,3,1,40.0,9.475,1,0 +0,2,1,27.0,21.0,1,0 +0,3,0,29.69911764705882,7.8958,0,0 +1,2,1,3.0,41.5792,3,0 +1,3,1,19.0,7.8792,0,0 +0,3,0,29.69911764705882,8.05,0,0 +0,3,0,29.69911764705882,15.5,1,0 +1,3,1,29.69911764705882,7.75,0,0 +0,3,0,29.69911764705882,21.6792,2,0 +0,3,1,18.0,17.8,1,0 +0,3,0,7.0,39.6875,5,0 +0,3,0,21.0,7.8,0,0 +1,1,1,49.0,76.7292,1,1 +1,2,1,29.0,26.0,1,0 +0,1,0,65.0,61.9792,1,1 +1,1,0,29.69911764705882,35.5,0,1 +1,2,1,21.0,10.5,0,0 +0,3,0,28.5,7.2292,0,0 +1,2,1,5.0,27.75,3,0 +0,3,0,11.0,46.9,7,0 +0,3,0,22.0,7.2292,0,0 +1,1,1,38.0,80.0,0,1 +0,1,0,45.0,83.475,1,1 +0,3,0,4.0,27.9,5,0 +0,1,0,29.69911764705882,27.7208,0,0 +1,3,0,29.69911764705882,15.2458,2,0 +1,2,1,29.0,10.5,0,1 +0,3,0,19.0,8.1583,0,0 +1,3,1,17.0,7.925,6,0 +0,3,0,26.0,8.6625,2,0 +0,2,0,32.0,10.5,0,0 +0,3,1,16.0,46.9,7,0 +0,2,0,21.0,73.5,0,0 +0,3,0,26.0,14.4542,1,0 +1,3,0,32.0,56.4958,0,0 +0,3,0,25.0,7.65,0,1 +0,3,0,29.69911764705882,7.8958,0,0 +0,3,0,29.69911764705882,8.05,0,0 +1,2,0,0.83,29.0,2,0 +1,3,1,30.0,12.475,0,0 +0,3,0,22.0,9.0,0,0 +1,3,0,29.0,9.5,0,0 +1,3,1,29.69911764705882,7.7875,0,0 +0,1,0,28.0,47.1,0,0 +1,2,1,17.0,10.5,0,0 +1,3,1,33.0,15.85,3,0 +0,3,0,16.0,34.375,4,0 +0,3,0,29.69911764705882,8.05,0,0 +1,1,1,23.0,263.0,5,1 +0,3,0,24.0,8.05,0,0 +0,3,0,29.0,8.05,0,0 +0,3,0,20.0,7.8542,0,0 +0,1,0,46.0,61.175,1,1 +0,3,0,26.0,20.575,3,0 +0,3,0,59.0,7.25,0,0 +0,3,0,29.69911764705882,8.05,0,0 +0,1,0,71.0,34.6542,0,1 +1,1,0,23.0,63.3583,1,1 +1,2,1,34.0,23.0,1,0 +0,2,0,34.0,26.0,1,0 +0,3,1,28.0,7.8958,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,1,0,21.0,77.2875,1,1 +0,3,0,33.0,8.6542,0,0 +0,3,0,37.0,7.925,2,0 +0,3,0,28.0,7.8958,0,0 +1,3,1,21.0,7.65,0,0 +1,3,0,29.69911764705882,7.775,0,0 +0,3,0,38.0,7.8958,0,0 +1,3,1,29.69911764705882,24.15,1,0 +0,1,0,47.0,52.0,0,1 +0,3,1,14.5,14.4542,1,0 +0,3,0,22.0,8.05,0,0 +0,3,1,20.0,9.825,1,0 +0,3,1,17.0,14.4583,0,0 +0,3,0,21.0,7.925,0,0 +0,3,0,70.5,7.75,0,0 +0,2,0,29.0,21.0,1,0 +0,1,0,24.0,247.5208,1,1 +0,3,1,2.0,31.275,6,0 +0,2,0,21.0,73.5,2,0 +0,3,0,29.69911764705882,8.05,0,0 +0,2,0,32.5,30.0708,1,0 +1,2,1,32.5,13.0,0,1 +0,1,0,54.0,77.2875,1,1 +1,3,0,12.0,11.2417,1,0 +0,3,0,29.69911764705882,7.75,0,0 +1,3,0,24.0,7.1417,0,0 +1,3,1,29.69911764705882,22.3583,2,1 +0,3,0,45.0,6.975,0,0 +0,3,0,33.0,7.8958,0,0 +0,3,0,20.0,7.05,0,0 +0,3,1,47.0,14.5,1,0 +1,2,1,29.0,26.0,1,0 +0,2,0,25.0,13.0,0,0 +0,2,0,23.0,15.0458,0,0 +1,1,1,19.0,26.2833,2,1 +0,1,0,37.0,53.1,1,1 +0,3,0,16.0,9.2167,0,0 +0,1,0,24.0,79.2,0,1 +0,3,1,29.69911764705882,15.2458,2,0 +1,3,1,22.0,7.75,0,0 +1,3,1,24.0,15.85,1,0 +0,3,0,19.0,6.75,0,0 +0,2,0,18.0,11.5,0,0 +0,2,0,19.0,36.75,2,0 +1,3,0,27.0,7.7958,0,0 +0,3,1,9.0,34.375,4,0 +0,2,0,36.5,26.0,2,1 +0,2,0,42.0,13.0,0,0 +0,2,0,51.0,12.525,0,0 +1,1,1,22.0,66.6,1,1 +0,3,0,55.5,8.05,0,0 +0,3,0,40.5,14.5,2,0 +0,3,0,29.69911764705882,7.3125,0,0 +0,1,0,51.0,61.3792,1,0 +1,3,1,16.0,7.7333,0,0 +0,3,0,30.0,8.05,0,0 +0,3,0,29.69911764705882,8.6625,0,0 +0,3,0,29.69911764705882,69.55,10,0 +0,3,0,44.0,16.1,1,0 +1,2,1,40.0,15.75,0,0 +0,3,0,26.0,7.775,0,0 +0,3,0,17.0,8.6625,0,0 +0,3,0,1.0,39.6875,5,0 +1,3,0,9.0,20.525,2,0 +1,1,1,29.69911764705882,55.0,1,1 +0,3,1,45.0,27.9,5,0 +0,1,0,29.69911764705882,25.925,0,0 +0,3,0,28.0,56.4958,0,0 +0,1,0,61.0,33.5,0,1 +0,3,0,4.0,29.125,5,0 +1,3,1,1.0,11.1333,2,0 +0,3,0,21.0,7.925,0,0 +0,1,0,56.0,30.6958,0,1 +0,3,0,18.0,7.8542,2,0 +0,3,0,29.69911764705882,25.4667,4,0 +0,1,1,50.0,28.7125,0,1 +0,2,0,30.0,13.0,0,0 +0,3,0,36.0,0.0,0,0 +0,3,1,29.69911764705882,69.55,10,0 +0,2,0,29.69911764705882,15.05,0,0 +0,3,0,9.0,31.3875,6,0 +1,2,0,1.0,39.0,3,1 +1,3,1,4.0,22.025,2,0 +0,1,0,29.69911764705882,50.0,0,1 +1,3,1,29.69911764705882,15.5,1,0 +1,1,0,45.0,26.55,0,0 +0,3,0,40.0,15.5,2,0 +0,3,0,36.0,7.8958,0,0 +1,2,1,32.0,13.0,0,0 +0,2,0,19.0,13.0,0,0 +1,3,1,19.0,7.8542,1,0 +1,2,0,3.0,26.0,2,1 +1,1,1,44.0,27.7208,0,1 +1,1,1,58.0,146.5208,0,1 +0,3,0,29.69911764705882,7.75,0,0 +0,3,0,42.0,8.4042,1,0 +1,3,1,29.69911764705882,7.75,0,0 +0,2,1,24.0,13.0,0,0 +0,3,0,28.0,9.5,0,0 +0,3,0,29.69911764705882,69.55,10,0 +0,3,0,34.0,6.4958,0,0 +0,3,0,45.5,7.225,0,0 +1,3,0,18.0,8.05,0,0 +0,3,1,2.0,10.4625,1,1 +0,3,0,32.0,15.85,1,0 +1,3,0,26.0,18.7875,0,0 +1,3,1,16.0,7.75,0,0 +1,1,0,40.0,31.0,0,1 +0,3,0,24.0,7.05,0,0 +1,2,1,35.0,21.0,0,0 +0,3,0,22.0,7.25,0,0 +0,2,0,30.0,13.0,0,0 +0,3,0,29.69911764705882,7.75,1,0 +1,1,1,31.0,113.275,1,1 +1,3,1,27.0,7.925,0,0 +0,2,0,42.0,27.0,1,0 +1,1,1,32.0,76.2917,0,1 +0,2,0,30.0,10.5,0,0 +1,3,0,16.0,8.05,0,0 +0,2,0,27.0,13.0,0,0 +0,3,0,51.0,8.05,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +1,1,0,38.0,90.0,1,1 +0,3,0,22.0,9.35,0,0 +1,2,0,19.0,10.5,0,0 +0,3,0,20.5,7.25,0,0 +0,2,0,18.0,13.0,0,0 +0,3,1,29.69911764705882,25.4667,4,0 +1,1,1,35.0,83.475,1,1 +0,3,0,29.0,7.775,0,0 +0,2,0,59.0,13.5,0,0 +1,3,1,5.0,31.3875,6,0 +0,2,0,24.0,10.5,0,0 +0,3,1,29.69911764705882,7.55,0,0 +0,2,0,44.0,26.0,1,0 +1,2,1,8.0,26.25,2,0 +0,2,0,19.0,10.5,0,0 +0,2,0,33.0,12.275,0,0 +0,3,1,29.69911764705882,14.4542,1,0 +1,3,1,29.69911764705882,15.5,1,0 +0,2,0,29.0,10.5,0,0 +0,3,0,22.0,7.125,0,0 +0,3,0,30.0,7.225,0,0 +0,1,0,44.0,90.0,2,1 +0,3,1,25.0,7.775,0,0 +1,2,1,24.0,14.5,2,0 +1,1,0,37.0,52.5542,2,1 +0,2,0,54.0,26.0,1,0 +0,3,0,29.69911764705882,7.25,0,0 +0,3,1,29.0,10.4625,2,1 +0,1,0,62.0,26.55,0,1 +0,3,0,30.0,16.1,1,0 +0,3,1,41.0,20.2125,2,0 +1,3,1,29.0,15.2458,2,0 +1,1,1,29.69911764705882,79.2,0,0 +1,1,1,30.0,86.5,0,1 +1,1,1,35.0,512.3292,0,0 +1,2,1,50.0,26.0,1,0 +0,3,0,29.69911764705882,7.75,0,0 +1,3,0,3.0,31.3875,6,0 +0,1,0,52.0,79.65,2,1 +0,1,0,40.0,0.0,0,1 +0,3,1,29.69911764705882,7.75,0,0 +0,2,0,36.0,10.5,0,0 +0,3,0,16.0,39.6875,5,0 +1,3,0,25.0,7.775,1,0 +1,1,1,58.0,153.4625,1,1 +1,1,1,35.0,135.6333,0,1 +0,1,0,29.69911764705882,31.0,0,0 +1,3,0,25.0,0.0,0,0 +1,2,1,41.0,19.5,1,0 +0,1,0,37.0,29.7,1,1 +1,3,1,29.69911764705882,7.75,0,0 +1,1,1,63.0,77.9583,1,1 +0,3,1,45.0,7.75,0,0 +0,2,0,29.69911764705882,0.0,0,0 +0,3,0,7.0,29.125,5,0 +1,3,1,35.0,20.25,2,0 +0,3,0,65.0,7.75,0,0 +0,3,0,28.0,7.8542,0,0 +0,3,0,16.0,9.5,0,0 +1,3,0,19.0,8.05,0,0 +0,1,0,29.69911764705882,26.0,0,1 +0,3,0,33.0,8.6625,0,0 +1,3,0,30.0,9.5,0,0 +0,3,0,22.0,7.8958,0,0 +1,2,0,42.0,13.0,0,0 +1,3,1,22.0,7.75,0,0 +1,1,1,26.0,78.85,0,0 +1,1,1,19.0,91.0792,1,1 +0,2,0,36.0,12.875,0,1 +0,3,1,24.0,8.85,0,0 +0,3,0,24.0,7.8958,0,0 +0,1,0,29.69911764705882,27.7208,0,0 +0,3,0,23.5,7.2292,0,0 +0,1,1,2.0,151.55,3,1 +1,1,0,29.69911764705882,30.5,0,1 +1,1,1,50.0,247.5208,1,1 +1,3,1,29.69911764705882,7.75,0,0 +1,3,0,29.69911764705882,23.25,2,0 +0,3,0,19.0,0.0,0,0 +1,2,1,29.69911764705882,12.35,0,1 +0,3,0,29.69911764705882,8.05,0,0 +1,1,0,0.92,151.55,3,1 +1,1,1,29.69911764705882,110.8833,0,0 +1,1,1,17.0,108.9,1,1 +0,2,0,30.0,24.0,1,0 +1,1,1,30.0,56.9292,0,1 +1,1,1,24.0,83.1583,0,1 +1,1,1,18.0,262.375,4,1 +0,2,1,26.0,26.0,2,0 +0,3,0,28.0,7.8958,0,0 +0,2,0,43.0,26.25,2,0 +1,3,1,26.0,7.8542,0,0 +1,2,1,24.0,26.0,1,0 +0,2,0,54.0,14.0,0,0 +1,1,1,31.0,164.8667,2,1 +1,1,1,40.0,134.5,2,1 +0,3,0,22.0,7.25,0,0 +0,3,0,27.0,7.8958,0,0 +1,2,1,30.0,12.35,0,0 +1,2,1,22.0,29.0,2,0 +0,3,0,29.69911764705882,69.55,10,0 +1,1,1,36.0,135.6333,0,1 +0,3,0,61.0,6.2375,0,0 +1,2,1,36.0,13.0,0,1 +1,3,1,31.0,20.525,2,0 +1,1,1,16.0,57.9792,1,1 +1,3,1,29.69911764705882,23.25,2,0 +0,1,0,45.5,28.5,0,1 +0,1,0,38.0,153.4625,1,1 +0,3,0,16.0,18.0,2,0 +1,1,1,29.69911764705882,133.65,1,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,1,0,29.0,66.6,1,1 +1,1,1,41.0,134.5,0,1 +1,3,0,45.0,8.05,0,0 +0,1,0,45.0,35.5,0,1 +1,2,0,2.0,26.0,2,1 +1,1,1,24.0,263.0,5,1 +0,2,0,28.0,13.0,0,0 +0,2,0,25.0,13.0,0,0 +0,2,0,36.0,13.0,0,0 +1,2,1,24.0,13.0,0,1 +1,2,1,40.0,13.0,0,0 +1,3,1,29.69911764705882,16.1,1,0 +1,3,0,3.0,15.9,2,0 +0,3,0,42.0,8.6625,0,0 +0,3,0,23.0,9.225,0,0 +0,1,0,29.69911764705882,35.0,0,1 +0,3,0,15.0,7.2292,2,0 +0,3,0,25.0,17.8,1,0 +0,3,0,29.69911764705882,7.225,0,0 +0,3,0,28.0,9.5,0,0 +1,1,1,22.0,55.0,1,1 +0,2,1,38.0,13.0,0,0 +1,3,1,29.69911764705882,7.8792,0,0 +1,3,1,29.69911764705882,7.8792,0,0 +0,3,0,40.0,27.9,5,0 +0,2,0,29.0,27.7208,1,0 +0,3,1,45.0,14.4542,1,0 +0,3,0,35.0,7.05,0,0 +0,3,0,29.69911764705882,15.5,1,0 +0,3,0,30.0,7.25,0,0 +1,1,1,60.0,75.25,1,1 +1,3,1,29.69911764705882,7.2292,0,0 +1,3,1,29.69911764705882,7.75,0,0 +1,1,1,24.0,69.3,0,1 +1,1,0,25.0,55.4417,1,1 +0,3,0,18.0,6.4958,1,0 +0,3,0,19.0,8.05,0,0 +0,1,0,22.0,135.6333,0,0 +0,3,1,3.0,21.075,4,0 +1,1,1,29.69911764705882,82.1708,1,0 +1,3,1,22.0,7.25,0,0 +0,1,0,27.0,211.5,2,1 +0,3,0,20.0,4.0125,0,0 +0,3,0,19.0,7.775,0,0 +1,1,1,42.0,227.525,0,0 +1,3,1,1.0,15.7417,2,0 +0,3,0,32.0,7.925,0,0 +1,1,1,35.0,52.0,1,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,2,0,18.0,73.5,0,0 +0,3,0,1.0,46.9,7,0 +1,2,1,36.0,13.0,0,0 +0,3,0,29.69911764705882,7.7292,0,0 +1,2,1,17.0,12.0,0,0 +1,1,0,36.0,120.0,3,1 +1,3,0,21.0,7.7958,0,0 +0,3,0,28.0,7.925,2,0 +1,1,1,23.0,113.275,1,1 +1,3,1,24.0,16.7,2,1 +0,3,0,22.0,7.7958,0,0 +0,3,1,31.0,7.8542,0,0 +0,2,0,46.0,26.0,0,0 +0,2,0,23.0,10.5,0,0 +1,2,1,28.0,12.65,0,0 +1,3,0,39.0,7.925,0,0 +0,3,0,26.0,8.05,0,0 +0,3,1,21.0,9.825,1,0 +0,3,0,28.0,15.85,1,0 +0,3,1,20.0,8.6625,0,0 +0,2,0,34.0,21.0,1,0 +0,3,0,51.0,7.75,0,0 +1,2,0,3.0,18.75,2,0 +0,3,0,21.0,7.775,0,0 +0,3,1,29.69911764705882,25.4667,4,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,3,0,29.69911764705882,6.8583,0,0 +1,1,1,33.0,90.0,1,1 +0,2,0,29.69911764705882,0.0,0,0 +1,3,0,44.0,7.925,0,0 +0,3,1,29.69911764705882,8.05,0,0 +1,2,1,34.0,32.5,2,0 +1,2,1,18.0,13.0,2,0 +0,2,0,30.0,13.0,0,0 +0,3,1,10.0,24.15,2,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,3,0,21.0,7.7333,0,0 +0,3,0,29.0,7.875,0,0 +0,3,1,28.0,14.4,2,0 +0,3,0,18.0,20.2125,2,0 +0,3,0,29.69911764705882,7.25,0,0 +1,2,1,28.0,26.0,1,0 +1,2,1,19.0,26.0,0,0 +0,3,0,29.69911764705882,7.75,0,0 +1,3,0,32.0,8.05,0,1 +1,1,0,28.0,26.55,0,1 +1,3,1,29.69911764705882,16.1,1,0 +1,2,1,42.0,26.0,1,0 +0,3,0,17.0,7.125,0,0 +0,1,0,50.0,55.9,1,1 +1,1,1,14.0,120.0,3,1 +0,3,1,21.0,34.375,4,0 +1,2,1,24.0,18.75,5,0 +0,1,0,64.0,263.0,5,1 +0,2,0,31.0,10.5,0,0 +1,2,1,45.0,26.25,2,0 +0,3,0,20.0,9.5,0,0 +0,3,0,25.0,7.775,1,0 +1,2,1,28.0,13.0,0,0 +1,3,0,29.69911764705882,8.1125,0,0 +1,1,0,4.0,81.8583,2,1 +1,2,1,13.0,19.5,1,0 +1,1,0,34.0,26.55,0,0 +1,3,1,5.0,19.2583,3,0 +1,1,0,52.0,30.5,0,1 +0,2,0,36.0,27.75,3,0 +0,3,0,29.69911764705882,19.9667,1,0 +0,1,0,30.0,27.75,0,1 +1,1,0,49.0,89.1042,1,1 +0,3,0,29.69911764705882,8.05,0,0 +1,3,0,29.0,7.8958,0,0 +0,1,0,65.0,26.55,0,1 +1,1,1,29.69911764705882,51.8625,1,1 +1,2,1,50.0,10.5,0,0 +0,3,0,29.69911764705882,7.75,0,0 +1,1,0,48.0,26.55,0,1 +0,3,0,34.0,8.05,0,0 +0,1,0,47.0,38.5,0,1 +0,2,0,48.0,13.0,0,0 +0,3,0,29.69911764705882,8.05,0,0 +0,3,0,38.0,7.05,0,0 +0,2,0,29.69911764705882,0.0,0,0 +0,1,0,56.0,26.55,0,0 +0,3,0,29.69911764705882,7.725,0,0 +1,3,1,0.75,19.2583,3,0 +0,3,0,29.69911764705882,7.25,0,0 +0,3,0,38.0,8.6625,0,0 +1,2,1,33.0,27.75,3,0 +1,2,1,23.0,13.7917,0,1 +0,3,1,22.0,9.8375,0,0 +0,1,0,29.69911764705882,52.0,0,1 +0,2,0,34.0,21.0,1,0 +0,3,0,29.0,7.0458,1,0 +0,3,0,22.0,7.5208,0,0 +1,3,1,2.0,12.2875,1,0 +0,3,0,9.0,46.9,7,0 +0,2,0,29.69911764705882,0.0,0,0 +0,3,0,50.0,8.05,0,0 +1,3,1,63.0,9.5875,0,0 +1,1,0,25.0,91.0792,1,1 +0,3,1,29.69911764705882,25.4667,4,0 +1,1,1,35.0,90.0,1,1 +0,1,0,58.0,29.7,0,1 +0,3,0,30.0,8.05,0,0 +1,3,0,9.0,15.9,2,0 +0,3,0,29.69911764705882,19.9667,1,0 +0,3,0,21.0,7.25,0,0 +0,1,0,55.0,30.5,0,1 +0,1,0,71.0,49.5042,0,0 +0,3,0,21.0,8.05,0,0 +0,3,0,29.69911764705882,14.4583,0,0 +1,1,1,54.0,78.2667,1,1 +0,3,0,29.69911764705882,15.1,0,0 +0,1,1,25.0,151.55,3,1 +0,3,0,24.0,7.7958,0,0 +0,3,0,17.0,8.6625,0,0 +0,3,1,21.0,7.75,0,0 +0,3,1,29.69911764705882,7.6292,0,0 +0,3,1,37.0,9.5875,0,0 +1,1,1,16.0,86.5,0,1 +0,1,0,18.0,108.9,1,1 +1,2,1,33.0,26.0,2,0 +1,1,0,29.69911764705882,26.55,0,0 +0,3,0,28.0,22.525,0,0 +1,3,0,26.0,56.4958,0,0 +1,3,0,29.0,7.75,0,0 +0,3,0,29.69911764705882,8.05,0,0 +1,1,0,36.0,26.2875,0,1 +1,1,1,54.0,59.4,1,0 +0,3,0,24.0,7.4958,0,0 +0,1,0,47.0,34.0208,0,1 +1,2,1,34.0,10.5,0,1 +0,3,0,29.69911764705882,24.15,0,0 +1,2,1,36.0,26.0,1,0 +0,3,0,32.0,7.8958,0,0 +1,1,1,30.0,93.5,0,1 +0,3,0,22.0,7.8958,0,0 +0,3,0,29.69911764705882,7.225,0,0 +1,1,1,44.0,57.9792,1,1 +0,3,0,29.69911764705882,7.2292,0,0 +0,3,0,40.5,7.75,0,0 +1,2,1,50.0,10.5,0,0 +0,1,0,29.69911764705882,221.7792,0,1 +0,3,0,39.0,7.925,0,0 +0,2,0,23.0,11.5,3,0 +1,2,1,2.0,26.0,2,0 +0,3,0,29.69911764705882,7.2292,0,0 +0,3,0,17.0,7.2292,2,0 +1,3,1,29.69911764705882,22.3583,2,0 +0,3,1,30.0,8.6625,0,0 +1,2,1,7.0,26.25,2,0 +0,1,0,45.0,26.55,0,1 +1,1,1,30.0,106.425,0,0 +0,3,0,29.69911764705882,14.5,0,0 +1,1,1,22.0,49.5,2,1 +1,1,1,36.0,71.0,2,1 +0,3,1,9.0,31.275,6,0 +0,3,1,11.0,31.275,6,0 +1,2,0,32.0,26.0,1,0 +0,1,0,50.0,106.425,1,1 +0,1,0,64.0,26.0,0,0 +1,2,1,19.0,26.0,1,0 +1,2,0,29.69911764705882,13.8625,0,0 +0,3,0,33.0,20.525,2,0 +1,2,0,8.0,36.75,2,0 +1,1,0,17.0,110.8833,2,1 +0,2,0,27.0,26.0,0,0 +0,3,0,29.69911764705882,7.8292,0,0 +1,3,0,22.0,7.225,0,0 +1,3,1,22.0,7.775,0,0 +0,1,0,62.0,26.55,0,0 +1,1,1,48.0,39.6,1,1 +0,1,0,29.69911764705882,227.525,0,0 +1,1,1,39.0,79.65,2,1 +1,3,1,36.0,17.4,1,0 +0,3,0,29.69911764705882,7.75,0,0 +0,3,0,40.0,7.8958,0,0 +0,2,0,28.0,13.5,0,0 +0,3,0,29.69911764705882,8.05,0,0 +0,3,1,29.69911764705882,8.05,0,0 +0,3,0,24.0,24.15,2,0 +0,3,0,19.0,7.8958,0,0 +0,3,1,29.0,21.075,4,0 +0,3,0,29.69911764705882,7.2292,0,0 +1,3,0,32.0,7.8542,0,0 +1,2,0,62.0,10.5,0,0 +1,1,1,53.0,51.4792,2,1 +1,1,0,36.0,26.3875,0,1 +1,3,1,29.69911764705882,7.75,0,0 +0,3,0,16.0,8.05,0,0 +0,3,0,19.0,14.5,0,0 +1,2,1,34.0,13.0,0,0 +1,1,1,39.0,55.9,1,1 +0,3,1,29.69911764705882,14.4583,1,0 +1,3,0,32.0,7.925,0,0 +1,2,1,25.0,30.0,2,0 +1,1,1,39.0,110.8833,2,1 +0,2,0,54.0,26.0,0,0 +0,1,0,36.0,40.125,0,1 +0,3,0,29.69911764705882,8.7125,0,0 +1,1,1,18.0,79.65,2,1 +0,2,0,47.0,15.0,0,0 +1,1,0,60.0,79.2,2,1 +0,3,0,22.0,8.05,0,0 +0,3,0,29.69911764705882,8.05,0,0 +0,3,0,35.0,7.125,0,0 +1,1,1,52.0,78.2667,1,1 +0,3,0,47.0,7.25,0,0 +0,3,1,29.69911764705882,7.75,2,0 +0,2,0,37.0,26.0,1,0 +0,3,0,36.0,24.15,2,0 +1,2,1,29.69911764705882,33.0,0,0 +0,3,0,49.0,0.0,0,0 +0,3,0,29.69911764705882,7.225,0,0 +1,1,0,49.0,56.9292,1,1 +1,2,1,24.0,27.0,3,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,1,0,29.69911764705882,42.4,0,0 +0,3,0,44.0,8.05,0,0 +1,1,0,35.0,26.55,0,0 +0,3,0,36.0,15.55,1,0 +0,3,0,30.0,7.8958,0,0 +1,1,0,27.0,30.5,0,0 +1,2,1,22.0,41.5792,3,0 +1,1,1,40.0,153.4625,0,1 +0,3,1,39.0,31.275,6,0 +0,3,0,29.69911764705882,7.05,0,0 +1,3,1,29.69911764705882,15.5,1,0 +0,3,0,29.69911764705882,7.75,0,0 +0,3,0,35.0,8.05,0,0 +1,2,1,24.0,65.0,3,0 +0,3,0,34.0,14.4,2,0 +0,3,1,26.0,16.1,1,0 +1,2,1,4.0,39.0,3,1 +0,2,0,26.0,10.5,0,0 +0,3,0,27.0,14.4542,1,0 +1,1,0,42.0,52.5542,1,1 +1,3,0,20.0,15.7417,2,0 +0,3,0,21.0,7.8542,0,0 +0,3,0,21.0,16.1,0,0 +0,1,0,61.0,32.3208,0,1 +0,2,0,57.0,12.35,0,0 +1,1,1,21.0,77.9583,0,1 +0,3,0,26.0,7.8958,0,0 +0,3,0,29.69911764705882,7.7333,0,0 +1,1,0,80.0,30.0,0,1 +0,3,0,51.0,7.0542,0,0 +1,1,0,32.0,30.5,0,1 +0,1,0,29.69911764705882,0.0,0,0 +0,3,1,9.0,27.9,5,0 +1,2,1,28.0,13.0,0,0 +0,3,0,32.0,7.925,0,0 +0,2,0,31.0,26.25,2,0 +0,3,1,41.0,39.6875,5,0 +0,3,0,29.69911764705882,16.1,1,0 +0,3,0,20.0,7.8542,0,0 +1,1,1,24.0,69.3,0,1 +0,3,1,2.0,27.9,5,0 +1,3,0,29.69911764705882,56.4958,0,0 +1,3,1,0.75,19.2583,3,0 +1,1,0,48.0,76.7292,1,1 +0,3,0,19.0,7.8958,0,0 +1,1,0,56.0,35.5,0,1 +0,3,0,29.69911764705882,7.55,0,0 +1,3,1,23.0,7.55,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +1,2,1,18.0,23.0,1,0 +0,3,0,21.0,8.4333,0,0 +1,3,1,29.69911764705882,7.8292,0,0 +0,3,1,18.0,6.75,0,0 +0,2,0,24.0,73.5,2,0 +0,3,0,29.69911764705882,7.8958,0,0 +0,3,1,32.0,15.5,2,0 +0,2,0,23.0,13.0,0,0 +0,1,0,58.0,113.275,2,1 +1,1,0,50.0,133.65,2,0 +0,3,0,40.0,7.225,0,0 +0,1,0,47.0,25.5875,0,1 +0,3,0,36.0,7.4958,0,0 +1,3,0,20.0,7.925,1,0 +0,2,0,32.0,73.5,2,0 +0,2,0,25.0,13.0,0,0 +0,3,0,29.69911764705882,7.775,0,0 +0,3,0,43.0,8.05,0,0 +1,1,1,29.69911764705882,52.0,1,1 +1,2,1,40.0,39.0,2,0 +0,1,0,31.0,52.0,1,1 +0,2,0,70.0,10.5,0,0 +1,2,0,31.0,13.0,0,0 +0,2,0,29.69911764705882,0.0,0,0 +0,3,0,18.0,7.775,0,0 +0,3,0,24.5,8.05,0,0 +1,3,1,18.0,9.8417,0,0 +0,3,1,43.0,46.9,7,0 +1,1,0,36.0,512.3292,1,1 +0,3,1,29.69911764705882,8.1375,0,0 +1,1,0,27.0,76.7292,0,1 +0,3,0,20.0,9.225,0,0 +0,3,0,14.0,46.9,7,0 +0,2,0,60.0,39.0,2,0 +0,2,0,25.0,41.5792,3,0 +0,3,0,14.0,39.6875,5,0 +0,3,0,19.0,10.1708,0,0 +0,3,0,18.0,7.7958,0,0 +1,1,1,15.0,211.3375,1,1 +1,1,0,31.0,57.0,1,1 +1,3,1,4.0,13.4167,1,0 +1,3,0,29.69911764705882,56.4958,0,0 +0,3,0,25.0,7.225,0,0 +0,1,0,60.0,26.55,0,0 +0,2,0,52.0,13.5,0,0 +0,3,0,44.0,8.05,0,0 +1,3,1,29.69911764705882,7.7333,0,0 +0,1,0,49.0,110.8833,2,1 +0,3,0,42.0,7.65,0,1 +1,1,1,18.0,227.525,1,1 +1,1,0,35.0,26.2875,0,1 +0,3,1,18.0,14.4542,1,0 +0,3,0,25.0,7.7417,0,0 +0,3,0,26.0,7.8542,1,0 +0,2,0,39.0,26.0,0,0 +1,2,1,45.0,13.5,0,0 +1,1,0,42.0,26.2875,0,1 +1,1,1,22.0,151.55,0,0 +1,3,0,29.69911764705882,15.2458,2,0 +1,1,1,24.0,49.5042,0,1 +0,1,0,29.69911764705882,26.55,0,1 +1,1,0,48.0,52.0,1,1 +0,3,0,29.0,9.4833,0,0 +0,2,0,52.0,13.0,0,0 +0,3,0,19.0,7.65,0,1 +1,1,1,38.0,227.525,0,1 +1,2,1,27.0,10.5,0,1 +0,3,0,29.69911764705882,15.5,0,0 +0,3,0,33.0,7.775,0,0 +1,2,1,6.0,33.0,1,0 +0,3,0,17.0,7.0542,1,0 +0,2,0,34.0,13.0,0,0 +0,2,0,50.0,13.0,0,0 +1,1,0,27.0,53.1,1,1 +0,3,0,20.0,8.6625,0,0 +1,2,1,30.0,21.0,3,0 +1,3,1,29.69911764705882,7.7375,0,0 +0,2,0,25.0,26.0,1,0 +0,3,1,25.0,7.925,1,0 +1,1,1,29.0,211.3375,0,1 +0,3,0,11.0,18.7875,0,0 +0,2,0,29.69911764705882,0.0,0,0 +0,2,0,23.0,13.0,0,0 +0,2,0,23.0,13.0,0,0 +0,3,0,28.5,16.1,0,0 +0,3,1,48.0,34.375,4,0 +1,1,0,35.0,512.3292,0,1 +0,3,0,29.69911764705882,7.8958,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +1,1,0,29.69911764705882,30.0,0,1 +0,1,0,36.0,78.85,1,1 +1,1,1,21.0,262.375,4,1 +0,3,0,24.0,16.1,1,0 +1,3,0,31.0,7.925,0,0 +0,1,0,70.0,71.0,2,1 +0,3,0,16.0,20.25,2,0 +1,2,1,30.0,13.0,0,0 +0,1,0,19.0,53.1,1,1 +0,3,0,31.0,7.75,0,0 +1,2,1,4.0,23.0,2,0 +1,3,0,6.0,12.475,1,1 +0,3,0,33.0,9.5,0,0 +0,3,0,23.0,7.8958,0,0 +1,2,1,48.0,65.0,3,0 +1,2,0,0.67,14.5,2,0 +0,3,0,28.0,7.7958,0,0 +0,2,0,18.0,11.5,0,0 +0,3,0,34.0,8.05,0,0 +1,1,1,33.0,86.5,0,1 +0,3,0,29.69911764705882,14.5,0,0 +0,3,0,41.0,7.125,0,0 +1,3,0,20.0,7.2292,0,0 +1,1,1,36.0,120.0,3,1 +0,3,0,16.0,7.775,0,0 +1,1,1,51.0,77.9583,1,1 +0,1,0,29.69911764705882,39.6,0,0 +0,3,1,30.5,7.75,0,0 +0,3,0,29.69911764705882,24.15,1,0 +0,3,0,32.0,8.3625,0,0 +0,3,0,24.0,9.5,0,0 +0,3,0,48.0,7.8542,0,0 +0,2,1,57.0,10.5,0,1 +0,3,0,29.69911764705882,7.225,0,0 +1,2,1,54.0,23.0,4,0 +0,3,0,18.0,7.75,0,0 +0,3,0,29.69911764705882,7.75,0,1 +1,3,1,5.0,12.475,0,0 +0,3,0,29.69911764705882,7.7375,0,0 +1,1,1,43.0,211.3375,1,1 +1,3,1,13.0,7.2292,0,0 +1,1,1,17.0,57.0,1,1 +0,1,0,29.0,30.0,0,1 +0,3,0,29.69911764705882,23.45,3,0 +0,3,0,25.0,7.05,0,0 +0,3,0,25.0,7.25,0,0 +1,3,1,18.0,7.4958,0,0 +0,3,0,8.0,29.125,5,0 +1,3,0,1.0,20.575,3,0 +0,1,0,46.0,79.2,0,1 +0,3,0,29.69911764705882,7.75,0,0 +0,2,0,16.0,26.0,0,0 +0,3,1,29.69911764705882,69.55,10,0 +0,1,0,29.69911764705882,30.6958,0,0 +0,3,0,25.0,7.8958,0,0 +0,2,0,39.0,13.0,0,0 +1,1,1,49.0,25.9292,0,1 +1,3,1,31.0,8.6833,0,0 +0,3,0,30.0,7.2292,0,0 +0,3,1,30.0,24.15,2,0 +0,2,0,34.0,13.0,0,0 +1,2,1,31.0,26.25,2,0 +1,1,0,11.0,120.0,3,1 +1,3,0,0.42,8.5167,1,0 +1,3,0,27.0,6.975,0,0 +0,3,0,31.0,7.775,0,0 +0,1,0,39.0,0.0,0,1 +0,3,1,18.0,7.775,0,0 +0,2,0,39.0,13.0,0,0 +1,1,1,33.0,53.1,1,1 +0,3,0,26.0,7.8875,0,0 +0,3,0,39.0,24.15,0,0 +0,2,0,35.0,10.5,0,0 +0,3,1,6.0,31.275,6,0 +0,3,0,30.5,8.05,0,0 +0,1,0,29.69911764705882,0.0,0,1 +0,3,1,23.0,7.925,0,0 +0,2,0,31.0,37.0042,2,0 +0,3,0,43.0,6.45,0,0 +0,3,0,10.0,27.9,5,0 +1,1,1,52.0,93.5,2,1 +1,3,0,27.0,8.6625,0,0 +0,1,0,38.0,0.0,0,0 +1,3,1,27.0,12.475,1,1 +0,3,0,2.0,39.6875,5,0 +0,3,0,29.69911764705882,6.95,0,0 +0,3,0,29.69911764705882,56.4958,0,0 +1,2,0,1.0,37.0042,2,0 +1,3,0,29.69911764705882,7.75,0,0 +1,1,1,62.0,80.0,0,1 +1,3,1,15.0,14.4542,1,0 +1,2,0,0.83,18.75,2,0 +0,3,0,29.69911764705882,7.2292,0,0 +0,3,0,23.0,7.8542,0,0 +0,3,0,18.0,8.3,0,0 +1,1,1,39.0,83.1583,2,1 +0,3,0,21.0,8.6625,0,0 +0,3,0,29.69911764705882,8.05,0,0 +1,3,0,32.0,56.4958,0,0 +1,1,0,29.69911764705882,29.7,0,1 +0,3,0,20.0,7.925,0,0 +0,2,0,16.0,10.5,0,0 +1,1,1,30.0,31.0,0,0 +0,3,0,34.5,6.4375,0,0 +0,3,0,17.0,8.6625,0,0 +0,3,0,42.0,7.55,0,0 +0,3,0,29.69911764705882,69.55,10,0 +0,3,0,35.0,7.8958,0,0 +0,2,0,28.0,33.0,1,0 +1,1,1,29.69911764705882,89.1042,1,1 +0,3,0,4.0,31.275,6,0 +0,3,0,74.0,7.775,0,0 +0,3,1,9.0,15.2458,2,0 +1,1,1,16.0,39.4,1,1 +0,2,1,44.0,26.0,1,0 +1,3,1,18.0,9.35,1,0 +1,1,1,45.0,164.8667,2,0 +1,1,0,51.0,26.55,0,1 +1,3,1,24.0,19.2583,3,0 +0,3,0,29.69911764705882,7.2292,0,0 +0,3,0,41.0,14.1083,2,0 +0,2,0,21.0,11.5,1,0 +1,1,1,48.0,25.9292,0,1 +0,3,1,29.69911764705882,69.55,10,0 +0,2,0,24.0,13.0,0,0 +1,2,1,42.0,13.0,0,0 +1,2,1,27.0,13.8583,1,0 +0,1,0,31.0,50.4958,0,1 +0,3,0,29.69911764705882,9.5,0,0 +1,3,0,4.0,11.1333,2,0 +0,3,0,26.0,7.8958,0,0 +1,1,1,47.0,52.5542,2,1 +0,1,0,33.0,5.0,0,1 +0,3,0,47.0,9.0,0,0 +1,2,1,28.0,24.0,1,0 +1,3,1,15.0,7.225,0,0 +0,3,0,20.0,9.8458,0,0 +0,3,0,19.0,7.8958,0,0 +0,3,0,29.69911764705882,7.8958,0,0 +1,1,1,56.0,83.1583,1,1 +1,2,1,25.0,26.0,1,0 +0,3,0,33.0,7.8958,0,0 +0,3,1,22.0,10.5167,0,0 +0,2,0,28.0,10.5,0,0 +0,3,0,25.0,7.05,0,0 +0,3,1,39.0,29.125,5,0 +0,2,0,27.0,13.0,0,0 +1,1,1,19.0,30.0,0,1 +0,3,1,29.69911764705882,23.45,3,0 +1,1,0,26.0,30.0,0,1 +0,3,0,32.0,7.75,0,0 From 5a3608e0e0f540c36cd6c9bdbfed90bb6748e6e4 Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 22:33:15 +0530 Subject: [PATCH 05/10] [cdt-98] - tests fixed Signed-off-by: ashish --- src/commands/showfile.ts | 6 +++++- test/commands/showfile.test.ts | 15 ++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts index b2b9659..e6ea0ef 100644 --- a/src/commands/showfile.ts +++ b/src/commands/showfile.ts @@ -7,6 +7,7 @@ import Utilities from '../utilities/utilities' export default class ShowFile extends Command { static description = 'File Minifier' + static DEFAULT_COUNT = 10 static flags = { help: flags.help({char: 'h'}), file: flags.string({char: 'f' , description: 'formatted file to be shown'}), @@ -37,7 +38,10 @@ export default class ShowFile extends Command { } private getFileLinesToShow(flags: any) { - return flags.num || 10 + if(flags.num && flags.num>0) // if value available and valid + return flags.num; + else + return ShowFile.DEFAULT_COUNT; } // tslint:disable-next-line:no-unused private checkParameters(flags: unknown, args: { [p: string]: any }) { diff --git a/test/commands/showfile.test.ts b/test/commands/showfile.test.ts index 5a2e29a..a53092c 100644 --- a/test/commands/showfile.test.ts +++ b/test/commands/showfile.test.ts @@ -13,32 +13,33 @@ describe('showfile', () => { .stdout() .command(['showfile', 'test/resources/showfile.csv']) .it('check 10 lines are found', ctx => { - expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') + expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') }) test .stdout() .command(['showfile', 'test/resources/showfile.csv', '-n', '5']) .it('check 5th line is found', ctx => { - expect(ctx.stdout).to.contain('|0 |3 |0 |35.0|8.05 |0 |0 |') + expect(ctx.stdout).to.contain('|0 |3 |0 |35.0|8.05 |0 |0 |') }) test .stdout() - .command(['showfile', 'test/resources/showfile.csv', '-n', '900']) + .command (['showfile', 'test/resources/showfile.csv', '-n', '900']) .it('check if the given number is greater than total lines', ctx => { - expect(ctx.stdout).to.contain('|0 |3 |0 |32.0 |7.75 |0 |0 |') + expect(ctx.stdout).to.contain('|0 |3 |0 |32.0 |7.75 |0 |0 |') }) + test .stdout() .command(['showfile', 'test/resources/showfile.csv', '-n', '900']) .it('check if 900 count is used, it shows only total present rows', ctx => { expect(ctx.stdout).to.contain('showing top 892 rows.') }) + test .stdout() .command(['showfile', 'test/resources/showfile.csv', '-n', '0']) - .it('check if the given number is greater than total lines', ctx => { - expect(ctx.stdout).to.contain('|Survived|Pclass|Sex|Age|Fare|Family_count|Cabin_ind |') + .it('check if the given number is invalid then show default 10 lines', ctx => { + expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') }) - //|Survived|Pclass|Sex|Age|Fare|Family_count|Cabin_ind | }) From 780d472d6c7e5eb1e254b229dc33fd32f95da459 Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 22:49:16 +0530 Subject: [PATCH 06/10] [cdt-98] - tests commented Signed-off-by: ashish --- test/commands/avro.test.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/commands/avro.test.ts b/test/commands/avro.test.ts index 8f63f89..7058943 100644 --- a/test/commands/avro.test.ts +++ b/test/commands/avro.test.ts @@ -49,16 +49,16 @@ describe('avro', () => { expect(ctx.stdout).to.contain('Schema file is not provided') }) - - // TODO: BUG this is just skipping test , find a way to implement wait() etc. - test - .stdout() - .command(['avro', '-f', 'test/resources/avro/person.avro', 'get_schema']) - .it('if get_schema outputs to console', ctx => { - setTimeout(() => - expect(ctx.stdout).to.contain('success') - , 9000) // wait for it to write stuff on console - }) + // + // // TODO: this was is just skipping test , find a way to implement wait() etc. + // test + // .stdout() + // .command(['avro', '-f', 'test/resources/avro/person.avro', 'get_schema']) + // .it('if get_schema outputs to console', ctx => { + // setTimeout(() => + // expect(ctx.stdout).to.contain('success') + // , 9000) // wait for it to write stuff on console + // }) test .stdout() From ff57221478f91d2ea35b6a73e5d052288f8c17aa Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 22:55:13 +0530 Subject: [PATCH 07/10] [cdt-98] - tslint fixed Signed-off-by: ashish --- src/commands/showfile.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/showfile.ts b/src/commands/showfile.ts index e6ea0ef..9c07e52 100644 --- a/src/commands/showfile.ts +++ b/src/commands/showfile.ts @@ -38,10 +38,10 @@ export default class ShowFile extends Command { } private getFileLinesToShow(flags: any) { - if(flags.num && flags.num>0) // if value available and valid - return flags.num; + if (flags.num && flags.num > 0) // if value available and valid + return flags.num else - return ShowFile.DEFAULT_COUNT; + return ShowFile.DEFAULT_COUNT } // tslint:disable-next-line:no-unused private checkParameters(flags: unknown, args: { [p: string]: any }) { From 5fe0ceab46a8e320c4517a83072939d0f2310272 Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 23:01:18 +0530 Subject: [PATCH 08/10] [cdt-98] - renamed to view command Signed-off-by: ashish --- src/commands/{showfile.ts => view.ts} | 8 ++++---- test/commands/{showfile.test.ts => view.test.ts} | 14 +++++++------- test/resources/{showfile.csv => csv/test_view.csv} | 0 3 files changed, 11 insertions(+), 11 deletions(-) rename src/commands/{showfile.ts => view.ts} (94%) rename test/commands/{showfile.test.ts => view.test.ts} (74%) rename test/resources/{showfile.csv => csv/test_view.csv} (100%) diff --git a/src/commands/showfile.ts b/src/commands/view.ts similarity index 94% rename from src/commands/showfile.ts rename to src/commands/view.ts index 9c07e52..b4e7266 100644 --- a/src/commands/showfile.ts +++ b/src/commands/view.ts @@ -4,8 +4,8 @@ import {Command, flags} from '@oclif/command' import Logger from '../utilities/logger' import Utilities from '../utilities/utilities' -export default class ShowFile extends Command { - static description = 'File Minifier' +export default class View extends Command { + static description = 'View file content and more' static DEFAULT_COUNT = 10 static flags = { @@ -18,7 +18,7 @@ export default class ShowFile extends Command { // required FILE async run() { - const {args, flags} = this.parse(ShowFile) + const {args, flags} = this.parse(View) args.file = this.getFilePath(flags, args) args.num = this.getFileLinesToShow(flags) @@ -41,7 +41,7 @@ export default class ShowFile extends Command { if (flags.num && flags.num > 0) // if value available and valid return flags.num else - return ShowFile.DEFAULT_COUNT + return View.DEFAULT_COUNT } // tslint:disable-next-line:no-unused private checkParameters(flags: unknown, args: { [p: string]: any }) { diff --git a/test/commands/showfile.test.ts b/test/commands/view.test.ts similarity index 74% rename from test/commands/showfile.test.ts rename to test/commands/view.test.ts index a53092c..7f73000 100644 --- a/test/commands/showfile.test.ts +++ b/test/commands/view.test.ts @@ -1,9 +1,9 @@ import {expect, test} from '@oclif/test' -describe('showfile', () => { +describe('view', () => { test .stdout() - .command(['showfile']) + .command(['view']) .exit(0) .it('File path not passed', ctx => { expect(ctx.stdout).to.contain('File path not passed') @@ -11,34 +11,34 @@ describe('showfile', () => { test .stdout() - .command(['showfile', 'test/resources/showfile.csv']) + .command(['view', 'test/resources/csv/test_view.csv']) .it('check 10 lines are found', ctx => { expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') }) test .stdout() - .command(['showfile', 'test/resources/showfile.csv', '-n', '5']) + .command(['view', 'test/resources/csv/test_view.csv', '-n', '5']) .it('check 5th line is found', ctx => { expect(ctx.stdout).to.contain('|0 |3 |0 |35.0|8.05 |0 |0 |') }) test .stdout() - .command (['showfile', 'test/resources/showfile.csv', '-n', '900']) + .command (['view', 'test/resources/csv/test_view.csv', '-n', '900']) .it('check if the given number is greater than total lines', ctx => { expect(ctx.stdout).to.contain('|0 |3 |0 |32.0 |7.75 |0 |0 |') }) test .stdout() - .command(['showfile', 'test/resources/showfile.csv', '-n', '900']) + .command(['view', 'test/resources/csv/test_view.csv', '-n', '900']) .it('check if 900 count is used, it shows only total present rows', ctx => { expect(ctx.stdout).to.contain('showing top 892 rows.') }) test .stdout() - .command(['showfile', 'test/resources/showfile.csv', '-n', '0']) + .command(['view', 'test/resources/csv/test_view.csv', '-n', '0']) .it('check if the given number is invalid then show default 10 lines', ctx => { expect(ctx.stdout).to.contain('|1 |2 |1 |14.0 |30.0708|1 |0 |') }) diff --git a/test/resources/showfile.csv b/test/resources/csv/test_view.csv similarity index 100% rename from test/resources/showfile.csv rename to test/resources/csv/test_view.csv From ac9818301c9052b70fc19b54287788f747550e8c Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 23:33:38 +0530 Subject: [PATCH 09/10] [cdt-98] - some fixes Signed-off-by: ashish --- src/commands/view.ts | 11 +++++++++-- test/commands/view.test.ts | 2 +- test/resources/csv/test_view_small.csv | 14 ++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 test/resources/csv/test_view_small.csv diff --git a/src/commands/view.ts b/src/commands/view.ts index b4e7266..adfeb16 100644 --- a/src/commands/view.ts +++ b/src/commands/view.ts @@ -1,5 +1,6 @@ // code here to write the tool for csv tool show import {Command, flags} from '@oclif/command' +import * as chalk from 'chalk' import Logger from '../utilities/logger' import Utilities from '../utilities/utilities' @@ -11,7 +12,7 @@ export default class View extends Command { static flags = { help: flags.help({char: 'h'}), file: flags.string({char: 'f' , description: 'formatted file to be shown'}), - num: flags.string({char: 'n' , description: 'rows to show'}) + num: flags.string({char: 'n' , description: `no. of rows to show, default:${View.DEFAULT_COUNT}`}) } static args = [{name: 'file'}] @@ -74,13 +75,19 @@ export default class View extends Command { } } + // -1 need to be done to exclude header + // ${chalk.yellow('Avro Schema') + Logger.info(this, `Total ${chalk.greenBright(rows.length - 2)} records in file.`) + Logger.info(this, `showing top ${chalk.yellow(recordsToShow - 1)} records.`) + this.printRow(rows[0].split(','), widthArray, '+', true) for (let i = 0; i < recordsToShow; i++) { let row = rows[i] this.printRow(row.split(','), widthArray, '|', false) this.printRow(row.split(','), widthArray, '+', true) } - this.log(`showing top ${recordsToShow} rows.`) + + Logger.success(this, 'done.\n') } private printRow(row: any, widthArray: any, seperator: any, isLineSeparator: any) { diff --git a/test/commands/view.test.ts b/test/commands/view.test.ts index 7f73000..7edb17d 100644 --- a/test/commands/view.test.ts +++ b/test/commands/view.test.ts @@ -24,7 +24,7 @@ describe('view', () => { test .stdout() - .command (['view', 'test/resources/csv/test_view.csv', '-n', '900']) + .command(['view', 'test/resources/csv/test_view.csv', '-n', '900']) .it('check if the given number is greater than total lines', ctx => { expect(ctx.stdout).to.contain('|0 |3 |0 |32.0 |7.75 |0 |0 |') }) diff --git a/test/resources/csv/test_view_small.csv b/test/resources/csv/test_view_small.csv new file mode 100644 index 0000000..ac57134 --- /dev/null +++ b/test/resources/csv/test_view_small.csv @@ -0,0 +1,14 @@ +Survived,Pclass,Sex,Age,Fare,Family_count,Cabin_ind +0,3,0,22.0,7.25,1,0 +1,1,1,38.0,71.2833,1,1 +1,3,1,26.0,7.925,0,0 +1,1,1,35.0,53.1,1,1 +0,3,0,35.0,8.05,0,0 +0,3,0,29.69911764705882,8.4583,0,0 +0,1,0,54.0,51.8625,0,1 +0,3,0,2.0,21.075,4,0 +1,3,1,27.0,11.1333,2,0 +1,2,1,14.0,30.0708,1,0 +1,3,1,4.0,16.7,2,1 +1,1,1,58.0,26.55,0,1 +0,3,0,20.0,8.05,0,0 From 7edf5af226de452f24d9f9a3bd6e65ee31d6206f Mon Sep 17 00:00:00 2001 From: ashish Date: Mon, 20 Apr 2020 23:40:02 +0530 Subject: [PATCH 10/10] [cdt-98] - test fixed Signed-off-by: ashish --- test/commands/view.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/commands/view.test.ts b/test/commands/view.test.ts index 7edb17d..07752bd 100644 --- a/test/commands/view.test.ts +++ b/test/commands/view.test.ts @@ -33,7 +33,7 @@ describe('view', () => { .stdout() .command(['view', 'test/resources/csv/test_view.csv', '-n', '900']) .it('check if 900 count is used, it shows only total present rows', ctx => { - expect(ctx.stdout).to.contain('showing top 892 rows.') + expect(ctx.stdout).to.contain('showing top 891 records.') }) test