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
| category | task | status |
|---|---|---|
| template | Using scancode custom template | ☑ |
| license | License info scanned by scancode | ☑ |
| license DB | Reusing existing license in the fossology database | ☑ |
| license DB | Inserting new license in the fossology database | ☑ |
| license UI | Highlighting license relevance text | ☑ |
| license DB | Inserting new license key,full name, ref_url | ☑ |
| license DB | Inserting license text for new license in fossology | ☐ |
| license report | Including scancode in the license report | ☑ |
| copyright | Creating new tables for copyright and author both on UI and DB | ☑ |
| copyright | Copyright and Author info scanned by scancode | ☑ |
| copyright | Email and URL info scanned by scancode | ☐ |
| copyright DB | Populated newly created scancode database table | ☑ |
| copyright UI | Copyright bulk view has scancode table populated | ☑ |
| copyright UI | Email/URL/Author bulk view has scancode table populated | ☑ |
| copyright UI | Copyright single view has scancode integrated | ☑ |
| copyright UI | Highlight working for copyright | ☐ |
| copyright report | Including scancode copyright in the report | ☐ |
| scancode | Schedule scancode from bulk view space | ☐ |
| API | Integrating ScanCode to FOSSology API | ☑ |
| testing | Write tests for scancode agent | ☐ |
| CLI | Using 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:scancodeand checkout to thescancodebranch. -
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