Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.5.0: sphinx warnings reference target not found #5

Open
kloczek opened this issue May 29, 2022 · 0 comments
Open

0.5.0: sphinx warnings reference target not found #5

kloczek opened this issue May 29, 2022 · 0 comments

Comments

@kloczek
Copy link

kloczek commented May 29, 2022

First of all currently it is not possible to use straight sphinx-build command to build documentation out of source tree

+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
WARNING: autodoc: failed to import module 'pyflakes' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import class 'pyflakes.Pyflakes' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import module 'coverage' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import class 'coverage.PythonModule' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import class 'coverage.PythonPackage' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import class 'coverage.Coverage' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import module 'docs' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import function 'docs.spell' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import function 'docs.sphinx' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import function 'docs.pythonhosted_upload' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import module 'package' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
WARNING: autodoc: failed to import class 'package.Package' from module 'doitpy'; the following exception was raised:
No module named 'doitpy'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-doit-py.3 { } done
build succeeded, 13 warnings.

This can be fixed by patch like below:

--- a/doc/conf.py~      2020-05-24 12:35:05.000000000 +0000
+++ b/doc/conf.py       2022-05-29 08:17:42.055120769 +0000
@@ -19,7 +19,7 @@
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('..'))

 # -- General configuration ------------------------------------------------

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.

Here is the output with warnings:

+ /usr/bin/sphinx-build -n -T -b man doc build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
WARNING: html_static_path entry '_static' does not exist
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-doit-py.3 { } docstring of doitpy.pyflakes.Pyflakes.config:1: WARNING: py:class reference target not found: confclass.Config
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/pyflakes.py:docstring of doitpy.pyflakes.Pyflakes.config:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/pyflakes.py:docstring of doitpy.pyflakes.Pyflakes.config:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonModule:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonModule:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonModule.__init__:: WARNING: py:class reference target not found: str/pathlib.Path
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonModule.__init__:: WARNING: py:class reference target not found: str/pathlib.Path
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonPackage:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonPackage:: WARNING: py:class reference target not found: list-str
docstring of doitpy.coverage.PythonPackage.config:1: WARNING: py:class reference target not found: confclass.Config
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonPackage.__init__:: WARNING: py:class reference target not found: str/pathlib.Path
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.PythonPackage.__init__:: WARNING: py:class reference target not found: str/pathlib.Path
docstring of doitpy.coverage.Coverage.config:1: WARNING: py:class reference target not found: confclass.Config
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.Coverage.config:: WARNING: py:class reference target not found: string
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.Coverage.config:: WARNING: py:class reference target not found: parallel
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.Coverage.config:: WARNING: py:class reference target not found: concurrency
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.Coverage.config:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/coverage.py:docstring of doitpy.coverage.Coverage.__init__:: WARNING: py:class reference target not found: list-PythonFiles
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/docs.py:docstring of doitpy.docs.spell:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/docs.py:docstring of doitpy.docs.sphinx:: WARNING: py:class reference target not found: list-str
/home/tkloczko/rpmbuild/BUILD/doit-py-0.5.0/doitpy/docs.py:docstring of doitpy.docs.pythonhosted_upload:: WARNING: py:class reference target not found: list-str
done
build succeeded, 22 warnings.

You can peak on fixes that kind of issues in other projects
latchset/jwcrypto#289
click-contrib/sphinx-click@abc31069
latchset/jwcrypto#289
RDFLib/rdflib-sqlalchemy#95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant