thebjorn/pydeps

1.10.16: sphinx warnings

Closed this issue · 7 comments

Looks like in docs/copy.py is not specified path to the module code and sphins shows some warnings

[tkloczko@devel-g2v pydeps-1.10.16]$ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
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 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'arguments' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'cli' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'colors' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'depgraph' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'depgraph2dot' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'dot' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'dummymodule' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'mf27' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'package_names' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'py2depgraph' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'pycompat' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'pydeps' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'pystdlib' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'render_context' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
WARNING: autodoc: failed to import module 'target' from module 'pydeps'; the following exception was raised:
No module named 'pydeps'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pydeps.3 { } done
build succeeded, 16 warnings.

This can be fixed by using patch:

--- a/docs/conf.py~     2022-04-21 13:31:46.000000000 +0000
+++ b/docs/conf.py      2022-04-21 13:32:30.983691818 +0000
@@ -16,7 +16,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 does exactly what is mentioned that it needs to be done in comment above modified line.
With that patch:

[tkloczko@devel-g2v pydeps-1.10.16]$ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v4.5.0
making output directory... done
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
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-pydeps.3 { } done
build succeeded.

Feel free to commit that change or please let me know if you want this as PR.

Thanks. v1.10.17 is on PyPI with the fix.

Thnk you 😄

Just found that 1.10.19 has one that type warning

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.2
making output directory... done
loading intersphinx inventory from http://docs.python.org/objects.inv...
intersphinx inventory has moved: http://docs.python.org/objects.inv -> https://docs.python.org/3/objects.inv
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-pydeps.3 { } /home/tkloczko/rpmbuild/BUILD/pydeps-1.10.19/pydeps/depgraph.py:docstring of pydeps.depgraph.DepGraph:3: WARNING: py:func reference target not found: py2depgraph.py2dep
done
build succeeded, 1 warning.

Thanks. Fixed in v1.10.21 and I've added a build docs step to the pipeline.

New warnings in latest version😋

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.0.2
making output directory... done
loading intersphinx inventory from https://docs.python.org/3/objects.inv/objects.inv...
WARNING: failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://docs.python.org/3/objects.inv/objects.inv' not fetchable due to <class 'requests.exceptions.HTTPError'>: 404 Client Error: Not Found for url: https://docs.python.org/3/objects.inv/objects.inv
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-pydeps.3 { } /home/tkloczko/rpmbuild/BUILD/pydeps-1.10.21/pydeps/depgraph.py:docstring of pydeps.depgraph.imp:1: WARNING: py:class reference target not found: enum.Enum
/home/tkloczko/rpmbuild/BUILD/pydeps-1.10.21/pydeps/mf27.py:docstring of pydeps.mf27.ModuleFinder:1: WARNING: py:class reference target not found: modulefinder.ModuleFinder
/home/tkloczko/rpmbuild/BUILD/pydeps-1.10.21/pydeps/py2depgraph.py:docstring of pydeps.py2depgraph.imp:1: WARNING: py:class reference target not found: enum.Enum
/home/tkloczko/rpmbuild/BUILD/pydeps-1.10.21/pydeps/render_context.py:docstring of pydeps.render_context.Rankdir:1: WARNING: py:class reference target not found: enum.Enum
done
build succeeded, 5 warnings.

Sorry about that. Forgot to add the -W flag to sphinx-build to turn warnings into errors... v1.10.22 is out 🤞

No problem .. this is non-critical issue 😋
👍