Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update skeleton #116

Merged
merged 63 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
7ab4312
Merge branch 'dlt-master'
pombredanne Jan 18, 2020
61af9f9
Merge remote-tracking branch 'puppeter/basic' into adopt-vers-spec
pombredanne Nov 23, 2021
04c5de3
Merge remote-tracking branch 'rubygems/master' into refinements
pombredanne Dec 6, 2021
dd188e4
Merge pull request #14 from nexB/refinements
pombredanne Jan 10, 2022
5351f0b
automate pypi release on a tag
TG1999 Feb 17, 2022
96b6405
Refine GH Action definition
pombredanne Feb 18, 2022
635df78
Format GH action yaml
pombredanne Feb 18, 2022
6bbeddd
Use verbose name for job
pombredanne Feb 18, 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
eb57889
Add docs option in configure
AyanSinhaMahapatra Mar 24, 2022
2841270
Merge pull request #64 from nexB/add-docs-in-configure
AyanSinhaMahapatra Mar 29, 2022
5556e71
Add documentation contribute page
AyanSinhaMahapatra Mar 30, 2022
f3d1fcd
Merge pull request #65 from nexB/add-docs-contrib
AyanSinhaMahapatra Mar 30, 2022
5431ee5
Properly check for existance of thirdparty dir
JonoYang Apr 28, 2022
435e9ee
Merge pull request #66 from nexB/check-for-thirdparty-dir
JonoYang Apr 28, 2022
b02d5d5
Merge remote-tracking branch 'uni/main' into main
pombredanne Apr 29, 2022
c44c442
Improve GH action documentation
pombredanne Apr 29, 2022
99ba101
Use Python 3.9 as a base for actions
pombredanne Apr 29, 2022
00f4fe7
Remove variable from string in fetch_thirdparty.py
JonoYang Apr 29, 2022
5d48c1c
Improve thirdparty scripts
pombredanne May 2, 2022
6a3c5b0
Update thirdparty fetching utilities
pombredanne May 7, 2022
ff348f5
Format code with black
pombredanne May 9, 2022
d35d4fe
Only use PyPI for downloads
pombredanne May 10, 2022
154144b
Enable automatic release on tag
pombredanne May 12, 2022
1165f12
Remove Travis config
pombredanne May 25, 2022
c1f70fc
Add ScanCode Code of Conduct
pombredanne May 27, 2022
9acab17
Improve detection of thirdparty dir
pombredanne May 27, 2022
4dc2521
Add comment
pombredanne May 29, 2022
04a872c
Remove the thirdparty directory
chinyeungli Sep 22, 2022
07cd736
Update the azure-piprlines
chinyeungli Sep 22, 2022
509b032
Add missing os import in utils_requirements.py
JonoYang Oct 18, 2022
c6bba07
Reinstate Ubuntu 18 and drop Python 3.6 and 3.7
pombredanne Nov 25, 2022
bec5391
Merge pull request #68 from nexB/remove_thirdparty_and_update_ci
pombredanne Nov 25, 2022
1bd7a2f
Replace packaging with packvers
swastkk Jan 5, 2023
5be2690
Merge pull request #71 from swastkk/packvers-added
pombredanne Jan 12, 2023
6f21d2b
Ignore egginfo
pombredanne Jan 15, 2023
f841c2f
Drop Python 3.7 add Python 3.11
pombredanne Jan 15, 2023
bd2a464
Clean .cache and .eggs
pombredanne Jan 15, 2023
6270a88
Add COC to redistributed license-like files
pombredanne Jan 15, 2023
d3a19bd
Add new Makefile
pombredanne Jan 15, 2023
91f5613
Align scripts with latest ScanCode Toolkit
pombredanne Jan 15, 2023
1205bc0
Merge latest main branch
pombredanne Jan 15, 2023
d661e13
Add pycodestyle in setup.cfg
arnav-mandal1234 Mar 24, 2023
e985492
Remove deprecated github-actions/azure images
AyanSinhaMahapatra Mar 28, 2023
3349130
Merge pull request #73 from nexB/update-ci-images
AyanSinhaMahapatra Mar 29, 2023
c5d4e62
Merge pull request #72 from arnav-mandal1234/pycodestyle
JonoYang Apr 17, 2023
7e35445
Pin Sphinx version to 6.2.1
JonoYang May 8, 2023
8d205ef
Merge pull request #74 from nexB/pin-sphinx
JonoYang May 8, 2023
e3aaf63
Publish PDF version of RTD documentation
arijitde92 May 31, 2023
5072e43
Merge pull request #76 from arijitde92/pdf_rtd_doc
AyanSinhaMahapatra Jun 1, 2023
5be7a24
Bump github actions versions #75
AyanSinhaMahapatra Jun 6, 2023
30f3f02
Merge pull request #78 from nexB/update-github-actions
AyanSinhaMahapatra Jun 6, 2023
78a64e5
Update github actions
AyanSinhaMahapatra Jul 10, 2023
a4d8628
Update RTD buil
AyanSinhaMahapatra Jul 10, 2023
4c68fba
Fix unordered lists issue
AyanSinhaMahapatra Jul 10, 2023
c33241d
Add redirects for docs
AyanSinhaMahapatra May 25, 2023
7a22968
Merge pull request #79 from nexB/doc-and-ci-updates
AyanSinhaMahapatra Jul 12, 2023
8c04222
Add macOS-13 job in azure-pipelines.yml
JonoYang Jul 18, 2023
8b1757b
Merge pull request #81 from nexB/update-azure-pipelines-yml
JonoYang Jul 21, 2023
0b297fd
Merge remote-tracking branch 'skeleton/main' into update-skeleton
keshav-space Aug 30, 2023
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.9]

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

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


