Skip to content

Commit 04e0a89

Browse files
pombredanneJonoYang
authored andcommitted
Refine doc handling
* remove CI scripts and use Makefile targets instead * ensure doc8 runs quiet * add new docs-check make target to run documentation and links checks * update oudated doc for docs contribution Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent c615589 commit 04e0a89

File tree

7 files changed

+17
-27
lines changed

7 files changed

+17
-27
lines changed

.github/workflows/docs-ci.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,12 @@ jobs:
2121
python-version: ${{ matrix.python-version }}
2222

2323
- name: Install Dependencies
24-
run: pip install -e .[docs]
24+
run: ./configure --dev
2525

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

30-
- name: Check for documentation style errors
31-
working-directory: ./docs
32-
run: ./scripts/doc8_style_check.sh
29+
- name: Check documentation for style errors
30+
run: make doc8
3331

3432

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dev:
1919

2020
doc8:
2121
@echo "-> Run doc8 validation"
22-
@${ACTIVATE} doc8 docs/ *.rst
22+
@${ACTIVATE} doc8 --quiet docs/ *.rst
2323

2424
valid:
2525
@echo "-> Run Ruff format"
@@ -46,6 +46,10 @@ test:
4646

4747
docs:
4848
rm -rf docs/_build/
49-
@${ACTIVATE} sphinx-build docs/ docs/_build/
49+
@${ACTIVATE} sphinx-build docs/source docs/_build/
5050

51-
.PHONY: conf dev check valid clean test docs
51+
docs-check:
52+
@${ACTIVATE} sphinx-build -E -W -b html docs/source docs/_build/
53+
@${ACTIVATE} sphinx-build -E -W -b linkcheck docs/source docs/_build/
54+
55+
.PHONY: conf dev check valid clean test docs docs-check

docs/scripts/doc8_style_check.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/scripts/sphinx_build_link_check.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# -- Project information -----------------------------------------------------
1919

2020
project = "nexb-skeleton"
21-
copyright = "nexB Inc. and others."
21+
copyright = "nexB Inc., AboutCode and others."
2222
author = "AboutCode.org authors and contributors"
2323

2424

docs/source/contribute/contrib_doc.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ What is Checked?
147147
^^^^^^^^^^^^^^^^
148148

149149
PyCQA is an Organization for code quality tools (and plugins) for the Python programming language.
150-
Doc8 is a sub-project of the same Organization. Refer this `README <https://github.com/PyCQA/doc8/blob/master/README.rst>`_ for more details.
150+
Doc8 is a sub-project of the same Organization. Refer this `README <https://github.com/PyCQA/doc8/blob/main/README.rst>`_ for more details.
151151

152152
What is checked:
153153

@@ -169,11 +169,11 @@ What is checked:
169169
Interspinx
170170
----------
171171

172-
ScanCode toolkit documentation uses `Intersphinx <http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html>`_
172+
ScanCode toolkit documentation uses `Intersphinx <https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html>`_
173173
to link to other Sphinx Documentations, to maintain links to other Aboutcode Projects.
174174

175175
To link sections in the same documentation, standart reST labels are used. Refer
176-
`Cross-Referencing <http://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#ref-role>`_ for more information.
176+
`Cross-Referencing <https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html>`_ for more information.
177177

178178
For example::
179179

@@ -230,7 +230,7 @@ Style Conventions for the Documentaion
230230

231231
1. Headings
232232

233-
(`Refer <http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections>`_)
233+
(`Refer <https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#sections>`_)
234234
Normally, there are no heading levels assigned to certain characters as the structure is
235235
determined from the succession of headings. However, this convention is used in Python’s Style
236236
Guide for documenting which you may follow:

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,5 @@ max-complexity = 10
122122

123123

124124
[tool.doc8]
125-
126125
ignore-path = ["docs/build", "doc/build", "docs/_build", "doc/_build"]
127126
max-line-length=100
128-
verbose=0

0 commit comments

Comments
 (0)