anytree icon indicating copy to clipboard operation
anytree copied to clipboard

2.12.1: sphinx warnings `reference target not found`

Open kloczek opened this issue 11 months ago • 0 comments

First of all currently sphinx-build command shows some warnings because is missing path to anytree source tree

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v7.2.6
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 27 added, 0 changed, 0 removed
reading sources... [100%] tricks/yaml
WARNING: autodoc: failed to import module 'cachedsearch' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.preorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.postorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.levelorderiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.levelordergroupiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'iterators.zigzaggroupiter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.anynode' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.node' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.nodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.lightnodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.symlinknode' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.symlinknodemixin' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'node.exceptions' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'render' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'resolver' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'search' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'util' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'walker' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'dotexport' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.dictexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.dotexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.jsonexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'exporter.mermaidexporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'importer.dictimporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
WARNING: autodoc: failed to import module 'importer.jsonimporter' from module 'anytree'; the following exception was raised:
No module named 'anytree'
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/dotexport.rst: WARNING: document isn't included in any toctree
done
writing... python-anytree.3 { installation intro api api/anytree.node api/anytree.iterators api/anytree.render api/anytree.search api/anytree.cachedsearch api/anytree.resolver api/anytree.walker api/anytree.util importer importer/dictimporter importer/jsonimporter exporter exporter/dictexporter exporter/jsonexporter exporter/dotexporter exporter/mermaidexporter tricks tricks/readonly tricks/yaml tricks/multidim tricks/weightededges tricks/consistencychecks } /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:11: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:12: WARNING: 'any' reference target not found: AnyNode
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:13: WARNING: 'any' reference target not found: NodeMixin
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:17: WARNING: 'any' reference target not found: Resolver
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:18: WARNING: 'any' reference target not found: Walker
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:22: WARNING: 'any' reference target not found: PreOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:23: WARNING: 'any' reference target not found: PostOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:24: WARNING: 'any' reference target not found: LevelOrderIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:25: WARNING: 'any' reference target not found: LevelOrderGroupIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:26: WARNING: 'any' reference target not found: ZigZagGroupIter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:34: WARNING: 'any' reference target not found: RenderTree
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:31: WARNING: 'any' reference target not found: AsciiStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:32: WARNING: 'any' reference target not found: ContStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:33: WARNING: 'any' reference target not found: ContRoundStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:34: WARNING: 'any' reference target not found: DoubleStyle
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:53: WARNING: 'any' reference target not found: children
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:131: WARNING: 'any' reference target not found: NodeMixin
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:131: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:21: WARNING: 'any' reference target not found: DictExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:50: WARNING: 'any' reference target not found: DictExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/tricks/yaml.rst:61: WARNING: 'any' reference target not found: DictImporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:132: WARNING: 'any' reference target not found: Node
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:132: WARNING: 'any' reference target not found: RenderTree
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:142: WARNING: 'any' reference target not found: UniqueDotExporter
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/index.rst:207: WARNING: 'any' reference target not found: NodeMixin
done
build succeeded, 53 warnings.
This can be fixed by patch like below: ```patch --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,9 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html

+import sys +import os +sys.path.insert(0, os.path.abspath(".."))

-- Project information -----------------------------------------------------

https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information


This patch fixes what is in the comment and that can of fix is suggested in sphinx example copy.py https://www.sphinx-doc.org/en/master/usage/configuration.html#example-of-configuration-file

Than .. on building my packages I'm using `sphinx-build` command with `-n` switch which shows warmings about missing references. These are not critical issues.
<details>
<summary>Here is the output with warnings:</summary>

```console
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v7.2.6
making output directory... done
loading intersphinx inventory from http://docs.python.org/3/objects.inv...
intersphinx inventory has moved: http://docs.python.org/3/objects.inv -> https://docs.python.org/3/objects.inv
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 27 added, 0 changed, 0 removed
reading sources... [100%] tricks/yaml
looking for now-outdated files... none found
pickling environment... done
checking consistency... /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/dotexport.rst: WARNING: document isn't included in any toctree
done
writing... python-anytree.3 { installation intro api api/anytree.node api/anytree.iterators api/anytree.render api/anytree.search api/anytree.cachedsearch api/anytree.resolver api/anytree.walker api/anytree.util importer importer/dictimporter importer/jsonimporter exporter exporter/dictexporter exporter/jsonexporter exporter/dotexporter exporter/mermaidexporter tricks tricks/readonly tricks/yaml tricks/multidim tricks/weightededges tricks/consistencychecks } /home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/docs/intro.rst:53: WARNING: more than one target found for 'any' cross-reference 'children': could be :py:attr:`anytree.node.nodemixin.NodeMixin.children` or :py:attr:`anytree.node.lightnodemixin.LightNodeMixin.children`
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: upwards
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: common
/home/tkloczko/rpmbuild/BUILD/anytree-2.12.1/anytree/walker.py:docstring of anytree.walker.Walker.walk:: WARNING: py:class reference target not found: downwards
done
build succeeded, 5 warnings.

You can peak on fixes that kind of issues in other projects https://github.com/RDFLib/rdflib-sqlalchemy/issues/95 https://github.com/RDFLib/rdflib/pull/2036 https://github.com/click-contrib/sphinx-click/commit/abc31069 https://github.com/frostming/unearth/issues/14 https://github.com/jaraco/cssutils/issues/21 https://github.com/latchset/jwcrypto/pull/289 https://github.com/latchset/jwcrypto/pull/289 https://github.com/pypa/distlib/commit/98b9b89f https://github.com/pywbem/pywbem/pull/2895 https://github.com/sissaschool/elementpath/commit/bf869d9e https://github.com/sissaschool/xmlschema/commit/42ea98f2 https://github.com/sqlalchemy/sqlalchemy/commit/5e88e6e8

kloczek avatar Mar 13 '24 12:03 kloczek