Skip to content

Commit 869c412

Browse files
committed
#183 - Update link references of ownership from nexB to aboutcode-org
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 6087a37 commit 869c412

22 files changed

+124
-72
lines changed

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
Changelog
22
=========
33

4+
v0.12.1
5+
-----------
6+
7+
- Update link references of ownership from nexB to aboutcode-org
8+
9+
410
v0.12.0
511
-----------
612

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ScanCode is a trademark of nexB Inc.
55
# SPDX-License-Identifier: Apache-2.0
66
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
# See https://github.com/nexB/python-inspector for support or download.
7+
# See https://github.com/aboutcode-org/python-inspector for support or download.
88
# See https://aboutcode.org for more information about nexB OSS projects.
99
#
1010

NOTICE

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,39 @@
11
#
2+
23
# Copyright (c) nexB Inc. and others.
4+
35
# SPDX-License-Identifier: Apache-2.0
6+
47
#
5-
# Visit https://aboutcode.org and https://github.com/nexB/python-inspector
8+
9+
# Visit https://aboutcode.org and https://github.com/aboutcode-org/python-inspector
10+
611
# for support and download.
12+
713
# ScanCode is a trademark of nexB Inc.
14+
815
#
16+
917
# Licensed under the Apache License, Version 2.0 (the "License");
18+
1019
# you may not use this file except in compliance with the License.
20+
1121
# You may obtain a copy of the License at
22+
1223
#
13-
# http://www.apache.org/licenses/LICENSE-2.0
24+
25+
# http://www.apache.org/licenses/LICENSE-2.0
26+
1427
#
28+
1529
# Unless required by applicable law or agreed to in writing, software
30+
1631
# distributed under the License is distributed on an "AS IS" BASIS,
32+
1733
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34+
1835
# See the License for the specific language governing permissions and
36+
1937
# limitations under the License.
38+
2039
#

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ python-inspector - inspect Python packages dependencies and metadata
44

55
Copyright (c) nexB Inc. and others.
66
SPDX-License-Identifier: Apache-2.0
7-
Homepage: https://github.com/nexB/python-inspector and https://www.aboutcode.org/
7+
Homepage: https://github.com/aboutcode-org/python-inspector and https://www.aboutcode.org/
88

99

1010
``python-inspector`` is a collection of utilities to:
@@ -36,15 +36,15 @@ Testing
3636
pytest -vvs
3737

3838
- These are live tests to regenrate the tests with updated data run::
39-
39+
4040
PYINSP_REGEN_TEST_FIXTURES=yes pytest -vvs
4141

4242
Usage
4343
--------
4444

4545
- Install with pip::
4646

47-
pip install git+https://github.com/nexB/python-inspector
47+
pip install git+https://github.com/aboutcode-org/python-inspector
4848

4949
- Run the command line utility with::
5050

@@ -71,5 +71,5 @@ Its companion libraries are:
7171
installed site-packages and their metadata formats.
7272

7373
- ``packageurl-python`` to use Package URL to reference Python packages
74-
75-
74+
75+

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

configure.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem Copyright (c) nexB Inc. and others. All rights reserved.
55
@rem SPDX-License-Identifier: Apache-2.0
66
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
@rem See https://github.com/nexB/ for support or download.
7+
@rem See https://github.com/aboutcode-org/ for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010

docs/source/test-protocol.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,21 +161,21 @@ Another example could be https://github.com/digitalocean/sample-django
161161

162162
We use the latest main branch from python-inspector and scancode-toolkit 31.0.0rc2
163163
installed on Linux with Python 3.8 using the release tarball from:
164-
https://github.com/nexB/scancode-toolkit/releases/tag/v31.0.0rc2
164+
https://github.com/aboutcode-org/scancode-toolkit/releases/tag/v31.0.0rc2
165165

166166
ScanCode setup::
167167

168168
mkdir -p ~/tmp/pyinsp-example/tools
169169
cd ~/tmp/pyinsp-example/tools
170-
wget https://github.com/nexB/scancode-toolkit/releases/download/v31.0.0rc2/scancode-toolkit-31.0.0rc2_py38-linux.tar.xz
170+
wget https://github.com/aboutcode-org/scancode-toolkit/releases/download/v31.0.0rc2/scancode-toolkit-31.0.0rc2_py38-linux.tar.xz
171171
tar -xf scancode-toolkit-31.0.0rc2_py38-linux.tar.xz
172172
cd scancode-toolkit-31.0.0rc2/
173173
./scancode --help
174174

175175
python-inspector setup::
176176

177177
cd ~/tmp/pyinsp-example/tools
178-
git clone https://github.com/nexB/python-inspector
178+
git clone https://github.com/aboutcode-org/python-inspector
179179
python3.8 -m venv venv
180180
source venv/bin/activate
181181
pip install --upgrade pip setuptools wheel

