Skip to content

Commit f9f7956

Browse files
Merge branch 'develop' into doc-update-licenses
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents 7b2f110 + 931914c commit f9f7956

File tree

1,128 files changed

+106813
-136413
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,128 files changed

+106813
-136413
lines changed

AUTHORS.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The following organizations or individuals have contributed to ScanCode:
4444
- Lemo Shi @lemoshi
4545
- Li Ha @linexb
4646
- Mankaran Singh @MankaranSingh
47+
- Marc-Etienne Vargenau @vargenau
4748
- Martin Petkov @MartinPetkov
4849
- Maximilian Huber @maxhbr
4950
- Michael Herzog @mjherzog
@@ -78,6 +79,7 @@ The following organizations or individuals have contributed to ScanCode:
7879
- Sebastian Schuberth @sschuberth
7980
- Shankhadeep Dey @Iamshankhadeep
8081
- Sharikzama @ZamaSharik
82+
- Shrijal Acharya @OctoPie23
8183
- Shivam Chauhan @chashiv
8284
- Shivam Sandbhor @sbs2001
8385
- Steven Esser @majurg

CHANGELOG.rst

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,17 @@ Package detection:
6363
manifest data parsing code outside of the scancode-toolkit context in other
6464
libraries.
6565

66+
- The PackageData model now includes a ``holder`` field, which is populated with
67+
holder data extracted from the copyright field if copyright data is present,
68+
otherwise it remains empty.
69+
70+
https://github.com/nexB/scancode-toolkit/issues/3290
71+
6672

6773
License detection:
6874
~~~~~~~~~~~~~~~~~~~
6975

70-
- The SPDX license list has been updated to the latest v3.19
76+
- The SPDX license list has been updated to the latest v3.20
7177

7278
- This is a major update to license detection where we now combine one or more
7379
license matches in a larger license detection. This approach improves the
@@ -78,11 +84,9 @@ License detection:
7884
- There is a new ``license_detections`` codebase level attribute with all the
7985
unique license detections in the whole scan, both in resources and packages.
8086
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.
87+
detections: ``license_expression``, ``identifier`` and ``detection_log``
88+
(present optionally if the ``--license-diagnostics`` option is enabled) with
89+
an additional attribute:
8690

8791
- ``count``: Number of times in the codebase this unique license detection
8892
was encountered.
@@ -91,15 +95,14 @@ License detection:
9195

9296
- The ``licenses`` attribute is deleted.
9397

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-
9898
- A new ``license_detections`` attribute contains license detections in that file.
99-
This object has three attributes: ``license_expression``, ``detection_log``
99+
This object has three attributes: ``license_expression``, ``identifier``
100100
and ``matches``. ``matches`` is a list of license matches and is roughly
101101
the same as ``licenses`` in the previous version with additional structure
102-
changes detailed below.
102+
changes detailed below. Identifier is the detected license-expression with an
103+
UUID generated from the content of ``matches`` such that this is unique for
104+
unique detections. We also have another attribute ``detection_log`` with
105+
diagnostics information if the ``--license-diagnostics`` option is enabled.
103106

104107
- A new attribute ``license_clues`` contains license matches with the
105108
same data structure as the ``matches`` attribute in ``license_detections``.
@@ -140,13 +143,14 @@ License detection:
140143
avoiding nesting. See `license updates doc <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#licensematch-result-data>`_
141144
for examples and details.
142145

143-
- There are new and codebase level attributes default with `--licenses` to report
146+
- There are new and codebase level attributes with ``--license-references`` to report
144147
reference license metadata and texts once for each license matched across the
145148
scan; we now have two codebase level attributes: ``license_references`` and
146149
``license_rule_references`` that list unique detected license and license rules.
147150
for examples and details. This reference data is also removed from license matches
148151
in all levels i.e. from codebase, package and resource level license detections and
149-
resource level license clues.
152+
resource level license clues, irrespective of this CLI option being used, i.e. default
153+
with ``--licenses``.
150154
See `license updates documentation <https://scancode-toolkit.readthedocs.io/en/latest/explanations/license-detection-reference.html#comparision-before-after-license-references>`_
151155

152156
- We replaced the ``scancode --reindex-licenses`` command line option with a
@@ -166,7 +170,7 @@ License detection:
166170

