GSoC’2022 with AOSSIE Organization

Subhangi Choudhary
7 min readJul 7, 2022

--

Hello everyone, here is my blog where I will be describing my overall work which I will be doing weekly-wise in my project AOSSIE Scholar Extension (https://gitlab.com/aossie/aossie-scholar).

The project aims to provide information about the researchers and determine their overall performance by calculating indexes and computing metrics functions. It scrapes raw data from the Google Scholar website and then populates the contents like the number of publications and citations done by the author per year, the list of visualization metrics such as h-index, m-index, g-index, o-index, and the co-authors with which he has worked with. The Google Chrome-based browser is pretty fast and is very successful in extracting and computing metrics for measuring the scholar’s performance. But, the extension is not cross-browser compatible and there are a lot of implementations to be done so that it increases the flexibility and support of the extension.

My objective is to modify the features and optimize the overall outlook of the project and make it work across all major browsers, as well as improve
the performance of the current backend. It involves adding some key
features to the existing application, such as user login and signup page. The
frontend improvements involve complete work across all pages, as well as
backend optimizations which involve integrating frameworks such as
JQuery and TypeScript to make the calculations more accurate and code
more developer-friendly. It also involves enhancing the current CI/CD and
testing methods, which will make the code more efficient and versatile.

Work Summary(Weekly)

Coding Phase 1

Week 1: Worked on the new UI and design of the profile page of the author. Developed a skeletal front-end/design for displaying the above functionality with modifications in spinner and layout. The profile page has been divided into four sections which are the side navbar/header displaying the name, post, publications count, and citations count of a researcher, then on the RHS is the Graphs(publications/citations per year), Metrics Table(indexes), and the total publications of an author with the list of the books published in a year and the co-authors' data.

Week 2: Implemented Doughnut chart for displaying the number of publications done by an author per year. Made and restructured the bar charts, popups, and buttons to follow the new UI design. The color of the bar charts giving information on the number of citations of a research paper is changed, as well as a new doughnut chart is added to give more insights into a researcher’s performance visually i.e count of publications/year. Also added hovertext labels and inside/outside labels with titles and displays are added to have a more clear and more pictured view.

Week 3: Injected a new button on the Google Scholar page website for navigating directly to the profile page of the author with the addition of the country-list dropdown sidewise according to the new UI. The navigation button is addressing how the users will get around within the extension and will provide “way-finding” for the user as they explore the experience. This button will always remain consistent when diving deeper into pages and can also provide the current page title as a reference. It adds the scholar to
AOSSIE Scholar’s database and calculate his/her performance directly, without the need to enter fields in the extension’s popup page manually.

Week 4: Worked on replacing the javascript dom functions with jQuery to make the codebase more refined and polished and adding jQuery selectors and events to the existing functions and manipulating HTML and CSS event methods. This will be less time-consuming and there will also be no requirement for handling the multi-browser compatibility issues. Moreover, jQuery is an optimized technique for web designing and it handles DOM manipulation very fast and accurately.

Week 5: Implemented changing the Axios HTTP Request to fetch API. Converted Axios to fetch API as fetch is a built-in module and Axios is a third-party module so by using fetch, the migration becomes easier for the extension to support Manifest v3. Changed the structure of Axios.get and Axios.put to fetch with data JSON and request body parameters respectively converting itself to JSON string.

Week 6: Tested and debugged any backend bugs present in the extension. Modified the unit test cases for all backend modules and made a summarized report of the functionalities done till now. Implemented adding the typescript support to the extension as it simplifies JavaScript code, making it easier to read and debug. Created a tsconfig.json file with a typescript compiler which adds data types to all the functions and parameters. Added typescript code providing highly productive development tools for JavaScript IDEs and practices, like static checking, and is also open-source programming which is totally beneficial and relatable to this project. Implemented additional features like strict type binding (variables are bound to specific data types) to JavaScript which can also be compiled down to JavaScript as well, hence proved to be a great move to improve the JS functions and make the code cleaner. Modified the mathematical calculations on the profile.js page and multiple values are being used as parameters/ assigned during calculations and this makes the calculations prone to errors because if the datatype of variable changes during handling, it will result in the end value being highly inaccurate so adding typescript removes all this error along with streamlining TypeScript compilation.

PHASE 2

Week 7: Implemented changing the manifest v3 version from manifest v2 as manifest v2 will get out of support in Jan 2023 and did the changes in manifest.json. As Google announced that Manifest v2 is going to be phased out progressively and extensions should be migrated to Manifest v3 so this issue was much more prominent and important to be implemented. Did all these changes in Manifest v3:-

  • Changing the Version
  • Host Permissions
  • Background Scripts
  • Actions
  • Content Security Policy
  • Web-Accessible Resources
  • executeScript()

Week 8: Implemented adding more new required indexes and metrics calculation functions for determining scholar’s and researcher’s performance. Implemented the AR-index and L-index which are the higher scientific indexes for calculating scholars’ performance and doing research calculations. With the induction of new metrics, there will be a wider range of parameters, the calculations would depend upon. This helps in better performance computation because the numbers will not be dependent on a single parameter, such as the number of publications, number of citations, etc.

  • The AR index is counted from the age-weighted citation rate, which is the number of citations of each paper divided by its age. Then, the square root of the sum of all age-weighted citation rates gives the AR index and this helps in taking the time of publishing papers into consideration during performance calculation.
  • The L-index ranges from 0.0 to 9.9, which combines the number of citations, the number of co-authors, and the age of publications into a single value.

Week 9: Added jest and puppeteer unit testing for the new metrics calculation functions in profile.js which are to test the unit test cases pass for L-index and AR-index. It supports code coverage out of the box and is a very useful metric for all CI-based delivery pipelines and the overall test effectiveness of a project. Did unit testing individually using jest for new metrics calculation functions of profile.js. Jest being a JavaScript testing framework is designed to ensure the correctness of any JavaScript code-base and thus it allows to write tests with an approachable, familiar, and feature-rich API that gives results quickly thatswhy all tests have been passed and executed. Jest is well-documented, requires little configuration, and can be extended to match requirements. Therefore it also provides detailed coverage of all the passed and failed tests by running the npm test.

Week 10: Created a homepage or landing page for the Django backend that would show all the details and information of the AOSSIE Scholar Extension page such as the purpose and about of the extension, and a link to the detailed documentation file which would describe the installation and local setup of the extension, etc. Optimized functions with optional and REST parameters for giving generics and module support. Structured the data to be accessed by the extension and modified the API for server and app interaction by determining the data access rules and handling errors during unhandled events.

Week 11: Provided dark mode to the extension and added the option to toggle between the light and dark theme. Made the extension cross-browser compatible so that the extension supports and becomes compatible with all the browsers like Mozilla Firefox and Opera Browser so it can be managed efficiently in those browsers too. Changed all the APIs and the extension API model standardizing to that particular browser with the changes in the manifest.json file and content scripts because the scripts have access to the DOM, which will help to retrieve the images contained in the web page.

Week 12: Designed, implemented, and integrated the Signup and Login page for starring in the extension and resolving inconsistencies. Implemented a quick way to get the user started without much hassle during signing up and added the password feature and the profile dashboard of the login page. Thus the signed-up user will maintain his/her record of Starred scholars and other data specific to his/her account. I also added proper detailed documentation and guidelines on integration and unit testing, CI/CD, DevOps, and Gulp Automation workflow so that the new developers who want to work and contribute can get a better vision and insight into the idea of the project and how different functions and testing can be done using automation tools.

During my GSoC period, I addressed 13 major Issues(mostly new feature addition and enhancements/modifications), with 13 Merge Requests and 400+ commits.

All the issues addressed in the period can be found here

All the MRs made can be found here

The MRs made (MERGED) can be found here

Finally, I would like to thank my mentor Aditya Bisoi for the
immense guidance and support throughout the GSoC period and for all the valuable feedback and suggestions. His timely review to my contributions and answering my queries have really helped me grow and do good work.

--

--

Subhangi Choudhary
Subhangi Choudhary

Written by Subhangi Choudhary

GSOC’22 | Outreachy’21 Intern | GirlScript Mentor

No responses yet