Skip to content

Enhance the workflow of License Submittal feature, Google Summer of Code 2019

Umang taneja edited this page Aug 25, 2019 · 3 revisions

What is license submittal feature?

The license submittal feature of the SPDX-Online-tools is the feature by which the users can submit new license requests to the SPDX’s license-list-XML repository to be further reviewed by the SPDX legal team to check if the license is worthy of adding it to the SPDX License List.

The license submittal feature was added to the SPDX-Online-tools by a GSoC student developer of 2018. The feature was a great integration to the online tools which would greatly enhance the user experience who is willing to submit a new license request. Extending the functionality to check for duplicate and near matches would enhance the productivity of the feature.

Project Overview

The project deals with extending the functionality of the license submittal feature by checking for duplicate requests and checking for near matches. It will also work on improving the XML generating algorithm and XML formatting of the XML editor.

Contributions

  • #123 Api for the license submittal feature + tests

  • #125 Add license request URL to the generated issue description

  • SPDX License Matcher SPDX License Matcher tool

  • #127 Compare with already submitted licenses as well as rejected licenses

  • #132 Improve generate XML algorithm and XML formatting of the XML editor.

  • #128 Enhance check license functionality to check for close matches + Add a diff view for close matches in the license submittal feature and ask the user if changes are substantial + check if the license is already present on the SPDX license list.

Demo of the project can be found on YouTube.

Milestones

Following are the milesones of the project:

  • API for the license submittal feature.
  • A command-line tool to check for duplicate and near match licenses.
  • In the license submittal when submitter tries to submit a license:
    • Check if the license is already present in the SPDX License List.

    • Check if the license is already submitted but yet not approved by the SPDX legal team.

    • Check if the license is already rejected by the SPDX legal team.

    • Check if the license is a near match and then ask the user if changes are substantial.

      If changes are substantial > Create a new issue i.e new license request

      If license should match > Create a pull request

  • Improve the XML generating algorithm of the License submittal feature as well as the XML formatting of the License XML editor.

Project Status:

Two Pull Request(#128 and #132 with last commit this and this respectively) are in the review phase at the time of writing this wiki. Except that I was able to complete all the milestones mentioned above.

Project details

This section contains the details of all the tasks that were part of the project.

API for the License Submittal feature as well as write some tests

The aim of this task was to create a documented API so that the license submit process can be initiated directly without using the SPDX-Online-tools UI. This API can also be used in any other external application. The license details are submitted via post request and a response is returned indicating that the license was submitted successfully. The documentation on how to access the API is available.

Write well-documented tests to ensure the working of the license submittal API.

SPDX license matcher

SPDX license matcher is a command-line tool that matches the license text submitted by the user(via file) against the licenses present on the SPDX License List. If a perfect match is found, then it reports the license Identifier of the matched license. If a license matches with more than one license, then it returns all the matched license identifiers. The tool also looks for near matches and report differences in the terminal itself.

The tool made it easy to check for duplicate and near matches in the license submittal feature.

Check if the license is already present on the SPDX License List

This task checks if the license is already present on the SPDX License list or not. If the license is already present on the license list, then a pop up will be shown to let the user know that the license already exists. The pop up will have a link to the SPDX License List if the user wants to check out the SPDX License list.

Compare the license text with all the not yet accepted licenses as well as with all of the rejected licenses.

The aim of the task was to compare the license text submitted via license submittal with the already submitted but yet not approved as well as all the rejected licenses.

  • Yet not approved licenses are the licenses that are not accepted or approved by the SPDX legal team to be in the license list in the future.
  • Rejected licenses are the license requests that are already been submitted by some user but are rejected by the SPDX legal team for various reasons.

If the license is already submitted by some user which is not yet approved by the legal team then, a pop up will be displayed with a link to the issue so that users know that the license request is already been made.

Similarly, if the license matches with a license that is already rejected by the SPDX legal team, then a pop up will be displayed with a link to the issue(license request), if the submitter wants to see why the license was rejected in the first place.

Improve the XML generating algorithm of the license submittal feature as well as the XML formatting of the License XML editor

As soon as the user inputs the license details in the license submittal feature and click on submit, A XML is generated using the license details entered by the user.

The aim of this task was to improve the XML generating algorithm by wrapping bullets around bullet tags. Each item of the list around item tag and list of items around list tag. This task will also work on improving the XML formatting of the License XML editor in order to pretty-print the SPDX license files.

This task fixes the following issues: #100 and #45

Check for near matches, show diff view and ask the user if he/she thinks the changes are substantial

This task enables the license submittal feature to be able to look for near matches. If a license submitted by the user is a close match based on the SPDX’s Matching guidelines then, a diff view will show the differences between the license submitted by the user via the form and the license that is already present on the SPDX License List. In the meantime, ask the user if he/she thinks the changes are substantial to create a new license request or not. If the user thinks the licenses should match then it will create a Pull Request.

An expression of gratitude

First of all, I would like to thank my mentors @goneall and @techytushar for their continuous guidance and support. I’m so grateful for your assistance. It was a challenging time but you made it easier. Also, I would like to thank the whole SPDX community for being very friendly and providing their valuable feedback on the project.

I had a great time and I wish to stick around as much as I could after the GSoC as well.