You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- There is a new ``license_detections`` codebase level attribute with all the
79
+
unique license detections in the whole scan, both in resources and packages.
80
+
This has the 3 attributes also present in package/resource level license
81
+
detections: ``license_expression``, ``matches`` and ``detection_log`` and has
82
+
two additional attributes:
83
+
84
+
- ``identifier``: which is the ``license_expression`` with an UUID created out
85
+
of the detection contents and is the same for same detections.
86
+
87
+
- ``count``: Number of times in the codebase this unique license detection
88
+
was encountered.
89
+
90
+
- The data structure of the JSON output has changed for licenses at file level:
91
+
92
+
- The ``licenses`` attribute is deleted.
93
+
94
+
- A new ``for_license_detections`` attribute is aded which references the codebase
95
+
level unique license detections, and this is a list of ``identifer`` strings from
96
+
the codebase level license detections it references.
97
+
98
+
- A new ``license_detections`` attribute contains license detections in that file.
99
+
This object has three attributes: ``license_expression``, ``detection_log``
100
+
and ``matches``. ``matches`` is a list of license matches and is roughly
101
+
the same as ``licenses`` in the previous version with additional structure
102
+
changes detailed below.
103
+
104
+
- A new attribute ``license_clues`` contains license matches with the
105
+
same data structure as the ``matches`` attribute in ``license_detections``.
106
+
This contains license matches that are mere clues and where not considered
107
+
to be a proper conclusive license detection.
108
+
109
+
- The ``license_expressions`` list of license expressions is deleted and
110
+
replaced by a ``detected_license_expression`` single expression.
111
+
Similarly ``spdx_license_expressions`` was removed and replaced by
112
+
``detected_license_expression_spdx``.
113
+
114
+
- See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#change-in-license-data-format-resource>`_
115
+
for examples and details.
116
+
117
+
- The data structure of license attributes in ``package_data`` and the codebase
118
+
level ``packages`` has been updated accordingly:
119
+
120
+
- There is a new ``license_detections`` attribute for the primary, top-level
121
+
declared licenses of a package and an ``other_license_detections`` attribute
122
+
for the other secondary detections.
123
+
124
+
- The ``license_expression`` is replaced by the ``declared_license_expression``
125
+
and ``other_license_expression`` attributes with their SPDX counterparts
126
+
``declared_license_expression_spdx`` and ``other_license_expression_spdx``.
127
+
These expressions are parallel to detections.
128
+
129
+
- The ``declared_license`` attribute is renamed ``extracted_license_statement``
130
+
and is now a YAML-encoded string.
131
+
132
+
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#change-in-license-data-format-package>`_
133
+
for examples and details.
134
+
135
+
- The license matches structure has changed: we used to report one match for each
136
+
license ``key`` of a matched license expression. We now report instead one
137
+
single match for each matched license expression, and list the license keys
138
+
as a ``licenses`` attribute. This avoids data duplication.
139
+
Inside each match, we list each match and matched rule attributred directly
140
+
avoiding nesting. See `license updates doc <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#licensematch-result-data>`_
141
+
for examples and details.
142
+
143
+
- There are new and codebase level attributes default with `--licenses` to report
144
+
reference license metadata and texts once for each license matched across the
145
+
scan; we now have two codebase level attributes: ``license_references`` and
146
+
``license_rule_references`` that list unique detected license and license rules.
147
+
for examples and details. This reference data is also removed from license matches
148
+
in all levels i.e. from codebase, package and resource level license detections and
149
+
resource level license clues.
150
+
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#comparision-before-after-license-references>`_
151
+
152
+
- We replaced the ``scancode --reindex-licenses`` command line option with a
153
+
new separate command named ``scancode-reindex-licenses``.
154
+
155
+
- The ``--reindex-licenses-for-all-languages`` CLI option is also moved to
156
+
the ``scancode-reindex-licenses`` command as an option ``--all-languages``.
157
+
158
+
- We can now detect licenses using custom license texts and license rules
159
+
stored in a directory or packaged as a plugin for consistent reuse and deployment.
160
+
161
+
- There is an ``--additional-directory`` option with the ``scancode-reindex-licenses``
162
+
command to add the licenses from a directory.
163
+
164
+
- There is also a ``--only-builtin`` option to use ony builtin licenses
165
+
ignoring any additional license plugins.
166
+
167
+
- See https://github.com/nexB/scancode-toolkit/issues/480 for more details.
168
+
169
+
- We combined the licensedata file and text file of each license in a single
170
+
file with a .LICENSE extension. The .yml data file is now included at the
171
+
top of each .LICENSE file as "YAML frontmatter". The same applies to license
172
+
rules and their .RULE and .yml files. This halves the number of data files
173
+
from about 60,000 to 30,000. Git line history is preserved for the combined
174
+
text + yml files.
175
+
176
+
- See https://github.com/nexB/scancode-toolkit/issues/3049
177
+
178
+
- There is a new ``--get-license-data`` scancode command line option to export
179
+
license data in JSON, YAML and HTML, with indexes and a static website for use
180
+
in the licensedb web site. This becomes the API way to getr scancode license
181
+
data.
182
+
183
+
See https://github.com/nexB/scancode-toolkit/issues/2738
184
+
185
+
- The deprecated "--is-license-text" option has been removed.
186
+
This is now built-in with the --license-text option and --info
187
+
and exposed with the "percentage_of_license_text" attribute.
0 commit comments