167171
- See https://github.com/nexB/scancode-toolkit/issues/480 for more details.
168172

169-
- We combined the licensedata file and text file of each license in a single
173+
- We combined the license data file and text file of each license in a single
170174
file with a .LICENSE extension. The .yml data file is now included at the
171175
top of each .LICENSE file as "YAML frontmatter". The same applies to license
172176
rules and their .RULE and .yml files. This halves the number of data files

CONTRIBUTING.rst

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributing
33
============
44

55
Contributions are welcome and appreciated!
6-
Every little bit helps, and credit will always be given.
6+
Every little bit helps, and a credit will always be given.
77

88
.. _issues : https://github.com/nexB/scancode-toolkit/issues
99
__ issues_
@@ -14,15 +14,15 @@ check `easy issues <https://github.com/nexB/scancode-toolkit/labels/easy>`_
1414
When contributing to ScanCode (such as code, bugs, documentation, etc.) you
1515
agree to the Developer `Certificate of Origin <http://developercertificate.org/>`_
1616
and the ScanCode license (see the `NOTICE <https://github.com/nexB/scancode-toolkit/blob/develop/NOTICE>`_ file).
17-
The same approach is used by the Linux Kernel developers and several other projects.
17+
The same approach is used by Linux Kernel developers and several other projects.
1818

1919
For commits, it is best to simply add a line like this to your commit message,
2020
with your name and email::
2121

2222
Signed-off-by: Jane Doe <[email protected]>
2323

2424
Please try to write a good commit message, see `good commit message wiki
25-
<https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>` for
25+
<https://aboutcode.readthedocs.io/en/latest/contributing/writing_good_commit_messages.html>`_ for
2626
details. In particular use the imperative for your commit subject: think that
2727
you are giving an order to the codebase to update itself.
2828

@@ -35,7 +35,7 @@ To send feedback or ask a question, `file an issue <issues_>`_
3535
If you are proposing a feature:
3636

3737
* Explain how it would work.
38-
* Keep the scope simple possible to make it easier to implement.
38+
* Keep the scope as simple as possible to make it easier to implement.
3939
* Remember that your contributions are welcomed to implement this feature!
4040

4141

@@ -54,23 +54,21 @@ For other questions, discussions, and chats, we have:
5454
This is a busy place with a lot of CI and commit notifications that makes
5555
actual chat sometimes difficult!
5656

57-
- a mailing list at `sourceforge <https://lists.sourceforge.net/lists/listinfo/aboutcode-discuss>`_
58-
5957
- a Gitter channel to discuss Documentation at https://gitter.im/aboutcode-org/gsod-season-of-docs
6058

6159
Bug reports
6260
===========
6361

6462
When `reporting a bug`__ please include:
6563

66-
* Your operating system name, version and architecture (32 or 64 bits).
64+
* Your operating system name, version, and architecture (32 or 64 bits).
6765
* Your Python version.
6866
* Your ScanCode version.
6967
* Any additional details about your local setup that might be helpful to
7068
diagnose this bug.
7169
* Detailed steps to reproduce the bug, such as the commands you ran and a link
7270
to the code you are scanning.
73-
* The errors messages or failure trace if any.
71+
* The error messages or failure trace if any.
7472
* If helpful, you can add a screenshot as an issue attachment when relevant or
7573
some extra file as a link to a `Gist <https://gist.github.com>`_.
7674

@@ -83,11 +81,11 @@ any other general upgrades, etc. Even a minor typo fix is welcomed.
8381

8482
If something is missing in the documentation or if you found some part confusing,
8583
please file an issue with your suggestions for improvement. Use the “Documentation Improvement”
86-
template. Your help and contributions makes ScanCode docs better, we love hearing from you!
84+
template. Your help and contribution make ScanCode docs better, we love hearing from you!
8785

8886
The ScanCode documentation is hosted at `scancode-toolkit.readthedocs.io <https://scancode-toolkit.readthedocs.io/en/latest/>`_.
8987

90-
If you want to contribute to Scancode Dcoumentation, you'll find `this guide here <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_doc.html>`_ helpful.
88+
If you want to contribute to Scancode Documentation, you'll find `this guide here <https://scancode-toolkit.readthedocs.io/en/latest/contribute/contrib_doc.html>`_ helpful.
9189

