Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into dependabot/pip/idna…
Browse files Browse the repository at this point in the history
…-3.7
  • Loading branch information
keshav-space committed Sep 18, 2024
2 parents fadaf53 + 9288b23 commit 95fdcc5
Show file tree
Hide file tree
Showing 642 changed files with 93,641 additions and 85,230 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

strategy:
max-parallel: 4
Expand All @@ -20,9 +20,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Give permission to run scripts
run: chmod +x ./docs/scripts/doc8_style_check.sh

- name: Install Dependencies
run: pip install -e .[docs]

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ on:
jobs:
build-pypi-distribs:
name: Build and publish library to PyPI
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -47,7 +47,7 @@ jobs:
name: Create GH release
needs:
- build-pypi-distribs
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Download built archives
Expand All @@ -67,7 +67,7 @@ jobs:
name: Create PyPI release
needs:
- create-gh-release
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- name: Download built archives
Expand Down
9 changes: 6 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

v0.5.2
------
- Update link references of ownership from nexB to aboutcode-org


v0.5.1
-------
Expand All @@ -9,7 +13,7 @@ v0.5.1

v0.5.0
-------
- FetchCode now supports retrieving package info for following generic packages:
- FetchCode now supports retrieving package info for following generic packages:
* pkg:generic/linux
* pkg:generic/mtd-utils
* pkg:generic/barebox
Expand Down Expand Up @@ -42,7 +46,7 @@ v0.5.0

v0.4.0
-------
- FetchCode now supports retrieving package info for following generic packages:
- FetchCode now supports retrieving package info for following generic packages:
``busybox``, ``bzip2``, ``dnsmasq``, ``dropbear``, ``ebtables``, ``hostapd``, ``ipkg``,
``iproute2``, ``iptables``, ``libnl``, ``lighttpd``, ``nftables``, ``openssh``, ``samba``,
``syslinux``, ``toybox``, ``uclibc``, ``uclibc-ng``, ``util-linux`` and ``wpa_supplicant``.
Expand All @@ -63,4 +67,3 @@ v0.1.0
---------

First, initial release.

14 changes: 8 additions & 6 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 All @@ -19,11 +19,11 @@ dev:

isort:
@echo "-> Apply isort changes to ensure proper imports ordering"
${VENV}/bin/isort --sl -l 100 src tests setup.py
${VENV}/bin/isort --sl -l 100 --skip=src/fetchcode/vcs/pip setup.py src tests

black:
@echo "-> Apply black code formatter"
${VENV}/bin/black -l 100 src tests setup.py
${VENV}/bin/black -l 100 --exclude=src/fetchcode/vcs/pip src tests setup.py

doc8:
@echo "-> Run doc8 validation"
Expand All @@ -33,15 +33,17 @@ valid: isort black

check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache .
@${ACTIVATE} pycodestyle --max-line-length=100 --exclude=.eggs,venv,lib,thirdparty,docs,migrations,settings.py,.cache,etc,src/fetchcode/vcs/pip,tests/data/ .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests .
@${ACTIVATE} isort --sl --check-only -l 100 --skip=src/fetchcode/vcs/pip setup.py src tests
@echo "-> Run black validation"
@${ACTIVATE} black --check --check -l 100 src tests setup.py
@${ACTIVATE} black --check --check -l 100 --exclude=src/fetchcode/vcs/pip src tests setup.py

clean:
@echo "-> Clean the Python env"
./configure --clean
rm -rf .venv/ .*cache/ *.egg-info/ build/ dist/
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete

test:
@echo "-> Run the test suite"
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
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ systems. It can work using plain HTTP and FTP URLs, as well as
as used in Python pip and as specified in `SPDX Package Download Location
<https://spdx.github.io/spdx-spec/3-package-information/#37-package-download-location>`_

Homepage and support: https://github.com/nexB/fetchcode
Homepage and support: https://github.com/aboutcode-org/fetchcode


Why FetchCode?
Expand All @@ -24,11 +24,11 @@ Development installation

Clone the repo::

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

Then install all the requirements using::
Then install all the requirements using this command (on POSIX)::

configure --dev
./configure --dev


Running tests
Expand All @@ -45,13 +45,13 @@ Usage
Fetch a code archive and get a ``fetchcode.fetch.Response`` object back::

>>> from fetchcode import fetch
>>> f = fetch('https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
>>> f = fetch('https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip')
>>> f.location
'/tmp/tmp_cm02xsg'
>>> f.content_type
'application/zip'
>>> f.url
'https://github.com/nexB/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'
'https://github.com/aboutcode-org/fetchcode/archive/ab65b2e645c889887227ea49eb3332d885fd0a54.zip'

Fetch some package metadata and get a ``fetchcode.packagedcode_models.Package`` object back::

Expand Down
28 changes: 13 additions & 15 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,62 @@

################################################################################
# We use Azure to run the full tests suites on multiple Python 3.x
# on multiple Windows, macOS and Linux versions all on 64 bits
# These jobs are using VMs with Azure-provided Python builds
################################################################################

jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu22_cpython
image_name: ubuntu-22.04
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos11_cpython
image_name: macOS-11
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
job_name: macos12_cpython
image_name: macOS-12
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos12_cpython
image_name: macOS-12
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
job_name: macos13_cpython
image_name: macOS-13
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos13_cpython
image_name: macOS-13
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
job_name: macos14_cpython_arm64
image_name: macOS-14
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2019_cpython
image_name: windows-2019
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv\Scripts\pytest -n 2 -vvs

- template: etc/ci/azure-win.yml
parameters:
job_name: win2022_cpython
image_name: windows-2022
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
python_versions: ['3.8', '3.9', '3.10', '3.11', '3.12']
test_suites:
all: venv\Scripts\pytest -n 2 -vvs
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
8 changes: 8 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAUTOBUILD = sphinx-autobuild
SOURCEDIR = source
BUILDDIR = build

Expand All @@ -14,6 +15,13 @@ help:

.PHONY: help Makefile

# Run the development server using sphinx-autobuild
docs:
@echo
@echo "Starting up the docs server..."
@echo
$(SPHINXAUTOBUILD) --port 8000 --watch ${SOURCEDIR} $(SOURCEDIR) "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
Expand Down
12 changes: 12 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,16 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
if "%SPHINXAUTOBUILD%" == "" (
set SPHINXAUTOBUILD=sphinx-autobuild
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help

if "%1" == "docs" goto docs

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
Expand All @@ -28,6 +33,13 @@ if errorlevel 9009 (
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:docs
@echo
@echo Starting up the docs server...
@echo
%SPHINXAUTOBUILD% --port 8000 --watch %SOURCEDIR% %SOURCEDIR% %BUILDDIR%\html %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

Expand Down
Empty file modified docs/scripts/doc8_style_check.sh
100644 → 100755
Empty file.
Loading

0 comments on commit 95fdcc5

Please sign in to comment.