Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
ea5044d
Create script to update repo skeleton #80
JonoYang Jul 17, 2023
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
da8eff0
Do not format more test data
pombredanne Mar 30, 2025
4f9e936
Do not treat rst as Python
pombredanne Mar 30, 2025
a2809fb
Combine testing and docs extra for simplicity
pombredanne Mar 30, 2025
43b96c2
Refine checking of docs with doc8
pombredanne Mar 30, 2025
b7194c8
Refine doc handling
pombredanne Mar 30, 2025
a5bcdbd
Add twine check to release publication
pombredanne Mar 30, 2025
a6c25fb
Refine doc contribution docs
pombredanne Mar 30, 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
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
2a43f4c
Correct supported runner on Azure
pombredanne Apr 1, 2025
4a15550
Add code checks to CI
pombredanne Apr 1, 2025
b2d7512
Revert support for Python 3.13
pombredanne Apr 1, 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
4f9751c
Merge pull request #96 from aboutcode-org/add-code-style-checks
pombredanne Apr 4, 2025
af87cfa
Update CI runners and scripts
AyanSinhaMahapatra Jun 24, 2025
c1002c2
Merge pull request #97 from aboutcode-org/update-ci-and-runners
AyanSinhaMahapatra Jun 24, 2025
72c7d26
Add missing wheel builds on release CI
AyanSinhaMahapatra Jun 25, 2025
4e5b7fd
Merge pull request #98 from aboutcode-org/update-release-ci
AyanSinhaMahapatra Jun 25, 2025
265e612
Drop python3.9 support and add python 3.14
AyanSinhaMahapatra Oct 21, 2025
fc4fe3a
Support trusted-publishing for package releases
AyanSinhaMahapatra Oct 22, 2025
e81ff6d
Update RTD build python version
AyanSinhaMahapatra Oct 24, 2025
fb75a2e
Merge pull request #99 from aboutcode-org/update-python-support
AyanSinhaMahapatra Oct 24, 2025
cf04877
Deprecate MacOS-13 CI runners
AyanSinhaMahapatra Dec 15, 2025
3c2606a
Merge pull request #100 from aboutcode-org/deprecate-macos-runners
AyanSinhaMahapatra Dec 15, 2025
8682dbf
Typo and spacing corrections.
chinyeungli Feb 23, 2026
ae254b3
Merge pull request #102 from aboutcode-org/enhance_docstring_clarity
chinyeungli Feb 27, 2026
33840a6
Replace versions with commit hashes in actions
AyanSinhaMahapatra Apr 16, 2026
fa15c37
Merge pull request #103 from aboutcode-org/commit-hash-in-ci
AyanSinhaMahapatra Apr 16, 2026
c3b24ea
Enable zizmor in github actions
AyanSinhaMahapatra Apr 16, 2026
c9cb5a9
Merge pull request #104 from aboutcode-org/enable-zizmor
AyanSinhaMahapatra Apr 16, 2026
b3cfa59
Set permissions for github release properly
AyanSinhaMahapatra Jul 21, 2026
c55ec7c
Merge pull request #105 from aboutcode-org/fix-github-release
AyanSinhaMahapatra Jul 21, 2026
e99c874
Merge remote-tracking branch 'skeleton/main'
AyanSinhaMahapatra Aug 18, 2026
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
7 changes: 5 additions & 2 deletions .github/workflows/docs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: CI Documentation

on: [push, pull_request]

permissions: {}
jobs:
build:
runs-on: ubuntu-24.04
Expand All @@ -13,10 +14,12 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405
with:
python-version: ${{ matrix.python-version }}

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: GitHub Actions Security Analysis with zizmor 🌈

on:
push:
branches: ["main"]
pull_request:
branches: ["**"]

permissions: {}

jobs:
zizmor:
name: Run zizmor 🌈
runs-on: ubuntu-latest
permissions:
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Run zizmor 🌈
uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3
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
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__ *.*~
7 changes: 4 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ CLI_ARGS=$1

