@@ -6,7 +6,7 @@ Compute summary for all detected packages.
6
6
| **Organization:** `AboutCode <https://aboutcode.org>`_
7
7
| **Project:** `Scancode Toolkit <https://github.com/aboutcode-org/scancode-toolkit>`_
8
8
| **Mentee:** `Swastik Sharma (swastkk) <https://github.com/swastkk>`_
9
- | **Mentors:** Philippe Ombredanne, AyanSinhaMahapatra, AvishrantSh, Jonathan Yang, Jay Kumar
9
+ | **Mentors:** ` Philippe Ombredanne`_, `Ayan Sinha Mahapatra`_, `Avishrant Sharma`_, ` Jonathan Yang`_, ` Jay Kumar`_
10
10
11
11
Overview
12
12
--------
@@ -20,24 +20,89 @@ and ensuring accurate attribute collection across all package ecosystems.
20
20
Implementation
21
21
--------------
22
22
23
- All the work I did is contained in `this single PR <https://github.com/aboutcode-org/scancode-toolkit/pull/3792 >`_.
24
- I added a new command-line option called ``--package-summary `` that users can employ to obtain
25
- a package-level summary within a single codebase. The package level summary involves the
26
- ``license_clarity_score `` calculation and population of package attributes like ``copyright ``,
27
- ``holder ``, ``other_license_expression ``, ``notice_text ``. This option must be called
28
- with ``--classify `` option that helps ScanCode further classify scanned files/directories,
29
- to determine whether they fall in these categories `legal `, `readme `, `top-level `, `manifest `
30
- & ``--package `` or ``-p `` option detects various package manifests, lockfiles and
31
- package-like data and then assembles codebase level packages and dependencies from
32
- these package data detected at files. Also tags files if they are part of the packages.
33
-
34
- This change allows users to get the more refined summary for each individual package
35
- that is present in a codebase. Also this feature improves the package assembly for
36
- various package ecosystems like npm, python-whl, rust, rubygems etc.
23
+ - **Added a new command-line option called ** ``--package-summary ``:
24
+
25
+ - Provides a package-level summary within a single codebase.
26
+ - Involves the ``license_clarity_score `` calculation.
27
+ - Populates package attributes like ``copyright ``, ``holder ``,
28
+ ``other_license_expression ``, ``notice_text ``.
29
+
30
+ - **The ** ``--package-summary `` **option must be used with: **
31
+
32
+ - ``--classify ``: Helps ScanCode further classify scanned files/directories into
33
+ categories like ``legal ``, ``readme ``, ``top-level ``, ``manifest ``.
34
+ - ``--package `` or ``-p ``: Detects various package manifests, lockfiles, and
35
+ package-like data, assembles codebase-level packages and dependencies, and tags
36
+ files as part of the packages.
37
+
38
+ - **Benefits of the change: **
39
+
40
+ - Allows users to obtain a more refined summary for each individual package in
41
+ a codebase.
42
+ - Improves package assembly for various package ecosystems like npm, python-whl,
43
+ rust, rubygems, etc. Since the package-level summary heavily depends on the package assembly,
44
+ there were several scenarios where key files for top-level packages were not properly tagged.
45
+ To address this, a method called ``get_top_level_resources `` was implemented. This method retrieves
46
+ the resources for top-level packages, which helps in correctly tagging the key files.
47
+
48
+ - **Testing: **
49
+
50
+ - All changes are tested through multiple full scan tests.
51
+ - Validated both correct behavior and error handling.
52
+
53
+
54
+ Linked Pull Requests
55
+ --------------------
56
+
57
+ .. list-table ::
58
+ :widths: 10 60 30
59
+ :header-rows: 1
60
+
61
+ * - Sr. no
62
+ - Link
63
+ - Status
64
+ * - 1
65
+ - https://github.com/aboutcode-org/scancode-toolkit/pull/3792
66
+ - Open
67
+
68
+ Related Issues
69
+ --------------
37
70
71
+ .. list-table ::
72
+ :widths: 10 60 30
73
+ :header-rows: 1
74
+
75
+ * - Sr. no
76
+ - Name
77
+ - Link
78
+ * - 1
79
+ - Improve Package models to have license_clarity_score
80
+ - `#3817 <https://github.com/aboutcode-org/scancode-toolkit/issues/3817 >`_
81
+ * - 2
82
+ - Post Scan option --package-summary
83
+ - `#3802 <https://github.com/aboutcode-org/scancode-toolkit/issues/3802 >`_
84
+ * - 3
85
+ - Look in package-ecosystem specific key-files for referenced licenses
86
+ - `#3707 <https://github.com/aboutcode-org/scancode-toolkit/issues/3707 >`_
87
+ * - 4
88
+ - Compute summary and clarity for EACH package in a codebase
89
+ - `#3287 <https://github.com/aboutcode-org/scancode-toolkit/issues/3287 >`_
90
+ * - 5
91
+ - Provide data values in scan results to correspond with license_clarity_score elements
92
+ - `#1395 <https://github.com/aboutcode-org/scancode-toolkit/issues/1395 >`_
93
+ * - 6
94
+ - Populate package instance attributes from it's files
95
+ - `#3862 <https://github.com/aboutcode-org/scancode-toolkit/issues/3862 >`_
96
+ * - 7
97
+ - Improve Ruby Package Ecosystem/Datafile Handler to tag key_files properly
98
+ - `#3881 <https://github.com/aboutcode-org/scancode-toolkit/issues/3881 >`_
99
+ * - 8
100
+ - Rust Members files are not detected properly
101
+ - `#3895 <https://github.com/aboutcode-org/scancode-toolkit/issues/3895 >`_
102
+ * - 9
103
+ - Add Tests for Package Level Summary computation
104
+ - `#3889 <https://github.com/aboutcode-org/scancode-toolkit/issues/3889 >`_
38
105
39
- Finally, all these changes are tested through multiple unit tests validating both correct
40
- behavior and error handling as needed.
41
106
42
107
Post GSoC
43
108
---------
@@ -48,22 +113,33 @@ this feature to expand their package/codebase scanning capabilities.
48
113
Links
49
114
-----
50
115
51
- `Project idea <https://github.com/aboutcode-org/aboutcode/wiki/GSOC-2024-Project-Ideas#compute-summary-for-all-detected-packages >`_
116
+ * `Project Idea <https://github.com/aboutcode-org/aboutcode/wiki/GSOC-2024-Project-Ideas#compute-summary-for-all-detected-packages >`_
117
+
118
+ * `Official GSoC project page <https://summerofcode.withgoogle.com/programs/2024/projects/JzMlDtnM >`_
52
119
53
- ` Official GSoC project page <https://summerofcode.withgoogle .com/programs/2024/projects/JzMlDtnM >`_
120
+ * ` GSoC Proposal <https://docs.google .com/document/d/1TcGqQVzXhTkz6Pmu9UaXAr4R4q1rlT4tof7H7dsVG0o/edit?usp=sharing >`_
54
121
55
- `GSoC Proposal <https://docs.google.com/document/d/1TcGqQVzXhTkz6Pmu9UaXAr4R4q1rlT4tof7H7dsVG0o/edit?usp=sharing >`_
122
+ * `Project Board <https://github.com/orgs/aboutcode-org/projects/4 >`_
123
+
124
+ * `Reference Issue <https://github.com/aboutcode-org/scancode-toolkit/issues/3287 >`_
56
125
57
126
Acknowledgements
58
127
----------------
59
128
60
- I would like to thank my mentors
129
+ I would like to thank my mentors:
130
+
131
+ - `Philippe Ombredanne `_
132
+ - `Ayan Sinha Mahapatra `_
133
+ - `Avishrant Sharma `_
134
+ - `Jay Kumar `_
135
+ - `Jonathan Yang `_
136
+
137
+ Weekly Status calls were greatly helpful and those special 1:1 calls with
138
+ `Ayan Sinha Mahapatra `_ and `Philippe Ombredanne `_ were so amazing. Thank you for your time and your patience!
61
139
62
- - `@pombredanne <https://github.com/pombredanne >`_
63
- - `@AyanSinhaMahapatra <https://github.com/AyanSinhaMahapatra >`_
64
- - `@AvishrantSh <https://github.com/AvishrantSsh >`_
65
- - `@35C4n0r <https://github.com/35C4n0r >`_
66
- - `@jono-yang <https://github.com/JonoYang >`_
67
140
68
- Weekly calls were greatly helpful and those special 1:1 call with
69
- `@AyanSinhaMahapatra ` and `@pombredanne ` were so amazing. Thank you for your time and your patience!
141
+ .. _Philippe Ombredanne : https://github.com/pombredanne
142
+ .. _Ayan Sinha Mahapatra : https://github.com/AyanSinhaMahapatra
143
+ .. _Avishrant Sharma : https://github.com/AvishrantSsh
144
+ .. _Jay Kumar : https://github.com/35C4n0r
145
+ .. _Jonathan Yang : https://github.com/JonoYang
0 commit comments