GSoC 2021 · 17 of 17

Final Evaluation

August 23, 2021

Final Evaluation Report GSoC'21

Organization: FOSSology
Project: Integrating ScanCode Toolkit to FOSSology
Mentor:Michael C. Jaeger, Gaurav Mishra, Ayush Bhardwaj, Sahil Jha
Student: Sarita Singh

Source Code (GitHub)

Related Blog Posts

Description

Integrating ScanCode toolkit as a new agent to FOSSology. Using the command line interface from the scancode package in order to be called right from the fossology application. Fossology is passing a single file and takes the result for license/copyright/author from the scancode command line call.

Current Status

categorytaskstatus
templateUsing scancode custom template☑
licenseLicense info scanned by scancode☑
license DBReusing existing license in the fossology database☑
license DBInserting new license in the fossology database☑
license UIHighlighting license relevance text☑
license DBInserting new license key,full name, ref_url☑
license DBInserting license text for new license in fossology☐
license reportIncluding scancode in the license report☑
copyrightCreating new tables for copyright and author both on UI and DB☑
copyrightCopyright and Author info scanned by scancode☑
copyrightEmail and URL info scanned by scancode☐
copyright DBPopulated newly created scancode database table☑
copyright UICopyright bulk view has scancode table populated☑
copyright UIEmail/URL/Author bulk view has scancode table populated☑
copyright UICopyright single view has scancode integrated☑
copyright UIHighlight working for copyright☐
copyright reportIncluding scancode copyright in the report☐
scancodeSchedule scancode from bulk view space☐
APIIntegrating ScanCode to FOSSology API☑
testingWrite tests for scancode agent☐
CLIUsing CLI to run scancode☐

Video Demonstration

Demonstrating ScanCode integrated to the FOSSology UI

Working

  • Scancode is a parametric agent which can provide information regarding license, copyright, Email, and URL information separately or all together.
  • When a user uploads a file, Scheduler passes a single file and takes the result for license/copyright/author from the scancode command line call. These results are stored in the FOSSology database depending upon the kind of result.
    • Licenses are stored in the license_file table based on the agentId, pfileId, and rf_fk.
    • New licenses are inserted into the license_ref table.
    • Highlight table is used to save highlight info.
    • There are scancode_copyright and scancode_author tables to save scancode findings for copyright and Author respectively. Also, both have event tables to store scanner deactivated statements.
  • These data are rendered on UI in respective fields:
    • For license information check License Browser.
    • For Copyright information check copyright tab.
    • For Author information check Email/URL/Author tab.

Challenges

  • Understanding existing codebase for such a large project, I had to make changes in new code as well as existing code so understanding code and making changes and debugging that was quite challenging.
  • Working on a full stack project, I had to learn new tech-stack quickly to complete task before deadline.

Learnings

  • Worked on a full stack project.
  • Got to learn so many new tech- stack like PHP, Rest API, Database, Docker, OOPs (Full of learning).
  • Got chance to improve my communication skills.
  • Learned how to work and interact in a community.
  • Got chance to interact with peers, mentors.

How to test

  • Fetch sarita/newagent/scancode on your local by using command $ git fetch https://github.com/itssingh/fossology sarita/newagent/scancode:scancode and checkout to the scancode branch.

  • Install FOSSology from source

  • Upload a file from Source/URL/VCS then select license or copyright under scancode-toolkit.

    NOTE: Email and URL are not working for now as scancode-toolkit doesn't provide this info by using a custom template (PR is merged waiting for new release 🥳 ).

    • Check license browser/license single file view for license information.
    • Check copyright bulk view or copyright single view for copyright information.
    • Check author/email/URL bulk view.
  • If you are facing a problem in installing scancode, please install the scancode-toolkit manually. The steps to install scancode-toolkit

Open Source Contributions

Resources