User:Jay (CIS-A2K)/Report 2
Name: Jay Prakash
Position: Intern (tech), Access to Knowledge
Report period: 1 Dec 2020 – 31 Dec 2020
1 Dec 2020 - 15 Dec 2020
editIn the fourth (previous) week of my Internship, I had two video calls with Bodhisattwa Mandal, Wikidata Co-ordinator, to discuss the next project which was Wikidata Lexeme tool बोध (bodh). This tool will allow users to login using Wikimedia OAuth and let them add and edit the sense/forms/statements from their interface in an efficient way.
So in the this fifth week of my Internship, I started feasibility and Wikidata APIs study. Since Wikidata API is very different from MediaWiki APIs. Following Wikidata APIs modules were finalized to use.
- wbladdform
- wbladdsense
- wbremoveclaims
- wbgetentities
- wbleditsenseelements
- wbleditformelements
Now after feasibility study, I have decided three main frameworks to develop the tool.
- Flask as a backend framework: Python’s Flask framework is lightweight and easy to deploy-able web framework.
- React as a Frontend framework: Since this tool has to manage lots of data and we will make lots of Ajax requests to edit/create/delete then it will be very hard to manage DOM (HTML) elements by just vanilla JavaScript or jQuery. I decided to take Facebook’s React framework as Frontend.
- Material-UI as UI Component: Material design is dominating nowadays. Websites such as Gmail, Reddit, Dropbox, and Pinterest are using Material design.
In the sixth week, I mainly worked on two things.
- wikiApi.js module: In order to make the tool component modular, I wrote a WikiApi module which was a helper function library. This module contains things like making SPARQL query requests to get items.
- Basic backend: Previous week, I decided to take Flask as a backend framework. So this week, I actually wrote code for OAuth in the backend. This was not challenging for me as my other toolforge tools are also based on OAuth but the tricky part was that we do not just need to authenticate but also make the edits on Wikidata with user access token and their session.
- /
- /login
- /logout
- /oauth-callback
- /api/profile
- /api/editform
Both work has been done in the sixth week.
16 Dec 2020 - 31 Dec 2020
editSeventh week did not go as per plan. I had some medical problems during this period. I have notified my manager Tito Dutta Ji. The only thing, I did, was basic app deployment on 23 Dec 2020 and made an edit by tool after OAuth. See Lexeme:L342662.
In the eighth week of my internship, I extensively wrote the backend to include the following Wikidata API routes.
- /api/createform
- /api/createsense
- /api/deleteitem
- /api/editsense
I added flake8 testing to the backend for continuous integration/development. Apart from that, I had one video call and one telephonic conversation with Bodhisattwa Mandal Ji in this week to understand column structure for the frontend so that I can start work on the frontend just after completing the backend without any delay. I almost finished the backend work this week.
Future work
edit- Work on frontend
- Take the Wikimedia Gerrit repo for the tool.
- Make Phabricator tool component
- Get OAuth consumer credentials
- Add tool to Wikimedia’s Jenkins CI/CD