requirements_builder.ABOUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = Apache-2.0
66
description = python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/python-inspector
9+
url = https://github.com/aboutcode-org/python-inspector
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = Apache-2.0
66
description = python-inspector is is a collection of utilities to collect PyPI package metadata and resolve packages dependencies.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/python-inspector
9+
url = https://github.com/aboutcode-org/python-inspector
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]

src/_packagedcode/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/scancode-toolkit for support or download.
6+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#

src/_packagedcode/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/scancode-toolkit for support or download.
6+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

@@ -373,7 +373,7 @@ class DependentPackage(ModelMixin):
373373
'either from the datafile or collected from another source. Some '
374374
'lockfiles for Composer or Cargo contain extra dependency data.'
375375
)
376-
376+
377377
extra_data = Mapping(
378378
label='extra data',
379379
help='A mapping of arbitrary extra data.',

src/_packagedcode/pypi.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# ScanCode is a trademark of nexB Inc.
55
# SPDX-License-Identifier: Apache-2.0
66
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
# See https://github.com/nexB/scancode-toolkit for support or download.
7+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
88
# See https://aboutcode.org for more information about nexB OSS projects.
99
#
1010

@@ -457,7 +457,7 @@ def parse_metadata(location, datasource_id, package_type):
457457
name=name,
458458
version=version,
459459
description=get_description(metainfo=meta, location=str(location)),
460-
#TODO: https://github.com/nexB/scancode-toolkit/issues/3014
460+
#TODO: https://github.com/aboutcode-org/scancode-toolkit/issues/3014
461461
declared_license=get_declared_license(meta),
462462
keywords=get_keywords(meta),
463463
parties=get_parties(meta),
@@ -781,7 +781,7 @@ def parse(cls, location):
781781
def parse_reqs(cls, reqs, scope):
782782
"""
783783
Parse a list of requirements and return a list of dependencies
784-
"""
784+
"""
785785
dependent_packages = []
786786
for req in reqs:
787787
req_parsed = packaging.requirements.Requirement(str(req))
@@ -816,7 +816,7 @@ def get_resolved_purl(purl: PackageURL, specifiers: SpecifierSet):
816816
return ResolvedPurl(
817817
purl=purl,
818818
is_resolved=is_resolved,
819-
)
819+
)
820820

821821
class PipfileHandler(BaseDependencyFileHandler):
822822
datasource_id = 'pipfile'
@@ -918,7 +918,7 @@ def get_requirements_txt_dependencies(location, include_nested=False):
918918
if isinstance(value, list):
919919
extra_data[name].extend(value)
920920
else:
921-
extra_data[name] = value
921+
extra_data[name] = value
922922
dependent_packages = []
923923
for req in req_file.requirements:
924924

@@ -987,7 +987,7 @@ def can_process_dependent_package(dep: models.DependentPackage):
987987
requirement_flags.pop("hash_options", None)
988988
if not requirement_flags:
989989
return True
990-
# we can not process the requirement if it has any flag set
990+
# we can not process the requirement if it has any flag set
991991
# because this means it is not a standard specifier
992992
# but rather some pip specific option of sorts
993993
return not any(requirement_flags.values())

src/_packagedcode/pypi_setup_py.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright (c) Gram and others.
33
# This code is copied and modified from dephell_setuptools https://github.com/pypa/setuptools
44
# SPDX-License-Identifier: MIT
5-
# See https://github.com/nexB/scancode-toolkit for support or download.
5+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
66
# See https://aboutcode.org for more information about nexB OSS projects.
77
#
88

@@ -192,11 +192,11 @@ def clean_setup(data):
192192
Return a cleaned mapping from a setup ``data`` mapping.
193193
"""
194194
result = {k: v
195-
for k, v in data.items()
196-
if k in FIELDS
197-
and (v and v is not False)
198-
and str(v) != 'UNKNOWN'
199-
}
195+
for k, v in data.items()
196+
if k in FIELDS
197+
and (v and v is not False)
198+
and str(v) != 'UNKNOWN'
199+
}
200200

201201
# split keywords in words
202202
keywords = result.get('keywords')

src/_packagedcode/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/scancode-toolkit for support or download.
6+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

@@ -123,7 +123,7 @@ def build_description(summary, description):
123123
description = summary
124124
else:
125125
if summary and summary not in description:
126-
description = '\n'.join([summary , description])
126+
description = '\n'.join([summary, description])
127127

128128
return description
129129

