From 14d04f96ada4ac46c2f2749c9230d78d84f88e80 Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 8 Sep 2022 21:37:18 -0700 Subject: [PATCH 1/5] add report Signed-off-by: Kevin Ji --- docs/source/archive/gsoc-toc.rst | 1 + .../gsoc/reports/2022/scancode_kevin.rst | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 docs/source/archive/gsoc/reports/2022/scancode_kevin.rst diff --git a/docs/source/archive/gsoc-toc.rst b/docs/source/archive/gsoc-toc.rst index 9029b1fa..81c133e9 100644 --- a/docs/source/archive/gsoc-toc.rst +++ b/docs/source/archive/gsoc-toc.rst @@ -16,6 +16,7 @@ GSoC 2022 gsoc/reports/2022/scancodeio_akhil gsoc/reports/2022/scancode_workbench_omkar + gsoc/reports/2022/scancode_kevin GSoC 2021 --------- diff --git a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst new file mode 100644 index 00000000..fb5fd7b8 --- /dev/null +++ b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst @@ -0,0 +1,43 @@ +======================================================================== +Extending license detection to use licenses external to ScanCode Toolkit +======================================================================== + + +| **Organization:** `AboutCode `_ +| **Project:** `Scancode Toolkit `_ +| **Mentee:** `Kevin Ji (KevinJi22) `_ +| **Mentors:** Philippe Ombredanne, AyanSinhaMahapatra, Jono Yang + +Overview +-------- + +When doing license detection, ScanCode uses the licenses and rules in the ScanCode LicenseDB. The goal of this project is to extend the capabilities of ScanCode license detection to include licenses that are external to LicenseDB, such as proprietary licenses to be kept within an organization. +I also extended it to include licenses installed from external sources. + +Implementation +-------------- + +All the work I did is contained in `this single PR `_. I added a new command line option called ``--additional-license-directory`` that someone can use to include additional licenses/rules contained in other directories in the license index. Scancode Toolkit uses this license index when doing license detection. This option must be called with ``--reindex-licenses`` to explicitly regenerate the license cache, and then when doing license scans, users can just use the regular ``--license`` option and these additional licenses and/or rules will be used in license detection. + +This change also allows users to install directories of licenses or rules to their local machine, and then Scancode Toolkit will detect and include them in the license cache when someone is reindexing the licenses. If someone wants to create a directory of licenses or rules that they want to install and use in Scancode Toolkit, they must subclass a new Plugin class I added. This allows Scancode Toolkit to identify the location of these installed licenses/rules through a unique entry point and add them to the license index. + +Finally, all these changes are tested through multiple unit tests validating both correct behavior and error handling as needed. + +Post GSoC +--------- + +I would like to merge this PR into Scancode Toolkit, hopefully allowing users to leverage this feature to expand their +license detection capabilities. + +Links +----- + +* `Project idea `_ +* `Official GSoC project page `_ +* `GSoC Proposal `_ + +Acknowledgements +---------------- + +Thanks to Jono and Phillippe for being my mentors. I enjoyed all the meetings, code reviews, and design discussions. +Thank you for your time and your patience! From 0f93f0d089bcd831b1f02c3efc4485fcdcd07cb5 Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 8 Sep 2022 21:41:54 -0700 Subject: [PATCH 2/5] fix doc checks Signed-off-by: Kevin Ji --- .../gsoc/reports/2022/scancode_kevin.rst | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst index fb5fd7b8..4df9e148 100644 --- a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst +++ b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst @@ -11,23 +11,34 @@ Extending license detection to use licenses external to ScanCode Toolkit Overview -------- -When doing license detection, ScanCode uses the licenses and rules in the ScanCode LicenseDB. The goal of this project is to extend the capabilities of ScanCode license detection to include licenses that are external to LicenseDB, such as proprietary licenses to be kept within an organization. +When doing license detection, ScanCode uses the licenses and rules in the ScanCode LicenseDB. +The goal of this project is to extend the capabilities of ScanCode license detection to include +licenses that are external to LicenseDB, such as proprietary licenses to be kept within an organization. I also extended it to include licenses installed from external sources. Implementation -------------- -All the work I did is contained in `this single PR `_. I added a new command line option called ``--additional-license-directory`` that someone can use to include additional licenses/rules contained in other directories in the license index. Scancode Toolkit uses this license index when doing license detection. This option must be called with ``--reindex-licenses`` to explicitly regenerate the license cache, and then when doing license scans, users can just use the regular ``--license`` option and these additional licenses and/or rules will be used in license detection. +All the work I did is contained in `this single PR `_. +I added a new command line option called ``--additional-license-directory`` that someone can use to include +additional licenses/rules contained in other directories in the license index. Scancode Toolkit uses this license index when doing license detection. +This option must be called with ``--reindex-licenses`` to explicitly regenerate the license cache, +and then when doing license scans, users can just use the regular ``--license`` option and these +additional licenses and/or rules will be used in license detection. -This change also allows users to install directories of licenses or rules to their local machine, and then Scancode Toolkit will detect and include them in the license cache when someone is reindexing the licenses. If someone wants to create a directory of licenses or rules that they want to install and use in Scancode Toolkit, they must subclass a new Plugin class I added. This allows Scancode Toolkit to identify the location of these installed licenses/rules through a unique entry point and add them to the license index. +This change also allows users to install directories of licenses or rules to their local machine, and then +Scancode Toolkit will detect and include them in the license cache when someone is reindexing the licenses. +If someone wants to create a directory of licenses or rules that they want to install and use in Scancode +Toolkit, they must subclass a new Plugin class I added. This allows Scancode Toolkit to identify the location +of these installed licenses/rules through a unique entry point and add them to the license index. Finally, all these changes are tested through multiple unit tests validating both correct behavior and error handling as needed. Post GSoC --------- -I would like to merge this PR into Scancode Toolkit, hopefully allowing users to leverage this feature to expand their -license detection capabilities. +I would like to merge this PR into Scancode Toolkit, hopefully allowing users to leverage this feature to +expand their license detection capabilities. Links ----- From 3207949eec7158d29bd0a384cd45e68e6da8a46b Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 8 Sep 2022 21:45:22 -0700 Subject: [PATCH 3/5] more doc checks Signed-off-by: Kevin Ji --- .../gsoc/reports/2022/scancode_kevin.rst | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst index 4df9e148..48b607b0 100644 --- a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst +++ b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst @@ -20,19 +20,22 @@ Implementation -------------- All the work I did is contained in `this single PR `_. -I added a new command line option called ``--additional-license-directory`` that someone can use to include -additional licenses/rules contained in other directories in the license index. Scancode Toolkit uses this license index when doing license detection. +I added a new command line option called ``--additional-license-directory`` that someone can use +to include additional licenses/rules contained in other directories in the license index. +Scancode Toolkit uses this license index when doing license detection. This option must be called with ``--reindex-licenses`` to explicitly regenerate the license cache, and then when doing license scans, users can just use the regular ``--license`` option and these additional licenses and/or rules will be used in license detection. -This change also allows users to install directories of licenses or rules to their local machine, and then -Scancode Toolkit will detect and include them in the license cache when someone is reindexing the licenses. -If someone wants to create a directory of licenses or rules that they want to install and use in Scancode -Toolkit, they must subclass a new Plugin class I added. This allows Scancode Toolkit to identify the location -of these installed licenses/rules through a unique entry point and add them to the license index. +This change also allows users to install directories of licenses or rules to their local machine, +and then Scancode Toolkit will detect and include them in the license cache when someone is +reindexing the licenses. If someone wants to create a directory of licenses or rules that they +want to install and use in Scancode Toolkit, they must subclass a new Plugin class I added. +This allows Scancode Toolkit to identify the location of these installed licenses/rules +through a unique entry point and add them to the license index. -Finally, all these changes are tested through multiple unit tests validating both correct behavior and error handling as needed. +Finally, all these changes are tested through multiple unit tests validating both correct +behavior and error handling as needed. Post GSoC --------- @@ -43,9 +46,11 @@ expand their license detection capabilities. Links ----- -* `Project idea `_ -* `Official GSoC project page `_ -* `GSoC Proposal `_ +`Project idea `_ + +`Official GSoC project page `_ + +`GSoC Proposal `_ Acknowledgements ---------------- From 0564d1dccc0a17db9cf3fe96b6c363371ecfb589 Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 8 Sep 2022 21:49:55 -0700 Subject: [PATCH 4/5] fix line lengths Signed-off-by: Kevin Ji --- .../archive/gsoc/reports/2022/scancode_kevin.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst index 48b607b0..1c0da63d 100644 --- a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst +++ b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst @@ -13,8 +13,8 @@ Overview When doing license detection, ScanCode uses the licenses and rules in the ScanCode LicenseDB. The goal of this project is to extend the capabilities of ScanCode license detection to include -licenses that are external to LicenseDB, such as proprietary licenses to be kept within an organization. -I also extended it to include licenses installed from external sources. +licenses that are external to LicenseDB, such as proprietary licenses to be kept within an +organization. I also extended it to include licenses installed from external sources. Implementation -------------- @@ -40,8 +40,8 @@ behavior and error handling as needed. Post GSoC --------- -I would like to merge this PR into Scancode Toolkit, hopefully allowing users to leverage this feature to -expand their license detection capabilities. +I would like to merge this PR into Scancode Toolkit, hopefully allowing users to leverage +this feature to expand their license detection capabilities. Links ----- @@ -50,7 +50,8 @@ Links `Official GSoC project page `_ -`GSoC Proposal `_ +`GSoC Proposal `_ Acknowledgements ---------------- From 0137c7660096530161d2101ca39663d0e45b0130 Mon Sep 17 00:00:00 2001 From: Kevin Ji Date: Thu, 8 Sep 2022 21:51:36 -0700 Subject: [PATCH 5/5] last doc check Signed-off-by: Kevin Ji --- docs/source/archive/gsoc/reports/2022/scancode_kevin.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst index 1c0da63d..70de717a 100644 --- a/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst +++ b/docs/source/archive/gsoc/reports/2022/scancode_kevin.rst @@ -56,5 +56,5 @@ Links Acknowledgements ---------------- -Thanks to Jono and Phillippe for being my mentors. I enjoyed all the meetings, code reviews, and design discussions. -Thank you for your time and your patience! +Thanks to Jono and Phillippe for being my mentors. I enjoyed all the meetings, code reviews, +and design discussions. Thank you for your time and your patience!