Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
d2bafb9
Fixed #41 - Handled encoding issue when generating ABOUT files
chinyeungli Sep 15, 2021
c41196a
Merge pull request #42 from nexB/41_fix_encoding_error
chinyeungli Oct 4, 2021
5671563
Treat text files as text
pombredanne Oct 5, 2021
14f6a2d
Add helper to publish files in GH releases
pombredanne Oct 5, 2021
1a2a144
Add code to use curl if wget is not installed
chinyeungli Oct 6, 2021
7aa7d4c
Do not issue warning if thirdparty dir is missing
pombredanne Oct 8, 2021
51d0c5c
Merge pull request #45 from nexB/open-as-text
pombredanne Oct 11, 2021
b46d84f
Handle as_text correctly in cache
pombredanne Oct 11, 2021
255a898
Handle as_text correctly in cache
pombredanne Oct 11, 2021
7b76f4a
Merge origin/as_text-cache
pombredanne Oct 15, 2021
3a5307c
Merge pull request #47 from nexB/as_text-cache
pombredanne Oct 15, 2021
e5833d1
Add support for Python 3.10
pombredanne Oct 18, 2021
0a0ef12
Adopt black style
pombredanne Oct 29, 2021
31ed446
Drop Ubuntu 16 add Python 3.10
pombredanne Oct 29, 2021
00aaa26
Merge pull request #48 from nexB/update-system
pombredanne Oct 29, 2021
2ce7c7a
Disable Python 3.10 tests on macOS 10.14
pombredanne Oct 29, 2021
1fa3699
Merge pull request #49 from nexB/update-system
pombredanne Oct 29, 2021
2cc2c5a
Add code to remove the symlink before creating
chinyeungli Nov 10, 2021
6b2320a
Improve handling licenses without scancode
pombredanne Nov 26, 2021
6ccff2b
Add support for deb and rpm containers
pombredanne Nov 26, 2021
6962f8b
Support licenses when ScanCode is not installed
pombredanne Nov 26, 2021
2f77f97
Improve wheel build
pombredanne Jan 12, 2022
784e701
Aligne with latest ScanCode TK updates
pombredanne Jan 12, 2022
a7c2efd
Do not ignore setup.py
pombredanne Jan 12, 2022
b1dabd8
Update scripts
pombredanne Jan 12, 2022
4004ebe
Do not use pytest 7.0.0 which is buggy
pombredanne Feb 14, 2022
b15b6b7
Update `configure` to work with space in installation path
chinyeungli Feb 17, 2022
311b0a1
Remove echo statement
chinyeungli Feb 17, 2022
840ccef
Add black codestyle test for skeleton
keshav-space Feb 22, 2022
35af643
Update configure.bat
chinyeungli Feb 23, 2022
70a2d2f
Merge pull request #55 from nexB/configure_for_path_with_spaces_on_wi…
pombredanne Feb 23, 2022
c7084ee
Merge pull request #56 from keshav-space/main
pombredanne Feb 23, 2022
9558c0c
Deprecate windows-2016 images for azure CI
AyanSinhaMahapatra Feb 23, 2022
e19a520
Remove macos 10.14 job from azure-pipelines.yml
JonoYang Mar 1, 2022
cb17d70
Merge pull request #57 from nexB/deprecate-win-2016-ci
JonoYang Mar 1, 2022
7eb4ca8
Merge pull request #58 from nexB/remove-mac-1014
JonoYang Mar 1, 2022
47da14b
Do not use Python 3.6 on Windows 2022 jobs
JonoYang Mar 1, 2022
c4678dc
Merge pull request #59 from nexB/win2022-py36
JonoYang Mar 1, 2022
ad17a42
Deprecate windows-2016 images for azure CI
AyanSinhaMahapatra Feb 23, 2022
cad3164
Remove macos 10.14 job from azure-pipelines.yml
JonoYang Mar 1, 2022
d659e09
Do not use Python 3.6 on Windows 2022 jobs
JonoYang Mar 1, 2022
b408c85
Merge pull request #60 from nexB/update-signoff
pombredanne Mar 4, 2022
c5251f4
Run tests on macOS 11
pombredanne Mar 4, 2022
a118fe7
Align configuration scripts on POSIX and Windows
pombredanne Mar 4, 2022
e810da3
Update README
pombredanne Mar 4, 2022
243f7cb
Refactor and streamline thirdparty utilities
pombredanne Mar 5, 2022
931f610
Cleanup whitespaces
pombredanne Mar 5, 2022
6e43a7a
Add usage instructions to README.rst
JonoYang Mar 9, 2022
ae73ce3
Merge pull request #61 from nexB/update-readme
JonoYang Mar 9, 2022
6238b83
Merge branch 'main' of https://github.com/nexB/skeleton into main
pombredanne Mar 9, 2022
b272e3b
Format code
pombredanne Mar 9, 2022
907e540
Merge pull request #62 from nexB/better-tpp-scripts
pombredanne Mar 9, 2022
1e4d3bc
Reorg setup sections
pombredanne Mar 9, 2022
03d4799
Do not depend on click. Use argparse.
pombredanne Mar 9, 2022
f0d5a29
Correct configure scripts
pombredanne Mar 9, 2022
6ed9983
Remove remnants of configure --init
pombredanne Mar 9, 2022
bf6bbaa
Pytyon 3.6 is not available on Windows 2022
pombredanne Mar 11, 2022
4ab834f
Add long_description_content_type
pombredanne Mar 11, 2022
4ef463f
Run fewer Azure jobs
pombredanne Mar 14, 2022
e921052
Add RTD css templates
AyanSinhaMahapatra Mar 22, 2022
bd2df2a
Add GitHub action for doc build tests
AyanSinhaMahapatra Mar 24, 2022
3e2d801
Fix conf.py to fix doc build
AyanSinhaMahapatra Mar 24, 2022
c76dff4
Merge pull request #63 from nexB/add-rtd-templates
AyanSinhaMahapatra Mar 24, 2022
55f44fe
Add warnings field to codebase headers
JonoYang Mar 28, 2022
0cc88fe
Merge remote-tracking branch 'skeleton/main' into 38-add-warnings-to-…
JonoYang Mar 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI Documentation

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-20.04

