Skip to content

Migrate online tools to Django 3 and add additional features to python3 branch

Umang Taneja edited this page Aug 23, 2021 · 1 revision

Project overview

The project deals with the migration of the python 3 branch of the SPDX Online Tools to Django 3 and at the same time updating any other third-party libraries to the latest versions that would have new features and improvements along with bug fixes. This change is necessary as the older version of Django will eventually stop receiving security updates and would make the application vulnerable to security threats.

This project also deals with adding the following additional features to the python 3 branch:

  • Merge the API and APP code by maintaining a common utility for both the services
  • Fix and improve some test cases
  • Add a submit via mail functionality to the license submittal
  • Store license diff screenshot in the database instead of uploading to Github
  • Improve error message when error received from the Java code
  • Add a License Diff section to the SPDX Online Tool
  • Develop an API for license namespace
  • Add the API documentation tool.

Contributions

  • #312 Update all the dependencies to the latest version and make relevant changes to fix the test cases
  • #316 Merge app and api by creating a common utility for core logic
  • #320 Add the option to raise the issue when the license submission failed
  • #323 Add support for API documentation
  • #324 Add diff section tool

Project status

#324 still hasn’t been reviewed by the mentor as of writing the wiki, #320 is approved but yet to be merged. I couldn’t complete one of the tasks which were to develop an API for the license namespace and storing the screenshots in the database as my laptop broke, I took my friend’s laptop and it is very slow. I will add a pull request for storing the screenshot in the database in a few hours.

Project details

Update all the dependencies and migrate to Django 3

The aim of the task was to update all the dependencies of the SP DX Online tools’ python 3 branch to the latest version and at the same time migrate to Django 3. The task was easy but after updating the dependencies and migrating to Django 3, there were some test cases that were failing but they were fixed after minor tweaks. The summary of all the changes made to complete the task is given in the Pull request itself.

Merge app and api by creating a common utility for core logic

The task deals with developing a common utility for core logic by creating a core.py file and that contains all the core logic and makes both App and API use the logic from the core.py file. Since both the app and api make use of the common utility, we don’t have to test the app and api individually. It reduces redundancy and makes it easy to test the modules and maintain them.

Add the option to raise the issue when the license submission failed

The task deals with giving an option to the submitter of the license to submit a license to the SPDX Online tools repository in case an error occurs while submitting the license. This feature would help the maintainers of the repository to quickly track the issue and fix it. So, this feature will ease the process of maintenance and make the license submittal tool more robust.

API documentation tool

The task is to add support for API documentation by using the library drf-yasg. The mentor wanted to have the documentation in the wiki of SPDX Onlne tools but I don’t think there is a way to do it unless we do it manually.

Add a diff section

The aim of the task was to add a diff section that would look similar to the check license feature but instead of looking for perfect and close matches, the diff section will display the difference between the close matches which would help the submitter in deciding further if he wants to submit the license for the legal team to review it. It will also check for accepted and rejected licenses.

An expression of gratitude

I would like to express my gratitude towards my mentors Rohit and Santiago without their guidance and support I don’t think I would be able to reach 90% of the milestones. I’m so grateful and happy that I got a chance to work under the guidance of our mentors. They were supportive and helpful. My laptop broke in the middle of the program and I wasn’t able to work for around 1.5 weeks but they really supported me and I will be forever grateful for that. Thank you so much for being so kind and helping me achieve almost all the goals of the project.