Skip to content

Commit edcac62

Browse files
committed
Merge branch 'develop' of github.com:nexB/aboutcode-toolkit into develop
2 parents 8f0603c + e0bb22e commit edcac62

File tree

15 files changed

+126
-36
lines changed

15 files changed

+126
-36
lines changed

.github/workflows/docs-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717

1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

.github/workflows/pypi-release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ jobs:
2424
runs-on: ubuntu-20.04
2525

2626
steps:
27-
- uses: actions/checkout@master
27+
- uses: actions/checkout@v3
2828
- name: Set up Python
29-
uses: actions/setup-python@v1
29+
uses: actions/setup-python@v4
3030
with:
3131
python-version: 3.9
3232

@@ -78,6 +78,6 @@ jobs:
7878

7979
- name: Publish to PyPI
8080
if: startsWith(github.ref, 'refs/tags')
81-
uses: pypa/gh-action-pypi-publish@master
81+
uses: pypa/gh-action-pypi-publish@release/v1
8282
with:
8383
password: ${{ secrets.PYPI_API_TOKEN }}

.readthedocs.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@
55
# Required
66
version: 2
77

8+
# Build in latest ubuntu/python
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.11"
13+
14+
# Build PDF & ePub
15+
formats:
16+
- epub
17+
- pdf
18+
819
# Where the Sphinx conf.py file is located
920
sphinx:
1021
configuration: docs/source/conf.py

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
==============================
22
Changelog
3+
34
2023-xx-xx
45
Release x.x.x
56

67
* The tool will now show which worksheet (if .xlsx input) is the tool working on
78
* Error handling if defined worksheet does not exist
9+
* Adopt 3.3.1 specification: introduce ``ignored_resources``
810

911

1012
2023-03-09

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ In addition, this tool is able to generate attribution notices and
2121
identify redistributable source code used in your project to help you comply
2222
with open source licenses conditions.
2323

24-
This version of the AboutCode Toolkit follows the ABOUT specification version 3.3.0 at:
24+
This version of the AboutCode Toolkit follows the ABOUT specification version 3.3.1 at:
2525
https://aboutcode-toolkit.readthedocs.io/en/latest/specification.html
2626

2727

azure-pipelines.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77

88
jobs:
99

10-
- template: etc/ci/azure-posix.yml
11-
parameters:
12-
job_name: ubuntu18_cpython
13-
image_name: ubuntu-18.04
14-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
15-
test_suites:
16-
all: venv/bin/pytest -n 2 -vvs
17-
1810
- template: etc/ci/azure-posix.yml
1911
parameters:
2012
job_name: ubuntu20_cpython
@@ -31,14 +23,6 @@ jobs:
3123
test_suites:
3224
all: venv/bin/pytest -n 2 -vvs
3325

34-
- template: etc/ci/azure-posix.yml
35-
parameters:
36-
job_name: macos1015_cpython_2
37-
image_name: macos-10.15
38-
python_versions: ['3.7', '3.8', '3.9', '3.10', '3.11']
39-
test_suites:
40-
all: venv/bin/pytest -n 2 -vvs
41-
4226
- template: etc/ci/azure-posix.yml
4327
parameters:
4428
job_name: macos11_cpython

docs/source/conf.py

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,25 @@
2828
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2929
# ones.
3030
extensions = [
31-
'sphinx.ext.intersphinx',
31+
"sphinx.ext.intersphinx",
32+
"sphinx_reredirects",
3233
]
3334

35+
36+
# Redirects for olds pages
37+
# See https://documatt.gitlab.io/sphinx-reredirects/usage.html
38+
redirects = {}
39+
40+
# This points to aboutcode.readthedocs.io
41+
# In case of "undefined label" ERRORS check docs on intersphinx to troubleshoot
42+
# Link was created at commit - https://github.com/nexB/aboutcode/commit/faea9fcf3248f8f198844fe34d43833224ac4a83
43+
44+
intersphinx_mapping = {
45+
"aboutcode": ("https://aboutcode.readthedocs.io/en/latest/", None),
46+
"scancode-workbench": ("https://scancode-workbench.readthedocs.io/en/develop/", None),
47+
}
48+
49+
3450
# Add any paths that contain templates here, relative to this directory.
3551
templates_path = ['_templates']
3652