strategy:
max-parallel: 4
matrix:
python-version: [3.7]

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
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]

- name: Check Sphinx Documentation build minimally
working-directory: ./docs
run: sphinx-build -E -W source build

- name: Check for documentation style errors
working-directory: ./docs
run: ./scripts/doc8_style_check.sh


36 changes: 14 additions & 22 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,59 +6,51 @@

jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu16_cpython
image_name: ubuntu-16.04
python_versions: ['3.6', '3.7', '3.8', '3.9']
test_suites:
all: venv/bin/pytest -vvs

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

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

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1014_cpython
image_name: macos-10.14
python_versions: ['3.6', '3.7', '3.8', '3.9']
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9', '3.10']
test_suites:
all: venv/bin/pytest -n 2 -vvs

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
python_versions: ['3.6', '3.7', '3.8', '3.9']
job_name: macos11_cpython
image_name: macos-11
python_versions: ['3.7', '3.8', '3.9', '3.10']
test_suites:
all: venv/bin/pytest -n 2 -vvs

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

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

Expand Down
118 changes: 62 additions & 56 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ set -e
# Source this script for initial configuration
# Use configure --help for details
#
# NOTE: please keep in sync with Windows script configure.bat
#
# This script will search for a virtualenv.pyz app in etc/thirdparty/virtualenv.pyz
# Otherwise it will download the latest from the VIRTUALENV_PYZ_URL default
################################
Expand All @@ -32,10 +34,8 @@ DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constrai
# where we create a virtualenv
VIRTUALENV_DIR=venv

# Cleanable files and directories with the --clean option
CLEANABLE="
build
venv"
# Cleanable files and directories to delete with the --clean option
CLEANABLE="build venv"

# extra arguments passed to pip
PIP_EXTRA_ARGS=" "
Expand All @@ -50,8 +50,14 @@ VIRTUALENV_PYZ_URL=https://bootstrap.pypa.io/virtualenv.pyz
CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin


################################
# Thirdparty package locations and index handling
# Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty --find-links https://thirdparty.aboutcode.org/pypi"
if [ -f "$CFG_ROOT_DIR/thirdparty" ]; then
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
fi
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"


################################
Expand All @@ -62,56 +68,22 @@ fi


