Skip to content

Commit

Permalink
Update link references of ownership from nexB to aboutcode-org
Browse files Browse the repository at this point in the history
Signed-off-by: Chin Yeung Li <[email protected]>
  • Loading branch information
chinyeungli committed Aug 30, 2024
1 parent b7413fb commit 4cb79af
Show file tree
Hide file tree
Showing 22 changed files with 186 additions and 131 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) nexB Inc. and others.
# SPDX-License-Identifier: Apache-2.0
#
# Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
# Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
# ScanCode is a trademark of nexB Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
14 changes: 7 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ TurboSPDX

TurboSPDX is a fast and lightweight Python library for parsing and writing SPDX JSON documents correctly. With its precise implementation of the SPDX schema, library can accurately handle even the most complex SPDX documents.

|license| |version| |build|
|license| |version| |build|

.. |license| image:: https://img.shields.io/badge/License-Apache--2.0-blue.svg?style=for-the-badge
:target: https://opensource.org/licenses/Apache-2.0
Expand Down Expand Up @@ -35,7 +35,7 @@ Examples
.. code-block:: python
>>> from turbo_spdx.spdx_23 import Document
>>>
>>>
>>> your_existing_spdx_document = {
... "SPDXID": "SPDXRef-DOCUMENT",
... "spdxVersion": "SPDX-2.3",
Expand Down Expand Up @@ -64,7 +64,7 @@ Examples
... }
... ]
... }
>>>
>>>
>>> parsed_sbom = Document(**your_existing_spdx_document)
>>>
>>> parsed_sbom.name
Expand All @@ -78,7 +78,7 @@ Examples
.. code-block:: python
>>> from turbo_spdx.spdx_23 import Document, CreationInfo
>>>
>>>
>>> creation_info = CreationInfo(
... created="2023-04-05T18:30:22Z",
... creators=["Organization: nexB"]
Expand All @@ -101,7 +101,7 @@ Examples
>>> sbom.json(exclude_unset=True, by_alias=True)
'{"SPDXID": "SPDXRef-DOCUMENT", "creationInfo": {"created": "2023-04-05T18:30:22Z", "creators": ["Organization: nexB"]}, "dataLicense": "Apache-2.0", "name": "TurboSPDX-v1.0", "spdxVersion": "SPDX-2.3"}'
How it works ?
=================
Expand All @@ -120,10 +120,10 @@ We welcome contributions from the community! If you find a bug or have an idea f

Development setup
------------------
Run these commands, starting from a git clone of https://github.com/nexB/turbo-spdx.git
Run these commands, starting from a git clone of https://github.com/aboutcode-org/turbo-spdx.git

.. code-block:: bash
$ ./configure --dev
$ source venv/bin/active
Expand Down
8 changes: 5 additions & 3 deletions builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/turbo-spdx for support or download.
# See https://github.com/aboutcode-org/turbo-spdx for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

Expand Down Expand Up @@ -111,7 +111,8 @@ def generate_data_model(schema_location: str, output_location: str) -> None:
"--output",
output_location,
]
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(
command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

# Print the stdout and stderr outputs
print(result.stdout.decode())
Expand Down Expand Up @@ -210,7 +211,8 @@ def strip_leading_v(version: str) -> str:
Returns:
str: Version with any leading "v" or "V" character removed.
"""
striped_version = version[1:] if version.startswith(("v", "V")) else version
striped_version = version[1:] if version.startswith(
("v", "V")) else version
return striped_version


Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (c) nexB Inc. and others. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/ for support or download.
# See https://github.com/aboutcode-org/ for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

Expand Down
2 changes: 1 addition & 1 deletion configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@rem Copyright (c) nexB Inc. and others. All rights reserved.
@rem SPDX-License-Identifier: Apache-2.0
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
@rem See https://github.com/nexB/ for support or download.
@rem See https://github.com/aboutcode-org/ for support or download.
@rem See https://aboutcode.org for more information about nexB OSS projects.


Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

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

intersphinx_mapping = {
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/contribute/contrib_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To get started, create or identify a working directory on your local machine.

Open that directory and execute the following command in a terminal session::

git clone https://github.com/nexB/skeleton.git
git clone https://github.com/aboutcode-org/skeleton.git

That will create an ``/skeleton`` directory in your working directory.
Now you can install the dependencies in a virtualenv::
Expand Down
2 changes: 1 addition & 1 deletion docs/source/skeleton-usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ corrected. You can check to see if your corrections are valid by running:
Once the wheels are collected and the ABOUT files are generated and correct,
upload them to thirdparty.aboutcode.org/pypi by placing the wheels and ABOUT
files from the thirdparty directory to the pypi directory at
https://github.com/nexB/thirdparty-packages
https://github.com/aboutcode-org/thirdparty-packages


Usage after project initialization
Expand Down
5 changes: 3 additions & 2 deletions etc/scripts/check_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
import click
Expand All @@ -17,7 +17,8 @@
@click.option(
"-d",
"--dest",
type=click.Path(exists=True, readable=True, path_type=str, file_okay=False),
type=click.Path(exists=True, readable=True,
path_type=str, file_okay=False),
required=True,
help="Path to the thirdparty directory to check.",
)
Expand Down
19 changes: 12 additions & 7 deletions etc/scripts/fetch_thirdparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

Expand Down Expand Up @@ -55,7 +55,8 @@
"-d",
"--dest",
"dest_dir",
type=click.Path(exists=True, readable=True, path_type=str, file_okay=False),
type=click.Path(exists=True, readable=True,
path_type=str, file_okay=False),
metavar="DIR",
default=utils_thirdparty.THIRDPARTY_DIR,
show_default=True,
Expand Down Expand Up @@ -224,7 +225,8 @@ def fetch_thirdparty(
environments = None
if wheels:
evts = itertools.product(python_versions, operating_systems)
environments = [utils_thirdparty.Environment.from_pyver_and_os(pyv, os) for pyv, os in evts]
environments = [utils_thirdparty.Environment.from_pyver_and_os(
pyv, os) for pyv, os in evts]

# Collect PyPI repos
repos = []
Expand Down Expand Up @@ -260,13 +262,14 @@ def fetch_thirdparty(
repos=repos,
)
if not fetched:
wheels_or_sdist_not_found[f"{name}=={version}"].append(environment)
wheels_or_sdist_not_found[f"{name}=={version}"].append(
environment)
if TRACE:
print(f" NOT FOUND")

if (sdists or
(f"{name}=={version}" in wheels_or_sdist_not_found and name in sdist_only)
):
):
if TRACE:
print(f" ==> Fetching sdist: {name}=={version}")

Expand All @@ -289,7 +292,8 @@ def fetch_thirdparty(
sdist_missing = sdists and "sdist" in dists and not name in wheel_only
if sdist_missing:
mia.append(f"SDist missing: {nv} {dists}")
wheels_missing = wheels and any(d for d in dists if d != "sdist") and not name in sdist_only
wheels_missing = wheels and any(
d for d in dists if d != "sdist") and not name in sdist_only
if wheels_missing:
mia.append(f"Wheels missing: {nv} {dists}")

Expand All @@ -299,7 +303,8 @@ def fetch_thirdparty(
raise Exception(mia)

print(f"==> FETCHING OR CREATING ABOUT AND LICENSE FILES")
utils_thirdparty.fetch_abouts_and_licenses(dest_dir=dest_dir, use_cached_index=use_cached_index)
utils_thirdparty.fetch_abouts_and_licenses(
dest_dir=dest_dir, use_cached_index=use_cached_index)
utils_thirdparty.clean_about_files(dest_dir=dest_dir)

# check for problems
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/gen_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
import argparse
Expand Down
2 changes: 1 addition & 1 deletion etc/scripts/gen_requirements_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
import argparse
Expand Down
11 changes: 7 additions & 4 deletions etc/scripts/utils_dejacode.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#
import io
Expand Down Expand Up @@ -33,7 +33,8 @@

def can_do_api_calls():
if not DEJACODE_API_KEY and DEJACODE_API_URL:
print("DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing")
print(
"DejaCode DEJACODE_API_KEY and DEJACODE_API_URL not configured. Doing nothing")
return False
else:
return True
Expand Down Expand Up @@ -68,7 +69,8 @@ def get_package_data(distribution):
return results[0]

elif len_results > 1:
print(f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}")
print(
f"More than 1 entry exists, review at: {DEJACODE_API_URL_PACKAGES}")
else:
print("Could not find package:", distribution.download_url)

Expand Down Expand Up @@ -149,7 +151,8 @@ def find_latest_dejacode_package(distribution):
# there was no exact match, find the latest version
# TODO: consider the closest version rather than the latest
# or the version that has the best data
with_versions = [(packaging_version.parse(p["version"]), p) for p in packages]
with_versions = [(packaging_version.parse(p["version"]), p)
for p in packages]
with_versions = sorted(with_versions)
latest_version, latest_package_version = sorted(with_versions)[-1]
print(
Expand Down
11 changes: 7 additions & 4 deletions etc/scripts/utils_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ScanCode is a trademark of nexB Inc.
# SPDX-License-Identifier: Apache-2.0
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
# See https://github.com/nexB/skeleton for support or download.
# See https://github.com/aboutcode-org/skeleton for support or download.
# See https://aboutcode.org for more information about nexB OSS projects.
#

Expand Down Expand Up @@ -102,7 +102,8 @@ def lock_dev_requirements(
all_req_nvs = get_required_name_versions(all_req_lines)
dev_only_req_nvs = {n: v for n, v in all_req_nvs if n not in main_names}

new_reqs = "\n".join(f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items()))
new_reqs = "\n".join(
f"{n}=={v}" for n, v in sorted(dev_only_req_nvs.items()))
with open(dev_requirements_file, "w") as fo:
fo.write(new_reqs)

Expand All @@ -113,10 +114,12 @@ def get_installed_reqs(site_packages_dir):
as a text.
"""
if not os.path.exists(site_packages_dir):
raise Exception(f"site_packages directory: {site_packages_dir!r} does not exists")
raise Exception(
f"site_packages directory: {site_packages_dir!r} does not exists")
# Also include these packages in the output with --all: wheel, distribute,
# setuptools, pip
args = ["pip", "freeze", "--exclude-editable", "--all", "--path", site_packages_dir]
args = ["pip", "freeze", "--exclude-editable",
"--all", "--path", site_packages_dir]
return subprocess.check_output(args, encoding="utf-8")


Expand Down
Loading

0 comments on commit 4cb79af

Please sign in to comment.