Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate PR's #179

Closed
wants to merge 28 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4f9515f
Update dateparser.spec.ts
shashwatm1111 Jul 18, 2023
5392f1a
Updates on all files
shashwatm1111 Jul 19, 2023
1a3eeeb
Update csv-adapter.service.spec.ts
shashwatm1111 Jul 19, 2023
160a449
Update dataset.service.spec.ts
shashwatm1111 Jul 20, 2023
44bede3
update csvcleaner
shashwatm1111 Jul 20, 2023
a038bd6
updates
shashwatm1111 Jul 24, 2023
af81d17
added cases
shashwatm1111 Jul 26, 2023
b5e85de
updates
shashwatm1111 Jul 27, 2023
12e3e68
Updates
shashwatm1111 Jul 31, 2023
b165f0b
final dimension service all covered except one old func
shashwatm1111 Aug 4, 2023
2ccb7f4
more
shashwatm1111 Aug 4, 2023
5230f97
Revert "more"
shashwatm1111 Aug 4, 2023
12b6fec
updates
shashwatm1111 Aug 4, 2023
298ca4b
Update dimension-grammar.service.spec.ts
shashwatm1111 Aug 4, 2023
e98e632
yee
shashwatm1111 Aug 4, 2023
62f70ed
Merge branch 'test_case' of https://github.com/shashwatm1111/cQube-in…
shashwatm1111 Aug 4, 2023
e60f717
Update query-builder.service.spec.ts
shashwatm1111 Aug 4, 2023
161249e
Implementation - QuoteChar
shashwatm1111 Aug 30, 2023
5fb7706
Implementation - csv-delimiter
shashwatm1111 Aug 30, 2023
c7448ed
Refactor CSVReader and add tests
Himasnhu-AT Feb 25, 2024
b28f142
Update CSV delimiter in config.json and fix CSV parsing***
Himasnhu-AT Feb 25, 2024
d159b12
Implement FKSearch
shashwatm1111 Jun 12, 2023
ca32a9a
Update
shashwatm1111 Jul 24, 2023
89ca725
Add test case to cover edge cases
Himasnhu-AT Feb 25, 2024
0296a57
progression_mapper
shashwatm1111 Jul 13, 2023
2d124a5
Merge branch 'pr/151' into consolepr
Himasnhu-AT Mar 31, 2024
8b6073f
Merge branch 'pr/164' into consolepr
Himasnhu-AT Mar 31, 2024
fcf699b
Merge branch 'pr/165' into consolepr
Himasnhu-AT Mar 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 9 additions & 17 deletions impl/c-qube/ingest/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"globals": {
"onlyCreateWhitelisted": true
"onlyCreateWhitelisted": true,
"csvDelimiter": ";",
"caseSensitiveFKSearch": false,
"quoteChar": "`"
},
"dimensions": {
"namespace": "dimensions",
Expand Down Expand Up @@ -68,9 +71,7 @@
"location": "./output/programs/pm-poshan"
},
"dimensions": {
"whitelisted": [
"district,categorypm"
],
"whitelisted": ["district,categorypm"],
"blacklisted": []
}
},
Expand All @@ -86,10 +87,7 @@
"location": "./output/programs/nas"
},
"dimensions": {
"whitelisted": [
"district,lo,subject,grade",
"state,lo,subject,grade"
],
"whitelisted": ["district,lo,subject,grade", "state,lo,subject,grade"],
"blacklisted": []
}
},
Expand All @@ -105,10 +103,7 @@
"location": "./output/programs/udise"
},
"dimensions": {
"whitelisted": [
"district,categoryudise",
"state,categoryudise"
],
"whitelisted": ["district,categoryudise", "state,categoryudise"],
"blacklisted": []
}
},
Expand Down Expand Up @@ -144,10 +139,7 @@
"location": "./output/programs/pgi"
},
"dimensions": {
"whitelisted": [
"state,district,categorypgi",
"state,categorypgi"
],
"whitelisted": ["state,district,categorypgi", "state,categorypgi"],
"blacklisted": []
}
},
Expand All @@ -173,4 +165,4 @@
}
}
]
}
}
3 changes: 3 additions & 0 deletions impl/c-qube/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"cache-manager": "^5.2.1",
"cache-manager-redis-store": "^3.0.1",
"chalk": "4.1.2",
"cli-progress": "^3.12.0",
"csv-parser": "^3.0.0",
"csv-writer": "^1.6.0",
"csvtojson": "^2.0.10",
Expand All @@ -42,6 +43,7 @@
"fast-memoize": "^2.5.2",
"ioredis": "^5.3.2",
"lodash": "^4.17.21",
"nest-winston": "^1.9.3",
"nestjs-pino": "^3.1.2",
"nodejs-polars": "^0.7.2",
"pg": "^8.10.0",
Expand All @@ -52,6 +54,7 @@
"retry": "^0.13.1",
"rxjs": "^7.2.0",
"to-json-schema": "^0.2.5",
"winston": "^3.10.0",
"yargs": "^17.7.1"
},
"devDependencies": {
Expand Down
9 changes: 5 additions & 4 deletions impl/c-qube/src/app.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ describe('AppController', () => {
appController = app.get<AppController>(AppController);
});

describe('root', () => {
it('should return "Hello World!"', () => {
expect('Hello World!').toBe('Hello World!');
});
it('should return "Hello World!"', () => {
const expectedResponse = 'Hello World!';
const response = appController.getHello();
expect(response).toEqual(expectedResponse);
});
});

22 changes: 16 additions & 6 deletions impl/c-qube/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import { VizService } from './services/viz/viz.service';
import { DimensionGrammarService } from './services/csv-adapter/parser/dimension-grammar/dimension-grammar.service';
import { Pool } from 'pg';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { WinstonModule } from 'nest-winston';
import * as winston from 'winston';
const databasePoolFactory = async (configService: ConfigService) => {
return new Pool({
user: configService.get('DB_USERNAME'),
Expand All @@ -24,11 +26,19 @@ const databasePoolFactory = async (configService: ConfigService) => {
});
};
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true,
}),
],
imports: [
ConfigModule.forRoot({
isGlobal: true,
}),
WinstonModule.forRoot({
level: 'silly',
format: winston.format.simple(), // Use the desired log format
transports: [
new winston.transports.File({ filename: 'logfile.log' }) // Specify the file to which logs should be written
]
})
],

controllers: [AppController],
providers: [
AppService,
Expand All @@ -50,4 +60,4 @@ const databasePoolFactory = async (configService: ConfigService) => {
},
],
})
export class AppModule {}
export class AppModule {}
20 changes: 20 additions & 0 deletions impl/c-qube/src/app.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Test, TestingModule } from "@nestjs/testing";
import { AppService } from "./app.service";

describe('AppService', () => {
let appService: AppService;

beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [AppService],
}).compile();

appService = module.get<AppService>(AppService);
});

it('should return "KPI created"', () => {
const expectedResponse = 'KPI created';
const response = appService.createKPI();
expect(response).toEqual(expectedResponse);
});
});
Loading
Loading