1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.py[cod]

# virtualenv and other misc bits
/src/*.egg-info
*.egg-info
/dist
/build
Expand Down
11 changes: 11 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@
# Required
version: 2

# Build in latest ubuntu/python
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build PDF & ePub
formats:
- epub
- pdf

# Where the Sphinx conf.py file is located
sphinx:
configuration: docs/source/conf.py
Expand Down
86 changes: 86 additions & 0 deletions CODE_OF_CONDUCT.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Contributor Covenant Code of Conduct
====================================

Our Pledge
----------

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our
project and our community a harassment-free experience for everyone,
regardless of age, body size, disability, ethnicity, gender identity and
expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

Our Standards
-------------

Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual
attention or advances
- Trolling, insulting/derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others’ private information, such as a physical or
electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting

Our Responsibilities
--------------------

Project maintainers are responsible for clarifying the standards of
acceptable behavior and are expected to take appropriate and fair
corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, or to ban
temporarily or permanently any contributor for other behaviors that they
deem inappropriate, threatening, offensive, or harmful.

Scope
-----

This Code of Conduct applies both within project spaces and in public
spaces when an individual is representing the project or its community.
Examples of representing a project or community include using an
official project e-mail address, posting via an official social media
account, or acting as an appointed representative at an online or
offline event. Representation of a project may be further defined and
clarified by project maintainers.

Enforcement
-----------

Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported by contacting the project team at pombredanne@gmail.com
or on the Gitter chat channel at https://gitter.im/aboutcode-org/discuss .
All complaints will be reviewed and investigated and will result in a
response that is deemed necessary and appropriate to the circumstances.
The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement
policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in
good faith may face temporary or permanent repercussions as determined
by other members of the project’s leadership.

Attribution
-----------

This Code of Conduct is adapted from the `Contributor Covenant`_ ,
version 1.4, available at
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

.. _Contributor Covenant: https://www.contributor-covenant.org
54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (c) nexB Inc. and others. All rights reserved.
# 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://aboutcode.org for more information about nexB OSS projects.
#

# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
PYTHON_EXE?=python3
VENV=venv
ACTIVATE?=. ${VENV}/bin/activate;

dev:
@echo "-> Configure the development envt."
./configure --dev

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

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

doc8:
@echo "-> Run doc8 validation"
@${ACTIVATE} doc8 --max-line-length 100 --ignore-path docs/_build/ --quiet docs/

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 .
@echo "-> Run isort imports ordering validation"
@${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

clean:
@echo "-> Clean the Python env"
./configure --clean

test:
@echo "-> Run the test suite"
${VENV}/bin/pytest -vvs

docs:
rm -rf docs/_build/
@${ACTIVATE} sphinx-build docs/ docs/_build/

.PHONY: conf dev check valid black isort clean test docs
26 changes: 18 additions & 8 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu18_cpython
image_name: ubuntu-18.04
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: |
Expand All @@ -19,8 +19,8 @@ jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: ubuntu20_cpython
image_name: ubuntu-20.04
job_name: ubuntu22_cpython
image_name: ubuntu-22.04
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: |
Expand All @@ -29,8 +29,8 @@ jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos1015_cpython
image_name: macos-10.15
job_name: macos11_cpython
image_name: macOS-11
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: |
Expand All @@ -39,8 +39,18 @@ jobs:

- template: etc/ci/azure-posix.yml
parameters:
job_name: macos11_cpython
image_name: macos-11
job_name: macos12_cpython
image_name: macOS-12
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
test_suites:
all: |
source venv/bin/activate
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']
test_suites:
all: |
Expand Down
20 changes: 15 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ CLI_ARGS=$1
# Requirement arguments passed to pip and used by default or with --dev.
REQUIREMENTS="--editable . --constraint requirements.txt"
DEV_REQUIREMENTS="--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
DOCS_REQUIREMENTS="--editable .[docs] --constraint requirements.txt"

# where we create a virtualenv
VIRTUALENV_DIR=venv

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

# extra arguments passed to pip
PIP_EXTRA_ARGS=" "
Expand All @@ -51,13 +52,20 @@ CFG_ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
CFG_BIN_DIR=$CFG_ROOT_DIR/$VIRTUALENV_DIR/bin


################################
# Install with or without and index. With "--no-index" this is using only local wheels
# This is an offline mode with no index and no network operations
# NO_INDEX="--no-index "
NO_INDEX=""


################################
# Thirdparty package locations and index handling
# Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
if [ -f "$CFG_ROOT_DIR/thirdparty" ]; then
PIP_EXTRA_ARGS="--find-links $CFG_ROOT_DIR/thirdparty"
# Find packages from the local thirdparty directory if present
THIRDPARDIR=$CFG_ROOT_DIR/thirdparty
if [[ "$(echo $THIRDPARDIR/*.whl)x" != "$THIRDPARDIR/*.whlx" ]]; then
PIP_EXTRA_ARGS="$NO_INDEX --find-links $THIRDPARDIR"
fi
PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"


################################
Expand Down Expand Up @@ -177,10 +185,12 @@ while getopts :-: optchar; do
help ) cli_help;;
clean ) find_python && clean;;
dev ) CFG_REQUIREMENTS="$DEV_REQUIREMENTS";;
docs ) CFG_REQUIREMENTS="$DOCS_REQUIREMENTS";;
esac;;
esac
done


PIP_EXTRA_ARGS="$PIP_EXTRA_ARGS"

find_python
Expand Down
10 changes: 6 additions & 4 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable . --constraint requirements.txt"
set "DEV_REQUIREMENTS=--editable .[testing] --constraint requirements.txt --constraint requirements-dev.txt"
set "DOCS_REQUIREMENTS=--editable .[docs] --constraint requirements.txt"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=venv"

@rem # Cleanable files and directories to delete with the --clean option
set "CLEANABLE=build venv"
set "CLEANABLE=build dist venv .cache .eggs"

@rem # extra arguments passed to pip
set "PIP_EXTRA_ARGS= "
Expand All @@ -51,11 +52,10 @@ set "CFG_BIN_DIR=%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\Scripts"

@rem ################################
@rem # Thirdparty package locations and index handling
@rem # Find packages from the local thirdparty directory or from thirdparty.aboutcode.org
@rem # Find packages from the local thirdparty directory
if exist "%CFG_ROOT_DIR%\thirdparty" (
set PIP_EXTRA_ARGS=--find-links "%CFG_ROOT_DIR%\thirdparty"
)
set "PIP_EXTRA_ARGS=%PIP_EXTRA_ARGS% --find-links https://thirdparty.aboutcode.org/pypi/simple/links.html"


@rem ################################
Expand All @@ -68,7 +68,6 @@ if not defined CFG_QUIET (
@rem ################################
@rem # Main command line entry point
set "CFG_REQUIREMENTS=%REQUIREMENTS%"
set "NO_INDEX=--no-index"

:again
if not "%1" == "" (
Expand All @@ -77,6 +76,9 @@ if not "%1" == "" (
if "%1" EQU "--dev" (
set "CFG_REQUIREMENTS=%DEV_REQUIREMENTS%"
)
if "%1" EQU "--docs" (
set "CFG_REQUIREMENTS=%DOCS_REQUIREMENTS%"
)
shift
goto again
)
Expand Down
Loading