################################
# find a proper Python to run
# Find a proper Python to run
# Use environment variables or a file if available.
# Otherwise the latest Python by default.
if [[ "$PYTHON_EXECUTABLE" == "" ]]; then
# check for a file named PYTHON_EXECUTABLE
if [ -f "$CFG_ROOT_DIR/PYTHON_EXECUTABLE" ]; then
PYTHON_EXECUTABLE=$(cat "$CFG_ROOT_DIR/PYTHON_EXECUTABLE")
else
PYTHON_EXECUTABLE=python3
find_python() {
if [[ "$PYTHON_EXECUTABLE" == "" ]]; then
# check for a file named PYTHON_EXECUTABLE
if [ -f "$CFG_ROOT_DIR/PYTHON_EXECUTABLE" ]; then
PYTHON_EXECUTABLE=$(cat "$CFG_ROOT_DIR/PYTHON_EXECUTABLE")
else
PYTHON_EXECUTABLE=python3
fi
fi
fi


################################
cli_help() {
echo An initial configuration script
echo " usage: ./configure [options]"
echo
echo The default is to configure for regular use. Use --dev for development.
echo Use the --init option if starting a new project and the project
echo dependencies are not available on thirdparty.aboutcode.org/pypi/
echo and requirements.txt and/or requirements-dev.txt has not been generated.
echo
echo The options are:
echo " --clean: clean built and installed files and exit."
echo " --dev: configure the environment for development."
echo " --init: pull dependencies from PyPI. Used when first setting up a project."
echo " --help: display this help message and exit."
echo
echo By default, the python interpreter version found in the path is used.
echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
echo configure another Python executable interpreter to use. If this is not
echo set, a file named PYTHON_EXECUTABLE containing a single line with the
echo path of the Python executable to use will be checked last.
set +e
exit
}


clean() {
# Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for cln in $CLEANABLE;
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
done
set +e
exit
}


################################
create_virtualenv() {
# create a virtualenv for Python
# Note: we do not use the bundled Python 3 "venv" because its behavior and
Expand All @@ -127,7 +99,7 @@ create_virtualenv() {
VIRTUALENV_PYZ="$CFG_ROOT_DIR/etc/thirdparty/virtualenv.pyz"
else
VIRTUALENV_PYZ="$CFG_ROOT_DIR/$VENV_DIR/virtualenv.pyz"
wget -O "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL"
wget -O "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL" 2>/dev/null || curl -o "$VIRTUALENV_PYZ" "$VIRTUALENV_PYZ_URL"
fi

$PYTHON_EXECUTABLE "$VIRTUALENV_PYZ" \
Expand All @@ -142,6 +114,7 @@ create_virtualenv() {
}


################################
install_packages() {
# install requirements in virtualenv
# note: --no-build-isolation means that pip/wheel/setuptools will not
Expand All @@ -158,29 +131,62 @@ install_packages() {
}


################################
cli_help() {
echo An initial configuration script
echo " usage: ./configure [options]"
echo
echo The default is to configure for regular use. Use --dev for development.
echo
echo The options are:
echo " --clean: clean built and installed files and exit."
echo " --dev: configure the environment for development."
echo " --help: display this help message and exit."
echo
echo By default, the python interpreter version found in the path is used.
echo Alternatively, the PYTHON_EXECUTABLE environment variable can be set to
echo configure another Python executable interpreter to use. If this is not
echo set, a file named PYTHON_EXECUTABLE containing a single line with the
echo path of the Python executable to use will be checked last.
set +e
exit
}


################################
clean() {
# Remove cleanable file and directories and files from the root dir.
echo "* Cleaning ..."
for cln in $CLEANABLE;
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
done
set +e
exit
}


################################
# Main command line entry point
CFG_DEV_MODE=0
CFG_REQUIREMENTS=$REQUIREMENTS
NO_INDEX="--no-index"

# We are using getopts to parse option arguments that start with "-"
while getopts :-: optchar; do
case "${optchar}" in
-)
case "${OPTARG}" in
help ) cli_help;;
clean ) clean;;
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS" && CFG_DEV_MODE=1;;
init ) NO_INDEX="";;
clean ) find_python && clean;;
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
esac;;
esac
done

PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS $NO_INDEX"
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"

find_python
create_virtualenv "$VIRTUALENV_DIR"
install_packages "$CFG_REQUIREMENTS"
. "$CFG_BIN_DIR/activate"


set +e
Loading