9290
Development
9391
===========
@@ -124,11 +122,13 @@ To set up ScanCode for local development:
124122
3. Create a branch for local development::
125123

126124
git checkout -b name-of-your-bugfix-or-feature
125+
126+
4. Check out the Contributing to Code Development `documentation <https://scancode-toolkit.readthedocs.io/en/stable/contribute/contrib_dev.html>`_, as it contains more in-depth guide for contributing code and documentation.
127127

128-
4. To configure your local environment for development, locate to the main
129-
directory of the local repository, run the configure script.
128+
5. To configure your local environment for development, locate to the main
129+
directory of the local repository, and run the configure script.
130130
The configure script creates an isolated Python `virtual environment` in
131-
your checkout directory, the Python `pip` tool, and installs the thirdparty
131+
your checkout directory, the Python `pip` tool, and installs the third-party
132132
libraries (from the `thirdparty/ directory`), setup the paths, etc.
133133
See https://virtualenv.pypa.io/en/latest/ for more details.
134134

@@ -157,10 +157,20 @@ To set up ScanCode for local development:
157157
When you pull new code from git, rerun ./configure
158158

159159

160-
5. Now you can make your code changes in your local clone.
160+
6. Now you can make your code changes in your local clone.
161161
Please create new unit tests for your code. We love tests!
162162

163-
6. When you are done with your changes, run all the tests.
163+
7. An update to the ``CHANGELOG`` is required if any important changes are made that needs to be communicated such as:
164+
165+
* Changes in the API.
166+
167+
* Addition or deletion of CLI options.
168+
169+
* Addition of any new feature or any other miscellaneous changes to the program.
170+
171+
8. If there is a code change, a significant document, or any other changes, you must update the ``AUTHORS`` to include your own name.
172+
173+
9. When you are done with your changes, run all the tests.
164174
Use this command::
165175

166176
py.test
@@ -169,7 +179,7 @@ To set up ScanCode for local development:
169179

170180
py.test -n6
171181

172-
If you are running this on a RedHat based OS you may come across this
182+
If you are running this on a RedHat-based OS you may come across this
173183
failure::
174184

175185
OSError: libbz2.so.1.0: cannot open shared object file: No such file or directory
@@ -182,18 +192,18 @@ To set up ScanCode for local development:
182192

183193
See `this issue <https://github.com/nexB/scancode-toolkit/issues/443>`_ for more information.
184194

185-
7. Check the status of your local repository before commit, regarding files changed::
195+
10. Check the status of your local repository before committing, regarding files changed::
186196

187-
git status
197+
git status
188198

189199

190-
8. Commit your changes and push your branch to your GitHub fork::
200+
11. Commit your changes and push your branch to your GitHub fork::
191201

192-
git add <file-changed-1> <file-changed-2> <file-changed-3>
193-
git commit -m "Your detailed description of your changes." --signoff
194-
git push <repository-alias-name> name-of-your-bugfix-or-feature
202+
git add <file-changed-1> <file-changed-2> <file-changed-3>
203+
git commit -m "Your detailed description of your changes." --signoff
204+
git push <repository-alias-name> name-of-your-bugfix-or-feature
195205

196-
9. Submit a pull request through the GitHub website for this branch.
206+
12. Submit a pull request through the GitHub website for this branch.
197207

198208

199209
Pull Request Guidelines
@@ -205,7 +215,7 @@ create a pull request. You can add new commits to your branch as needed.
205215
For merging, your request would need to:
206216

207217
1. Include unit tests that are passing (run ``py.test``).
208-
2. Update documentation as needed for new API, functionality etc.
218+
2. Update documentation as needed for new API, functionality, etc.
209219
3. Add a note to ``CHANGELOG.rst`` about the changes.
210220
4. Add your name to ``AUTHORS.rst``.
211221

@@ -228,3 +238,4 @@ To run tests in parallel on eight processors::
228238
To run tests verbosely, displaying all print statements to terminal::
229239

230240
py.test -vvs
241+

