2022.6.0: sphinx warnings
Closed this issue · 5 comments
kloczek commented
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/source build/sphinx/man
Running Sphinx v5.0.2
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
exec(code, namespace)
File "/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/conf.py", line 16, in <module>
import xyzservices # noqa
ModuleNotFoundError: No module named 'xyzservices'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/cmd/build.py", line 272, in build_main
app = Sphinx(args.sourcedir, args.confdir, args.outputdir,
File "/usr/lib/python3.8/site-packages/sphinx/application.py", line 202, in __init__
self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 165, in read
namespace = eval_config_file(filename, tags)
File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 356, in eval_config_file
raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
exec(code, namespace)
File "/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/conf.py", line 16, in <module>
import xyzservices # noqa
ModuleNotFoundError: No module named 'xyzservices'
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/sphinx/config.py", line 343, in eval_config_file
exec(code, namespace)
File "/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/conf.py", line 16, in <module>
import xyzservices # noqa
ModuleNotFoundError: No module named 'xyzservices'
This can be fixed by patch like below:
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -10,9 +10,9 @@
# 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.
#
-# import os
-# import sys
-# sys.path.insert(0, os.path.abspath('.'))
+import os
+import sys
+sys.path.insert(0, os.path.abspath("../.."))
import xyzservices # noqa
# -- 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
Here is the output with warnings:
+ /usr/bin/sphinx-build -n -T -b man doc/source build/sphinx/man
Running Sphinx v5.0.2
making output directory... done
[autosummary] generating autosummary for: api.rst, changelog.rst, contributing.md, index.md, introduction.ipynb, registration.md
myst v0.17.2: MdParserConfig(commonmark_only=False, gfm_only=False, enable_extensions=[], linkify_fuzzy_links=True, dmath_allow_labels=True, dmath_allow_space=True, dmath_allow_digits=True, dmath_double_inline=False, update_mathjax=True, mathjax_classes='tex2jax_process|mathjax_process|math|output_area', disable_syntax=[], all_links_external=False, url_schemes=('http', 'https', 'mailto', 'ftp'), ref_domains=None, highlight_code_blocks=True, number_code_blocks=[], title_to_header=False, heading_anchors=None, heading_slug_func=None, footnote_transition=True, sub_delimiters=('{', '}'), words_per_minute=200)
WARNING: 'jupyter_execute_notebooks' is deprecated for 'nb_execution_mode' [mystnb.config]
myst-nb v0.15.0: NbParserConfig(custom_formats={}, metadata_key='mystnb', cell_metadata_key='mystnb', kernel_rgx_aliases={}, execution_mode='force', execution_cache_path='', execution_excludepatterns=(), execution_timeout=30, execution_in_temp=False, execution_allow_errors=False, execution_raise_on_error=False, execution_show_tb=False, merge_streams=False, render_plugin='default', remove_code_source=False, remove_code_outputs=False, number_source_lines=False, output_stderr='show', render_text_lexer='myst-ansi', render_error_lexer='ipythontb', render_image_options={}, render_figure_options={}, render_markdown_format='commonmark', output_folder='build', append_css=True, metadata_to_fm=False)
Using jupyter-cache at: /home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/build/sphinx/.jupyter_cache
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 6 added, 0 changed, 0 removed
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/introduction.ipynb: Executing notebook using local CWD [mystnb]
reading sources... [100%] registration
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.TileProvider:73: WARNING: autosummary: stub file not found 'xyzservices.TileProvider.build_url'. Check your autosummary_generate setting.
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.TileProvider:73: WARNING: autosummary: stub file not found 'xyzservices.TileProvider.from_qms'. Check your autosummary_generate setting.
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.TileProvider:73: WARNING: autosummary: stub file not found 'xyzservices.TileProvider.requires_token'. Check your autosummary_generate setting.
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.Bunch:38: WARNING: autosummary: stub file not found 'xyzservices.Bunch.filter'. Check your autosummary_generate setting.
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.Bunch:38: WARNING: autosummary: stub file not found 'xyzservices.Bunch.flatten'. Check your autosummary_generate setting.
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/xyzservices/lib.py:docstring of xyzservices.lib.Bunch:38: WARNING: autosummary: stub file not found 'xyzservices.Bunch.query_name'. Check your autosummary_generate setting.
CHANGELOG.md:28: WARNING: Title underline too short.
xyzservices 2022.02.0 (February 10, 2022)
----------------------------------------
CHANGELOG.md:28: WARNING: Title underline too short.
xyzservices 2022.02.0 (February 10, 2022)
----------------------------------------
CHANGELOG.md:51: WARNING: Title underline too short.
xyzservices 2021.11.0 (November 06, 2021)
----------------------------------------
CHANGELOG.md:51: WARNING: Title underline too short.
xyzservices 2021.11.0 (November 06, 2021)
----------------------------------------
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/introduction.ipynb: WARNING: Executing notebook failed: CellExecutionError [mystnb.exec]
/home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/doc/source/introduction.ipynb: WARNING: Notebook exception traceback saved in: /home/tkloczko/rpmbuild/BUILD/xyzservices-2022.6.0/build/sphinx/man/reports/introduction.err.log [mystnb.exec]
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-xyzservices.3 { introduction registration api contributing changelog } done
build succeeded, 13 warnings.
martinfleis commented
Hi, nice catch. Can you open a PR with the fix?
kloczek commented
One sec ..
kloczek commented
Done 👍
kloczek commented
There are some sphinx warnings which would be good to sort out as well 😋
martinfleis commented
Feel free to tackle them!