Skip to content

Commit 190f132

Browse files
authored
Merge pull request #38 from openSUSE/fix-doc-errors
Fix doc warnings
2 parents 2e7e87c + 31b347d commit 190f132

23 files changed

Lines changed: 75 additions & 1449 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ __pycache__/
1212
.Python
1313
/build/
1414
/docs/build/
15+
# Sphinx warnings
16+
/docs/*.log
1517
develop-eggs/
1618
/dist/
1719
downloads/

CHANGELOG.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,5 +204,3 @@ Removed Features
204204
----------------
205205

206206
- Remove tool.setuptools.packages.find
207-
208-
----

changelog.d/38.doc.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Fix doc warnings from Sphinx
2+
3+
* Have Sphinx warnings written to :file:`docs/sphinx-warnings.log`.
4+
* Disable ``inherited-members`` option (it creates warnings from a different docstring format).
5+
* Slightly restructured Reference guide a bit. "Docbuild CLI" is on the top level now, making :file:`modules.rst` obsolete.
6+
* Fix some ReST problems in :file:`checks.py` docstrings (mainly missing linebreaks)

docs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?= -v
6+
SPHINXOPTS ?= -v -w sphinx-warnings.log
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = source
99
BUILDDIR = build
@@ -18,4 +18,4 @@ help:
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
2020
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
21-
@echo "Target output: '$(CURDIR)/$(BUILDDIR)/$@'"
21+
@echo "Target output: '$(CURDIR)/$(BUILDDIR)/$@'"

docs/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,18 @@
7777
autoapi_options = [
7878
'members',
7979
# "undoc-members",
80-
'inherited-members',
80+
# 'inherited-members',
8181
'show-inheritance',
8282
'show-module-summary',
83-
'imported-members',
83+
# 'imported-members',
8484
'special-members',
8585
'show-inheritance-diagram', # needs sphinx.ext.inheritance_diagram & graphviz
8686
# "private-members",
8787
]
8888
autoapi_keep_files = True
8989
autodoc_typehints = 'signature'
9090
autoapi_own_page_level = 'class'
91-
91+
#autoapi_python_use_implicit_namespaces = True
9292

9393
# -- Options for extlinks extension ------------------------------------------
9494
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html

docs/source/developer/devel-helpers.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
.. _devel-helpers:
22

3+
.. start-include-devel-helpers
4+
35
Helper Tools
46
------------
57

8+
69
.. include:: ../../../devel/README.rst
710
:start-line: 3
811

docs/source/developer/prepare-environment.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ The following diagram illustrates the relationship between the main components o
4242

4343

4444

45-
4645
.. include:: devel-helpers.rst
47-
46+
:start-after: .. start-include-devel-helpers
4847

4948
GitHub CLI
5049
----------

docs/source/reference/_autoapi/docbuild/cli/cmd_build/DocBuildContext.rst

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

docs/source/reference/_autoapi/docbuild/cli/cmd_build/index.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -42,48 +42,17 @@ docbuild.cli.cmd_build
4242

4343

4444

45-
Classes
46-
-------
47-
48-
.. toctree::
49-
:hidden:
50-
51-
/reference/_autoapi/docbuild/cli/cmd_build/Doctype
52-
/reference/_autoapi/docbuild/cli/cmd_build/DocBuildContext
53-
54-
.. autoapisummary::
55-
56-
docbuild.cli.cmd_build.Doctype
57-
docbuild.cli.cmd_build.DocBuildContext
58-
59-
6045
Functions
6146
---------
6247

6348
.. autoapisummary::
6449

65-
docbuild.cli.cmd_build.validate_doctypes
6650
docbuild.cli.cmd_build.build
6751

6852

6953
Package Contents
7054
----------------
7155

72-
.. py:function:: validate_doctypes(ctx: click.Context, param: click.Parameter | None, doctypes: tuple[str, Ellipsis]) -> list[docbuild.models.doctype.Doctype]
73-
74-
Click callback function to validate a list of doctype strings.
75-
76-
Each string must conform to the format: PRODUCT/DOCSET@LIFECYCLE/LANGS
77-
LANGS can be a single language code, a comma-separated list (no spaces),
78-
or '*' for all.
79-
Defaults and wildcards (*) are handled.
80-
81-
:param param: The click parameter that triggered this callback.
82-
:param doctypes: A tuple of doctype strings to validate.
83-
:return: A list of validated Doctype objects.
84-
:raises click.Abort: If any doctype string is invalid, the command is aborted.
85-
86-
8756
.. py:function:: build(ctx: click.Context, doctypes: tuple[docbuild.models.doctype.Doctype]) -> None
8857
8958
Subcommand build.

docs/source/reference/_autoapi/docbuild/cli/cmd_repo/index.rst

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,12 @@ Functions
2626

2727
.. autoapisummary::
2828

29-
docbuild.cli.cmd_repo.clone
30-
docbuild.cli.cmd_repo.cmd_dir
31-
docbuild.cli.cmd_repo.cmd_list
3229
docbuild.cli.cmd_repo.repo
3330

3431

3532
Package Contents
3633
----------------
3734

38-
.. py:function:: clone(ctx: click.Context, repos: tuple[str, Ellipsis]) -> None
39-
40-
Clone repositories into permanent directory.
41-
42-
:param repos: A tuple of repository selectors. If empty, all repos are cloned.
43-
:param ctx: The Click context object.
44-
45-
46-
.. py:function:: cmd_dir(ctx: click.Context) -> None
47-
48-
Show the directory path for permanent repositories.
49-
50-
Outputs the path to the repository directory defined
51-
in the environment configuration.
52-
53-
:param ctx: The Click context object.
54-
55-
56-
.. py:function:: cmd_list(ctx: click.Context) -> None
57-
58-
List the available permanent repositories.
59-
60-
Outputs the directory names of all repositories defined in the
61-
environment configuration.
62-
If no repositories are defined, it outputs a message indicating that
63-
no repositories are available.
64-
65-
:param ctx: The Click context object.
66-
67-
6835
.. py:function:: repo(ctx: click.Context) -> None
6936
7037
Subcommand to validate XML configuration files.

0 commit comments

Comments
 (0)