@@ -61,6 +77,32 @@
6177
"conf_py_path": "/docs/source/", # path in the checkout to the docs root
6278
}
6379

64-
html_css_files = [
65-
'_static/theme_overrides.css'
66-
]
80+
html_css_files = ["_static/theme_overrides.css"]
81+
82+
83+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
84+
html_show_sphinx = True
85+
86+
# Define CSS and HTML abbreviations used in .rst files. These are examples.
87+
# .. role:: is used to refer to styles defined in _static/theme_overrides.css and is used like this: :red:`text`
88+
rst_prolog = """
89+
.. |psf| replace:: Python Software Foundation
90+
91+
.. # define a hard line break for HTML
92+
.. |br| raw:: html
93+
94+
<br />
95+
96+
.. role:: red
97+
98+
.. role:: img-title
99+
100+
.. role:: img-title-para
101+
102+
"""
103+
104+
# -- Options for LaTeX output -------------------------------------------------
105+
106+
latex_elements = {
107+
'classoptions': ',openany,oneside'
108+
}

docs/source/general.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ it will copy and store next to the .ABOUT files.
8585
* - name
8686
- Component name
8787
- Mandatory
88+
* - ignored_resources
89+
- List of paths ignored from the ``about_resource``
90+
- Optional
8891
* - version
8992
- Component version
9093
- Optional

docs/source/home.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In addition, this tool is able to generate attribution notices and
2020
identify redistributable source code used in your project to help you comply
2121
with open source licenses conditions.
2222

23-
This version of the AboutCode Toolkit follows the ABOUT specification version 3.3.0 at:
23+
This version of the AboutCode Toolkit follows the ABOUT specification version 3.3.1 at:
2424
https://aboutcode-toolkit.readthedocs.io/en/latest/specification.html
2525

2626

docs/source/specification.rst

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _specification:
22

33
===============================
4-
ABOUT File Specification v3.3.0
4+
ABOUT File Specification v3.3.1
55
===============================
66

77
Purpose
@@ -218,11 +218,14 @@ in any case combination.
218218
Referencing the file or directory documented by an ABOUT file
219219
-------------------------------------------------------------
220220

221-
An ABOUT file documents one file or directory. The mandatory "about_resource"
222-
field reference the documented file or directory. The value of the "about_resource"
223-
field is the name or path of the referenced file or directory.
221+
An ABOUT file documents one file or directory. The mandatory ``about_resource``
222+
field reference the documented file or directory. The value of the ``about_resource``
223+
field is the name or path of the referenced file or directory. There is also a
224+
``ignored_resources`` field which can be used to ignore a set of subpaths inside the
225+
directory which is being documented in the ABOUT file.
224226

225-
A tool processing an ABOUT file must report an error if this field is missing.
227+
A tool processing an ABOUT file must report an error if the ``about_resource``
228+
field is missing.
226229

227230
By convention, an ABOUT file is often stored in the same directory side-by-side
228231
to the file or directory that it documents, but this is not mandatory.
@@ -240,6 +243,14 @@ In this example, the ABOUT file documents a whole sub-directory:
240243
241244
about_resource: linux-kernel-2.6.23
242245
246+
In this example, the ABOUT file documents a whole sub-directory, with some
247+
sub-paths under the directory ignored:
248+
249+
.. code-block:: none
250+
251+
about_resource: linux-kernel-2.6.23
252+
ignored_resources: linux-kernel-2.6.23/Documentation
253+
243254
In this example, the ABOUT file documents the current directory, using a "." period to reference it:
244255

245256
.. code-block:: none
@@ -258,6 +269,9 @@ mandatory field are missing.
258269
Optional Information fields
259270
---------------------------
260271

272+
- ignored_resources: A list of paths under the ``about_resource`` path, which are
273+
not documented in the ABOUT file, and the information in the ABOUT file does not
274+
apply to these subpaths.
261275
- version: Component or package version. A component or package usually has a version,
262276
such as a revision number or hash from a version control system (for a snapshot checked
263277
out from VCS such as Subversion or Git). If not available, the version should be the date

0 commit comments

Comments
 (0)