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 <tli@nexb.com>
  • Loading branch information
chinyeungli committed Aug 20, 2024
1 parent 5c3e935 commit 9c57f34
Show file tree
Hide file tree
Showing 16 changed files with 100 additions and 59 deletions.
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -35,7 +35,7 @@ check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
@echo "-> Run black validation"
@${ACTIVATE} black --check --check -l 100 src tests setup.py

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
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 @@ -43,7 +43,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 9c57f34

Please sign in to comment.