- Integrate with Metabase
- Create a working API for Metabase in Avni Server
- Develop UI for the Admin
- Setup Dashboard with Stats on Metabase
- Define and implement all tandard dashboards that can be created on Metabase
A working API for Metabase was built in the week before this.
But the code did not follow good coding practises.
For example the famous DRY principle was being violated.
So this week was basically about refactoring the code so that it adheres to the benchmarks of a good code base!
- DRY
- Code Smell
- Primitive Obsession
- Generic Method
- Commit link
- Still some code smell and primitive obsesion is left to be removed which will be removed in Week2!
Although this week was also mainly about refactoring the code
But a major chunk of it also went into resolving the errors caused due to some bad changes in last commit.
It took me more than expected time to find and resolve the bug in Groups(Earlier PermissionsGroup).
Also the MetabaseRepository was broken down into smaller and specific parts this week!
- Got to know about debugging at different levels
- Got a feel of OOPs like how we break down into smaller components
- Had to debug and find where was problem in PermissionsGroup logic ,was able to fix it!
- Had to reduce down the MetabaseRepository into smaller and specific components ,was able to do that!
- Still some primitive obsession left to be fixed. I am still using Map<> for the graph of permissions
- Commit link
In the very beginning of the week the code I had written until now , which automated the setup of DB,Group,Collection,Permissions , got merged into the main code base. Besides this , the week was basically about researching how XRays work , how visualizations are made with questions in Metabase. Also a sample Dashboard was made by adding data for about 20 people in Avni (but couldnt enroll them into programs as the option wasnt showing up! )
- Working of XRays
- Visualizations in Metabase
- Had to find out how XRays worked, no formal documentation was available!
- Wasn't able to enroll people into programs in Avni!
- PR link
This week was about building sample dashboards manually via UI!
- N.A.
- Created a dashboard and it was reviewed,the stats which was not very useful/which would bloat up the screen was removed
- The second dashboard is yet to be reviewed
This week I figured out which tables in OpenCHS need to be used to proceed ahead in our goal!
- Learnt about schemas in Databases
- Wasn't able to find the user schema tables in Avni DB
- Had to setup Avni ETL on my machine , and run it in order to get those tables!
This week I started creating the API to automate the creation of questions in Metabase!
- Object Mapper class in Jackson
- I wrote down the code to automate the questions but strangely it wasn't yielding correct response each and every time.
- I figured out that the API response isn't the expected one each time
- Couldnt complete the code, the perfect working code is yet to be written!
Questions creation has been automated successfully finally(for "subject types" + "Address" currently)!
- TimeUnit
- I was not able to find out why sending a POST req from POSTMAN yields the correct response but doing the same from code didnt yield the same expected output.
- Finally after investing a lot of time I realized database sync needs to complete before info related to it can be extracted.
- Therefore I implemented code to wait for sync to complete
Questions creation has been automated successfully finally(for "Programs" + "Address", "Program Encounters" + "Address" currently)!
- PostConstruct
- Successfully used the fucntions and APIs created in last week to proceed ahead!
Questions creation has been automated for "Address" , "Media" and "Sync Telemetry" Tables!
- Created some new functions to cover up the cases for individual tables!
Tried to analyze the API request body which is sent for building reports! On the evening of the last date of this week I got a review for my previous commits!!
- The request body so large , I realized many things need to be generalized !
- Couldn't really complete the process of analysis and plan on how to do this!
I am fixing my code according to the comments made last week!
- Fixed a lot of code
- Couldnt completely fix all of it!
Added proper classes ,so that we return proper objects
- Done with code fixing