Skip to content

Commit d556e4c

Browse files
Merge branch 'develop' into get-valid-yaml
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
2 parents 3af30c7 + 931914c commit d556e4c

File tree

1,124 files changed

+106783
-136392
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,124 files changed

+106783
-136392
lines changed

AUTHORS.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ The following organizations or individuals have contributed to ScanCode:
7979
- Sebastian Schuberth @sschuberth
8080
- Shankhadeep Dey @Iamshankhadeep
8181
- Sharikzama @ZamaSharik
82+
- Shrijal Acharya @OctoPie23
8283
- Shivam Chauhan @chashiv
8384
- Shivam Sandbhor @sbs2001
8485
- Steven Esser @majurg

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ 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
~~~~~~~~~~~~~~~~~~~

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.

etc/scripts/README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Pre-requisites
2121
virtualenv or in the the main configured development virtualenv.
2222
These requireements need to be installed::
2323

24-
pip install --requirement etc/release/requirements.txt
24+
pip install --requirement etc/scripts/requirements.txt
2525

2626
TODO: we need to pin the versions of these tools
2727

@@ -34,7 +34,7 @@ Scripts
3434
~~~~~~~
3535

3636
**gen_requirements.py**: create/update requirements files from currently
37-
installed requirements.
37+
installed requirements.
3838

3939
**gen_requirements_dev.py** does the same but can subtract the main requirements
4040
to get extra requirements used in only development.
@@ -50,7 +50,7 @@ The sequence of commands to run are:
5050

5151
./configure --clean
5252
./configure
53-
python etc/release/gen_requirements.py --site-packages-dir <path to site-packages dir>
53+
python etc/scripts/gen_requirements.py --site-packages-dir <path to site-packages dir>
5454

5555
* You can optionally install or update extra main requirements after the
5656
./configure step such that these are included in the generated main requirements.
@@ -59,7 +59,7 @@ The sequence of commands to run are:
5959

6060
./configure --clean
6161
./configure --dev
62-
python etc/release/gen_requirements_dev.py --site-packages-dir <path to site-packages dir>
62+
python etc/scripts/gen_requirements_dev.py --site-packages-dir <path to site-packages dir>
6363

6464
* You can optionally install or update extra dev requirements after the
6565
./configure step such that these are included in the generated dev

0 commit comments

Comments
 (0)