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

1.4.1: build documentation issues #88

Closed
kloczek opened this issue Aug 22, 2022 · 4 comments
Closed

1.4.1: build documentation issues #88

kloczek opened this issue Aug 22, 2022 · 4 comments

Comments

@kloczek
Copy link

kloczek commented Aug 22, 2022

  • Looks like conf..py still uses outdated sphinxcontrib.napoleon module.
    Here is the patch whcih fixes that
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -38,7 +38,7 @@
 # ones.

 extensions = [
-    "sphinxcontrib.napoleon",
+    "sphinx.ext.napoleon",
     "sphinx.ext.autodoc",
     "sphinx_autodoc_typehints",
 ]
  • On tryinf to buidl documentation lookjs like sphinx is not able to find pytest_subprocess module
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.1.1
WARNING:root:Generated changelog file to history.rst
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] usage
WARNING: autodoc: failed to import class 'core.FakeProcess' from module 'pytest_subprocess'; the following exception was raised:
No module named 'pytest_subprocess'
WARNING: autodoc: failed to import class 'utils.Any' from module 'pytest_subprocess'; the following exception was raised:
No module named 'pytest_subprocess'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pytest-subprocess.3 { usage api history } done
build succeeded, 2 warnings.

Here is the patch which fixes that

--- a/docs/conf.py
+++ b/docs/conf.py
@@ -8,9 +8,10 @@
 # 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 datetime
 from pathlib import Path

This patch sdoes wjat is descrived in lines above modifird lines.

  • With both patches sphos still shows 3 warnings
+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v5.1.1
WARNING:root:Generated changelog file to history.rst
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [man]: all manpages
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] usage
WARNING: autodoc: failed to import class 'core.FakeProcess' from module 'pytest_subprocess'; the following exception was raised:
No module named 'pytest_subprocess.core'
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pytest-subprocess.3 { usage api history } /home/tkloczko/rpmbuild/BUILD/pytest-subprocess-1.4.1/pytest_subprocess/utils.py:docstring of pytest_subprocess.utils.Any:4: WARNING: py:data reference target not found: typing.Optional
/home/tkloczko/rpmbuild/BUILD/pytest-subprocess-1.4.1/pytest_subprocess/utils.py:docstring of pytest_subprocess.utils.Any:6: WARNING: py:data reference target not found: typing.Optional
done
build succeeded, 3 warnings.

In case sphinx warnings reference target not found 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
sissaschool/elementpath@bf869d9e
jaraco/cssutils#21
pywbem/pywbem#2895
sissaschool/xmlschema@42ea98f2
RDFLib/rdflib#2036
frostming/unearth#14

Please let me know if you want above patches as PRs.

@aklajnert
Copy link
Owner

Oh, thank you for letting me know. I didn't notice that docs build is failing - I should add a CI check for that. Please create the PR with the patch, and I'll add the CI check soon.

@aklajnert
Copy link
Owner

I've fixed the documentation build and added CI check for it in #90. This should fix your issue.

@kloczek
Copy link
Author

kloczek commented Sep 1, 2022

👍
Sorry I was busy.

@kloczek
Copy link
Author

kloczek commented Mar 23, 2024

Just tested 1.5.0 ad I still see warnings.

+ /usr/bin/sphinx-build -n -T -b man docs build/sphinx/man
Running Sphinx v7.2.6
WARNING:root:Generated changelog file to history.rst
making output directory... done
building [mo]: targets for 0 po files that are out of date
writing output...
building [man]: all manpages
updating environment: [new config] 4 added, 0 changed, 0 removed
reading sources... [100%] usage
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
writing... python-pytest-subprocess.3 { usage api history } <unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:class reference target not found: os.PathLike
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Program
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Command
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:class reference target not found: os.PathLike
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Program
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Command
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Program
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:class reference target not found: os.PathLike
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Program
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Command
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Any
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.process_recorder.ProcessRecorder
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:class reference target not found: os.PathLike
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Program
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.utils.Command
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Union
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Any
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Callable
<unknown>:1: WARNING: py:class reference target not found: pytest_subprocess.process_recorder.ProcessRecorder
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
<unknown>:1: WARNING: py:data reference target not found: typing.Optional
done
build succeeded, 51 warnings.

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

2 participants