# Requirement arguments passed to pip and used by default or with --dev.
REQUIREMENTS="--editable . "
DOCS_REQUIREMENTS="--editable .[docs]"
DOCS_REQUIREMENTS="--editable .[dev]"

# where we create a virtualenv
VIRTUALENV_DIR=venv

# Cleanable files and directories to delete with the --clean option
CLEANABLE="build dist venv .cache .eggs"
CLEANABLE="build dist venv .cache .eggs *.egg-info docs/_build/ pip-selfcheck.json"

# extra arguments passed to pip
PIP_EXTRA_ARGS=" "
Expand Down Expand Up @@ -110,7 +110,7 @@ create_virtualenv() {
fi

$PYTHON_EXECUTABLE "$VIRTUALENV_PYZ" \
--wheel embed --pip embed --setuptools embed \
--pip embed --setuptools embed \
--seeder pip \
--never-download \
--no-periodic-update \
Expand Down Expand Up @@ -167,6 +167,7 @@ clean() {
for cln in $CLEANABLE;
do rm -rf "${CFG_ROOT_DIR:?}/${cln:?}";
done
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
set +e
exit
}
Expand Down
6 changes: 3 additions & 3 deletions configure.bat
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

@rem # Requirement arguments passed to pip and used by default or with --dev.
set "REQUIREMENTS=--editable . "
set "DOCS_REQUIREMENTS=--editable .[docs]"
set "DOCS_REQUIREMENTS=--editable .[dev]"

@rem # where we create a virtualenv
set "VIRTUALENV_DIR=venv"
Expand Down Expand Up @@ -110,7 +110,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (

if exist "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" (
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\etc\thirdparty\virtualenv.pyz" ^
--wheel embed --pip embed --setuptools embed ^
--pip embed --setuptools embed ^
--seeder pip ^
--never-download ^
--no-periodic-update ^
Expand All @@ -126,7 +126,7 @@ if not exist "%CFG_BIN_DIR%\python.exe" (
)
)
%PYTHON_EXECUTABLE% "%CFG_ROOT_DIR%\%VIRTUALENV_DIR%\virtualenv.pyz" ^
--wheel embed --pip embed --setuptools embed ^
--pip embed --setuptools embed ^
--seeder pip ^
--never-download ^
--no-periodic-update ^
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SPHINXAUTOBUILD = sphinx-autobuild
SOURCEDIR = source
BUILDDIR = build
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
Expand Down
7 changes: 4 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

# -- Project information -----------------------------------------------------

project = "aboutcode"
copyright = "nexB Inc. and others."
project = "nexb-skeleton"
copyright = "nexB Inc., AboutCode and others."
author = "AboutCode.org authors and contributors"


Expand Down Expand Up @@ -94,7 +94,8 @@
html_show_sphinx = True

# Define CSS and HTML abbreviations used in .rst files. These are examples.
# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text`
# .. role:: is used to refer to styles defined in _static/theme_overrides.css
# and is used like this: :red:`text`
rst_prolog = """
.. |psf| replace:: Python Software Foundation

Expand Down
36 changes: 17 additions & 19 deletions docs/source/contributing/contrib_doc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ you can install the dependencies in a virtualenv::

.. note::

In case of windows, run ``configure --docs`` instead of this.
In case of windows, run ``configure --dev``.

Now, this will install the following prerequisites:
This will install and configure all requirements foer development including for docs development.

- Sphinx
- sphinx_rtd_theme (the format theme used by ReadTheDocs)
Expand All @@ -57,21 +57,21 @@ These requirements are already present in setup.cfg and `./configure
Now you can build the HTML documents locally::

source venv/bin/activate
cd docs
make html
make docs

Assuming that your Sphinx installation was successful, Sphinx should build
a local instance of the documentation .html files::

open build/html/index.html
open docs/_build/index.html

.. note::

In case this command did not work, for example on Ubuntu 18.04 you may
get a message like “Couldn’t get a file descriptor referring to the
console”, try:

::
source venv/bin/activate
make doc8
make docs-check

see build/html/index.html

Expand Down Expand Up @@ -119,31 +119,26 @@ that common errors are avoided and documentation standards are enforced.
Travis-CI presently checks for these 3 aspects of the documentation :

1. Successful Builds (By using ``sphinx-build``)
2. No Broken Links (By Using ``link-check``)
3. Linting Errors (By Using ``Doc8``)

So run these scripts at your local system before creating a Pull Request::
2. No Broken Links (By Using ``linkcheck``)
3. Linting Errors (By Using ``doc8``)

cd docs
./scripts/sphinx_build_link_check.sh
./scripts/doc8_style_check.sh
You myst run these scripts locally before creating a pull request::

If you don't have permission to run the scripts, run::
make doc8
make check-docs

chmod u+x ./scripts/doc8_style_check.sh

.. _doc_style_docs8:

Style Checks Using ``Doc8``
Style Checks Using ``doc8``
---------------------------

How To Run Style Tests
^^^^^^^^^^^^^^^^^^^^^^

In the project root, run the following commands::

$ cd docs
$ ./scripts/doc8_style_check.sh
make doc8

A sample output is::

Expand All @@ -168,6 +163,7 @@ A sample output is::
Now fix the errors and run again till there isn't any style error in the
documentation.


What is Checked?
^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -259,6 +255,7 @@ create a link to the local label.
For more information, refer this tutorial named `Using Intersphinx
<https://my-favorite-documentation-test.readthedocs.io/en/latest/using_intersphinx.html>`_.


.. _doc_style_conv:

Style Conventions for the Documentaion
Expand Down Expand Up @@ -350,6 +347,7 @@ Style Conventions for the Documentaion
and then included to eliminate redundancy, as these are frequently used
in multiple files.


Converting from Markdown
------------------------

Expand Down
81 changes: 79 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools >= 50", "wheel", "setuptools_scm[toml] >= 6"]
requires = ["setuptools >= 50", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand All @@ -14,7 +14,6 @@ norecursedirs = [
"dist",
"build",
"_build",
"dist",
"etc",
"local",
"ci",
Expand All @@ -34,7 +33,9 @@ norecursedirs = [
"thirdparty",
"tmp",
"venv",
".venv",
"tests/data",
"*/tests/test_data",
".eggs",
"src/*/data",
"tests/*/data"
Expand All @@ -50,3 +51,79 @@ addopts = [
"--strict-markers",
"--doctest-modules"
]

[tool.ruff]
line-length = 100
extend-exclude = []
target-version = "py310"
include = [
"pyproject.toml",
"src/**/*.py",
"etc/**/*.py",
"test/**/*.py",
"tests/**/*.py",
"doc/**/*.py",
"docs/**/*.py",
"*.py",
"."

]
# ignore test data and testfiles: they should never be linted nor formatted
exclude = [
# main style
"**/tests/data/**/*",
# scancode-toolkit
"**/tests/*/data/**/*",
# dejacode, purldb
"**/tests/testfiles/**/*",
# vulnerablecode, fetchcode
"**/tests/*/test_data/**/*",
"**/tests/test_data/**/*",
# django migrations
"**/migrations/**/*"
]

[tool.ruff.lint]
# Rules: https://docs.astral.sh/ruff/rules/
select = [
# "E", # pycodestyle
# "W", # pycodestyle warnings
"D", # pydocstyle
# "F", # Pyflakes
# "UP", # pyupgrade
# "S", # flake8-bandit
"I", # isort
# "C9", # McCabe complexity
]
ignore = ["D1", "D200", "D202", "D203", "D205", "D212", "D400", "D415", "I001"]


[tool.ruff.lint.isort]
force-single-line = true
lines-after-imports = 1
default-section = "first-party"
known-first-party = ["src", "tests", "etc/scripts/**/*.py"]
known-third-party = ["click", "pytest"]

sections = { django = ["django"] }
section-order = [
"future",
"standard-library",
"django",
"third-party",
"first-party",
"local-folder",
]

[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.ruff.lint.per-file-ignores]
# Place paths of files to be ignored by ruff here
"tests/*" = ["S101"]
"test_*.py" = ["S101"]


[tool.doc8]
ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"]
max-line-length=100
Loading