Skip to content

Merge latest skeleton with ruff #211

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

Merged
merged 118 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
ea5044d
Create script to update repo skeleton #80
JonoYang Jul 17, 2023
5ab9b3a
Added docs server script, dark mode & copybutton for docs
OmkarPh Oct 18, 2023
af7e542
Merge pull request #83 from OmkarPh/enhance/docs
AyanSinhaMahapatra Oct 18, 2023
0a9d983
Update CSS to widen page and handle mobile #84
johnmhoran Nov 21, 2023
4e36fc6
Delete theme_overrides_SUPERSEDED.css as no longer needed #84
johnmhoran Jan 16, 2024
7d74b8a
Fix top padding for rst content
AyanSinhaMahapatra Jan 18, 2024
0071028
Merge pull request #85 from nexB/84-widen-rtd-page
AyanSinhaMahapatra Jan 18, 2024
008d521
Update CI runners and python version
AyanSinhaMahapatra Feb 19, 2024
acf94b3
Merge pull request #87 from nexB/update-macos-runners
AyanSinhaMahapatra Feb 19, 2024
124da3d
Replace deprecated macos CI runners
AyanSinhaMahapatra Jul 1, 2024
be4e14d
Update minimum required python version to 3.8
AyanSinhaMahapatra Jul 1, 2024
5c3e935
Merge pull request #90 from nexB/update-ci-runners
keshav-space Jul 1, 2024
9c57f34
Update link references of ownership from nexB to aboutcode-org
chinyeungli Aug 20, 2024
a929052
Drop deprecated macos-12 runner
AyanSinhaMahapatra Jan 17, 2025
acb36f5
Merge pull request #92 from aboutcode-org/drop-macos-12
AyanSinhaMahapatra Jan 17, 2025
4af4fce
Update CI/Actions runners
AyanSinhaMahapatra Feb 14, 2025
df02630
Merge pull request #93 from aboutcode-org/update-ci-runners
AyanSinhaMahapatra Feb 14, 2025
320ec21
Replace black and isort with ruff
JonoYang Mar 27, 2025
d4e29c3
Use org standard 100 line length
pombredanne Mar 28, 2025
6c028f7
Lint all common code directories
pombredanne Mar 29, 2025
233f3ed
Remove unused targets
pombredanne Mar 29, 2025
55545bf
Improve import sorting
pombredanne Mar 29, 2025
0b63e50
Apply small code updates
pombredanne Mar 29, 2025
092f545
Format code
pombredanne Mar 29, 2025
d05665a
Apply cosmetic refactorings
pombredanne Mar 29, 2025
63bcbf5
Reformat test code
pombredanne Mar 29, 2025
9d1393a
Format code
pombredanne Mar 29, 2025
f10b783
Refine ruff configuration
pombredanne Mar 29, 2025
1d6c8f3
Format doc
pombredanne Mar 29, 2025
0213c1e
Run doc8 on all rst files
pombredanne Mar 29, 2025
c112f2a
Enable doc style checks
pombredanne Mar 29, 2025
944b6c5
Add support for new OS versions
pombredanne Mar 28, 2025
a2ced96
Merge pull request #94 from aboutcode-org/new-osses
pombredanne Mar 30, 2025
136af39
Update scripts aboutcode references
pombredanne Mar 30, 2025
e5fda6c
Merge latest skeleton
pombredanne Mar 30, 2025
b1f0ba9
Do not format more more test data
pombredanne Mar 30, 2025
f70f290
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Mar 30, 2025
4f2b7e1
Do not format more test data
pombredanne Mar 30, 2025
da8eff0
Do not format more test data
pombredanne Mar 30, 2025
f91528c
Merge latest skeleton
pombredanne Mar 30, 2025
4f9e936
Do not treat rst as Python
pombredanne Mar 30, 2025
31c4f28
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Mar 30, 2025
a2809fb
Combine testing and docs extra for simplicity
pombredanne Mar 30, 2025
862e14a
Merge latest skeleton
pombredanne Mar 30, 2025
c718d19
Add missing docstring
pombredanne Mar 30, 2025
d05613a
Apply cosmetic code formatting adn refactoring
pombredanne Mar 30, 2025
43b96c2
Refine checking of docs with doc8
pombredanne Mar 30, 2025
ea7a75f
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Mar 30, 2025
eedb4c9
Format doc files
pombredanne Mar 30, 2025
b7194c8
Refine doc handling
pombredanne Mar 30, 2025
a5bcdbd
Add twine check to release publication
pombredanne Mar 30, 2025
4aea060
Do not format vendored code from ScanCode
pombredanne Mar 30, 2025
e988d42
Merge latest skeleton
pombredanne Mar 30, 2025
a6c25fb
Refine doc contribution docs
pombredanne Mar 30, 2025
b55a22d
Correct doc style
pombredanne Mar 31, 2025
ff83003
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Mar 31, 2025
dc123f1
Merge pull request #95 from aboutcode-org/80-update-skeleton-script
JonoYang Mar 31, 2025
68daae1
Replace black and isort with ruff
JonoYang Mar 27, 2025
6a8c9ae
Use org standard 100 line length
pombredanne Mar 28, 2025
2fd31d5
Lint all common code directories
pombredanne Mar 29, 2025
eb5fc82
Remove unused targets
pombredanne Mar 29, 2025
529d516
Improve import sorting
pombredanne Mar 29, 2025
aae1a28
Apply small code updates
pombredanne Mar 29, 2025
037f9fc
Format code
pombredanne Mar 29, 2025
1189dda
Apply cosmetic refactorings
pombredanne Mar 29, 2025
84257fb
Reformat test code
pombredanne Mar 29, 2025
00684f7
Format code
pombredanne Mar 29, 2025
7c4278d
Refine ruff configuration
pombredanne Mar 29, 2025
47cb840
Format doc
pombredanne Mar 29, 2025
7b29b59
Run doc8 on all rst files
pombredanne Mar 29, 2025
86c7ca4
Enable doc style checks
pombredanne Mar 29, 2025
71583c5
Do not format more test data
pombredanne Mar 30, 2025
0f1a403
Do not treat rst as Python
pombredanne Mar 30, 2025
6bea657
Combine testing and docs extra for simplicity
pombredanne Mar 30, 2025
c615589
Refine checking of docs with doc8
pombredanne Mar 30, 2025
04e0a89
Refine doc handling
pombredanne Mar 30, 2025
8897cc6
Add twine check to release publication
pombredanne Mar 30, 2025
3d42985
Refine doc contribution docs
pombredanne Mar 30, 2025
f428366
Update codestyle command
JonoYang Mar 31, 2025
f0d0e21
Update README.rst
JonoYang Mar 31, 2025
f3a8aa6
Update BUILDDIR envvar in docs/Makefile
JonoYang Mar 31, 2025
772bb43
Add regenrated test files
TG1999 Apr 1, 2025
85ca9f5
Fix regenerated file
TG1999 Apr 1, 2025
5b0f4d6
Fix doc line length
pombredanne Apr 1, 2025
7b6f41f
Merge branch 'add-code-style-checks' of https://github.com/nexB/skeleton
pombredanne Apr 1, 2025
e776fef
Format code
pombredanne Apr 1, 2025
d839843
Merge latest skeleton
pombredanne Apr 1, 2025
2a43f4c
Correct supported runner on Azure
pombredanne Apr 1, 2025
5118d15
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Apr 1, 2025
a488b31
Add debug details to random CI Exception
pombredanne Apr 1, 2025
d1dd087
Skip test that cannot work on Python 3.13
pombredanne Apr 1, 2025
4a15550
Add code checks to CI
pombredanne Apr 1, 2025
6f6aac9
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Apr 1, 2025
d8c5454
Remove test for code style
pombredanne Apr 1, 2025
8a31546
Format code
pombredanne Apr 1, 2025
b2d7512
Revert support for Python 3.13
pombredanne Apr 1, 2025
94fd2c8
Merge remote-tracking branch 'local-skel/add-code-style-checks' into …
pombredanne Apr 1, 2025
f4bf8a9
Mark as online tests that are online
pombredanne Apr 2, 2025
2cd910b
Run online tests only once per OS
pombredanne Apr 2, 2025
60ecee5
Format code
pombredanne Apr 2, 2025
148aae9
Use double quotes for Windows
pombredanne Apr 2, 2025
2e3464b
Ignore local .env file
pombredanne Apr 2, 2025
d4af79f
Add correct extras for documentation
pombredanne Apr 2, 2025
49bfd37
Improve MANIFEST
pombredanne Apr 2, 2025
5bc987a
Improve cleaning on POSIX
pombredanne Apr 2, 2025
887779a
Rename dev extra to "dev"
pombredanne Apr 2, 2025
209231f
Add more excludes from tests
pombredanne Apr 2, 2025
47bce2d
Do not lint django migrations
pombredanne Apr 2, 2025
5025cfb
Add README.rst to list of "license files"
pombredanne Apr 2, 2025
548a72e
Use Python 3.9 as lowest suupported version
pombredanne Apr 2, 2025
3d256b4
Drop pycodestyle
pombredanne Apr 2, 2025
6450529
Bump pytest minimal version
pombredanne Apr 2, 2025
98f666a
Merge latest skeleton
pombredanne Apr 2, 2025
c3bc758
Pin test requirements
pombredanne Apr 3, 2025
45e12a8
Merge latest master
pombredanne Apr 7, 2025
2e9ceff
Regen tests expectations
pombredanne Apr 7, 2025
155918f
Merge remote-tracking branch 'origin/main' into new-skeleton-ruff
pombredanne Apr 24, 2025
3aad6f1
Regen tests expectations
pombredanne Apr 24, 2025
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
23 changes: 9 additions & 14 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,29 @@ on: [push, pull_request]

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