azure-pipelines.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ jobs:
9191
venv/bin/pytest -vvs --test-suite=plugins \
9292
tests/licensedcode/test_additional_license.py
9393
94-
- template: etc/ci/azure-posix.yml
95-
parameters:
96-
job_name: ubuntu18_cpython
97-
image_name: ubuntu-18.04
98-
python_versions: ['3.8', '3.9', '3.10', '3.11']
99-
python_architecture: x64
100-
test_suites:
101-
all: venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py --reruns 2
102-
10394
- template: etc/ci/azure-posix.yml
10495
parameters:
10596
job_name: ubuntu20_cpython
@@ -147,9 +138,9 @@ jobs:
147138

148139
- template: etc/ci/azure-win.yml
149140
parameters:
150-
job_name: win2019_cpython_2
151-
image_name: windows-2019
152-
python_versions: ['3.9', '3.10', '3.11']
141+
job_name: win2022_cpython
142+
image_name: windows-2022
143+
python_versions: ['3.8', '3.9', '3.10', '3.11']
153144
python_architecture: x64
154145
test_suites:
155146
all: venv\Scripts\pytest -n 2 -vvs tests\scancode\test_cli.py --reruns 2
@@ -206,14 +197,6 @@ jobs:
206197
test_suites:
207198
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
208199

209-
- template: etc/ci/azure-posix.yml
210-
parameters:
211-
job_name: ubuntu18_cpython_latest_from_pip
212-
image_name: ubuntu-18.04
213-
python_versions: ['3.8', '3.9', '3.10', '3.11']
214-
test_suites:
215-
all: venv/bin/pip install --upgrade-strategy eager --force-reinstall --upgrade -e .[testing] && venv/bin/pytest -n 2 -vvs tests/scancode/test_cli.py
216-
217200
- template: etc/ci/azure-posix.yml
218201
parameters:
219202
job_name: ubuntu20_cpython_latest_from_pip

configure

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ PROD_REQUIREMENTS="scancode_toolkit*.whl"
159159
VIRTUALENV_DIR=venv
160160

161161
# Cleanable files and directories to delete with the --clean option
162-
CLEANABLE="build venv"
162+
CLEANABLE="build dist venv .cache .eggs"
163163

164164
# extra arguments passed to pip
165165
PIP_EXTRA_ARGS=" "
@@ -175,6 +175,13 @@ CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
175175
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin
176176

177177

178+
################################
179+
# Install with or without and index. With "--no-index" this is using only local wheels
180+
# This is an offline mode with no index and no network operations
181+
# NO_INDEX="--no-index "
182+
NO_INDEX=""
183+
184+
178185
################################
179186
# Thirdparty package locations and index handling
180187
# Find packages from the local thirdparty directory if present
@@ -308,6 +315,7 @@ while getopts :-: optchar; do
308315
esac
309316
done
310317

318+
311319
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"
312320

313321
find_python

configure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ set "REL_REQUIREMENTS=--requirement etc/scripts/requirements.txt"
3535
set "VIRTUALENV_DIR=venv"
3636

3737
@rem # Cleanable files and directories to delete with the --clean option
38-
set "CLEANABLE=build venv"
38+
set "CLEANABLE=build dist venv .cache .eggs"
3939

4040
@rem # extra arguments passed to pip
4141
set "PIP_EXTRA_ARGS= "

docs/source/conf.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,16 @@
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
3030
extensions = [
31-
'sphinx.ext.intersphinx',
31+
"sphinx.ext.intersphinx",
3232
]
3333

3434
# This points to aboutcode.readthedocs.io
3535
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
3636
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
3737

3838
intersphinx_mapping = {
39-
'aboutcode': ('https://aboutcode.readthedocs.io/en/latest/', None),
40-
'scancode-workbench': ('https://scancode-workbench.readthedocs.io/en/develop/', None),
39+
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
40+
"scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
4141
}
4242

4343

@@ -62,7 +62,7 @@
6262
# so a file named "default.css" will overwrite the builtin "default.css".
6363
html_static_path = ["_static"]
6464

65-
master_doc = 'index'
65+
master_doc = "index"
6666

6767
html_context = {
6868
"display_github": True,
@@ -72,9 +72,7 @@
7272
"conf_py_path": "/docs/source/", # path in the checkout to the docs root
7373
}
7474

75-
html_css_files = [
76-
'_static/theme_overrides.css'
77-
]
75+
html_css_files = ["_static/theme_overrides.css"]
7876

7977

8078
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.

0 commit comments

Comments
 (0)