@@ -142,7 +142,8 @@ def combine_expressions(
142142
license ``expressions`` strings or LicenseExpression objects.
143143
"""
144144
if not licensing:
145-
raise Exception('combine_expressions: cannot combine combine_expressions without license_expression package.')
145+
raise Exception(
146+
'combine_expressions: cannot combine combine_expressions without license_expression package.')
146147
return expressions and str(le_combine_expressions(expressions, relation, unique, licensing)) or None
147148

148149

src/python_inspector/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/scancode-toolkit for support or download.
6+
# See https://github.com/aboutcode-org/scancode-toolkit for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

src/python_inspector/api.py

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# ScanCode is a trademark of nexB Inc.
66
# SPDX-License-Identifier: Apache-2.0
77
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
8-
# See https://github.com/nexB/python-inspector for support or download.
8+
# See https://aboutcode-orgnexB/python-inspector for support or download.
99
# See https://aboutcode.org for more information about nexB OSS projects.
1010
#
1111

@@ -64,7 +64,8 @@ def to_dict(self, generic_paths=False):
6464
# clean file paths
6565
for file in files:
6666
path = file["path"]
67-
file["path"] = utils.remove_test_data_dir_variable_prefix(path=path)
67+
file["path"] = utils.remove_test_data_dir_variable_prefix(
68+
path=path)
6869
return {
6970
"files": files,
7071
"packages": [package for package in self.packages],
@@ -151,16 +152,20 @@ def resolve_dependencies(
151152

152153
# requirements
153154
for req_file in requirement_files:
154-
deps = dependencies.get_dependencies_from_requirements(requirements_file=req_file)
155+
deps = dependencies.get_dependencies_from_requirements(
156+
requirements_file=req_file)
155157
for extra_data in dependencies.get_extra_data_from_requirements(requirements_file=req_file):
156-
index_urls = (*index_urls, *tuple(extra_data.get("extra_index_urls") or []))
157-
index_urls = (*index_urls, *tuple(extra_data.get("index_url") or []))
158+
index_urls = (
159+
*index_urls, *tuple(extra_data.get("extra_index_urls") or []))
160+
index_urls = (
161+
*index_urls, *tuple(extra_data.get("index_url") or []))
158162
direct_dependencies.extend(deps)
159163
package_data = [
160164
pkg_data.to_dict() for pkg_data in PipRequirementsFileHandler.parse(location=req_file)
161165
]
162166
if generic_paths:
163-
req_file = utils.remove_test_data_dir_variable_prefix(path=req_file)
167+
req_file = utils.remove_test_data_dir_variable_prefix(
168+
path=req_file)
164169

165170
files.append(
166171
dict(
@@ -213,13 +218,15 @@ def resolve_dependencies(
213218
files=[setup_py_file],
214219
analyze_setup_py_insecurely=analyze_setup_py_insecurely,
215220
)
216-
setup_py_file_deps = list(get_dependent_packages_from_reqs(reqs))
221+
setup_py_file_deps = list(
222+
get_dependent_packages_from_reqs(reqs))
217223
direct_dependencies.extend(setup_py_file_deps)
218224

219225
package_data.dependencies = setup_py_file_deps
220226
file_package_data = [package_data.to_dict()]
221227
if generic_paths:
222-
setup_py_file = utils.remove_test_data_dir_variable_prefix(path=setup_py_file)
228+
setup_py_file = utils.remove_test_data_dir_variable_prefix(
229+
path=setup_py_file)
223230
files.append(
224231
dict(
225232
type="file",
@@ -260,9 +267,11 @@ def resolve_dependencies(
260267
else:
261268
credentials = None
262269
if parsed_netrc:
263-
login, password = utils.get_netrc_auth(index_url, parsed_netrc)
270+
login, password = utils.get_netrc_auth(
271+
index_url, parsed_netrc)
264272
credentials = (
265-
dict(login=login, password=password) if login and password else None
273+
dict(login=login,
274+
password=password) if login and password else None
266275
)
267276
repo = utils_pypi.PypiSimpleRepository(
268277
index_url=index_url,
@@ -382,7 +391,8 @@ def get_resolved_dependencies(
382391
),
383392
reporter=BaseReporter(),
384393
)
385-
resolver_results = resolver.resolve(requirements=requirements, max_rounds=max_rounds)
394+
resolver_results = resolver.resolve(
395+
requirements=requirements, max_rounds=max_rounds)
386396
package_list = get_package_list(results=resolver_results)
387397
if pdt_output:
388398
return (format_pdt_tree(resolver_results), package_list)
@@ -401,7 +411,7 @@ def get_requirements_from_direct_dependencies(
401411
for dependency in direct_dependencies:
402412
# FIXME We are skipping editable requirements
403413
# and other pip options for now
404-
# https://github.com/nexB/python-inspector/issues/41
414+
# https://github.com/aboutcode-org/python-inspector/issues/41
405415
if not can_process_dependent_package(dependency):
406416
continue
407417
req = Requirement(requirement_string=dependency.extracted_requirement)

0 commit comments

Comments
 (0)