strategy:
max-parallel: 4
matrix:
python-version: [3.9]
python-version: [3.12]

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

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

- name: Check Sphinx Documentation build minimally
working-directory: ./docs
run: sphinx-build -E -W source build
- name: Check documentation and HTML for errors and dead links
run: make docs-check

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


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

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.9
python-version: 3.12

- name: Install pypa/build
run: python -m pip install build --user
- name: Install pypa/build and twine
run: python -m pip install --user build twine

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/

- name: Validate wheel and sdis for Pypi
run: python -m twine check dist/*

- name: Upload built archives
uses: actions/upload-artifact@v4
with:
Expand All @@ -47,7 +50,7 @@ jobs:
name: Create GH release
needs:
- build-pypi-distribs
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Download built archives
Expand All @@ -57,7 +60,7 @@ jobs:
path: dist

- name: Create GH release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
draft: true
files: dist/*
Expand All @@ -67,7 +70,7 @@ jobs:
name: Create PyPI release
needs:
- create-gh-release
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04

steps:
- name: Download built archives
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,5 @@ tcl

# Ignore Jupyter Notebook related temp files
.ipynb_checkpoints/
/.ruff_cache/
.env
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ python:
- method: pip
path: .
extra_requirements:
- docs
- dev
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ v0.9.5
v0.9.4
------

- Create PyPI cache location in the home directory if a cache directory cannot be made at the project root.
- Create PyPI cache location in the home directory if a cache directory cannot be made at the
project root.
- Replace packaging with packvers.
- Prevent duplicated package versions.

Expand Down
14 changes: 12 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
graft src
graft docs
graft etc

include *.LICENSE
include NOTICE
include *.ABOUT
include *.toml
include *.yml
include *.rst
include *.png
include setup.*
include configure*
include requirements*
include .git*
include .dockerignore
include .gitignore
include .readthedocs.yml
include manage.py
include Dockerfile*
include Makefile
include MANIFEST.in

global-exclude *.py[co] __pycache__ *.*~
include .VERSION

global-exclude *.py[co] __pycache__ *.*~
45 changes: 25 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,33 @@ 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 --skip-glob "*/_packagedcode/*"
conf:
@echo "-> Install dependencies"
./configure

black:
@echo "-> Apply black code formatter"
${VENV}/bin/black -l 100 src tests setup.py --exclude "_packagedcode/.*"
dev:
@echo "-> Configure and install development dependencies"
./configure --dev

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

valid: isort black
valid:
@echo "-> Run Ruff format"
@${ACTIVATE} ruff format
@echo "-> Run Ruff linter"
@${ACTIVATE} ruff check --fix

check:
@echo "-> Run pycodestyle (PEP8) validation"
@${ACTIVATE} pycodestyle --max-line-length=110 \
--exclude=.eggs,etc/scripts,src/_packagedcode,venv/,lib/,thirdparty/,docs/,.cache/ .
@echo "-> Run isort imports ordering validation"
@${ACTIVATE} isort --sl --check-only -l 100 setup.py src tests --skip-glob "*/_packagedcode/*"
@echo "-> Run black validation"
@${ACTIVATE} black --check -l 100 src tests setup.py --exclude "_packagedcode/.*"
@echo "-> Run Ruff linter validation (pycodestyle, bandit, isort, and more)"
@${ACTIVATE} ruff check
@echo "-> Run Ruff format validation"
@${ACTIVATE} ruff format --check
@$(MAKE) doc8
@echo "-> Run ABOUT files validation"
@${ACTIVATE} about check etc/

clean:
@echo "-> Clean the Python env"
Expand All @@ -50,6 +51,10 @@ test:

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

docs-check:
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/

.PHONY: conf dev check valid black isort clean test docs
.PHONY: conf dev check valid clean test docs docs-check
24 changes: 2 additions & 22 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,39 +1,19 @@
#

# Copyright (c) nexB Inc. and others.

# SPDX-License-Identifier: Apache-2.0

#

# Visit https://aboutcode.org and https://github.com/aboutcode-org/python-inspector

# 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");

# you may not use this file except in compliance with the License.

# You may obtain a copy of the License at

#

# http://www.apache.org/licenses/LICENSE-2.0

# http://www.apache.org/licenses/LICENSE-2.0
#

# Unless required by applicable law or agreed to in writing, software

# distributed under the License is distributed on an "AS IS" BASIS,

# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

# See the License for the specific language governing permissions and

# limitations under the License.

#
16 changes: 4 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,19 @@ This project is funded, supported and sponsored by:

- Generous support and contributions from users like you!
- the European Commission NGI programme
- the NLnet Foundation
- the NLnet Foundation
- the Swiss State Secretariat for Education, Research and Innovation (SERI)
- Google, including the Google Summer of Code and the Google Seasons of Doc programmes
- Mercedes-Benz Group
- Microsoft and Microsoft Azure
- AboutCode ASBL
- nexB Inc.
- nexB Inc.



|europa| |dgconnect|
|europa| |dgconnect|

|ngi| |nlnet|
|ngi| |nlnet|

|aboutcode| |nexb|

Expand Down Expand Up @@ -177,11 +177,3 @@ Communications Networks, Content and Technology under grant agreement No 1010929
:target: https://nlnet.nl/discovery/
:height: 40
:alt: NGI Discovery logo








Loading
Loading