python: If class is aliased out of a module, explicitly listed members not rendered into documentation
Describe the bug
Explicitly listing members, but their documentation is not being shown (and code which I’m executing using markdown-exec is not being shown).
Expected behavior Expect the members to show up in the documentation.
Screenshots
System (please complete the following information):
"mkdocstrings-python @ git+https://github.com/pawamoy-insiders/mkdocstrings-python.git@1.5.0.1.2.0"
- Python: 3.11.3
- OS: Reproduced this for my documentation on Ubuntu, as well as MacOS.
Additional context
Here’s my mkdocstrings settings from my mkdocs.yml:
- mkdocstrings:
enabled: !ENV [ENABLE_MKDOCSTRINGS, true]
custom_templates: templates
default_handler: python
handlers:
python:
options:
show_source: true
show_root_heading: true
show_root_full_path: false
show_symbol_type_heading: true
show_symbol_type_toc: true
Here’s a log when I serve the documentation:
nox > python -m pip install --constraint=.nox/docs-serve/tmp/requirements.txt mkdocs
nox > python -m pip install --constraint=.nox/docs-serve/tmp/requirements.txt 'mkdocs-material @ git+https://github.com/probcomp/mkdocs-material-insiders'
nox > python -m pip install --constraint=.nox/docs-serve/tmp/requirements.txt 'mkdocstrings-python @ git+https://github.com/pawamoy-insiders/mkdocstrings-python.git@1.5.0.1.2.0'
nox > mkdocs serve
INFO - DeprecationWarning: warning_filter doesn't do anything since MkDocs 1.2 and will be
removed soon. All messages on the `mkdocs` logger get counted automatically.
File
"/home/femtomc/Research/genjax/.nox/docs-serve/lib/python3.11/site-packages/mkdocstrings/loggers.py",
line 9, in <module>
from mkdocs.utils import warning_filter
File
"/home/femtomc/Research/genjax/.nox/docs-serve/lib/python3.11/site-packages/mkdocs/utils/__init__.py",
line 453, in __getattr__
warnings.warn(
INFO - Building documentation...
INFO - Cleaning site directory
INFO - The following pages exist in the docs directory, but are not included in the "nav"
configuration:
- index.md
- homepage.md
- genjax/diff_jl.md
- genjax/language_aperitifs.md
- genjax/concepts/generative_functions.md
- genjax/library/diff_prog/index.md
- genjax/library/diff_prog/adev.md
- genjax/library/diff_prog/state.md
- genjax/library/generative_functions/distributions/coryx.md
- genjax/library/generative_functions/distributions/gensp.md
- genjax/library/inference/index.md
- genjax/library/inference/is.md
INFO - Doc file 'index.md' contains an absolute link '/genjax/notebooks/index.html', it was
left as is.
INFO - Doc file 'genjax/notebooks.md' contains an absolute link
'/genjax/notebooks/index.html', it was left as is.
INFO - DeprecationWarning: invalid escape sequence '\s'
File
"/home/femtomc/Research/genjax/.nox/docs-serve/lib/python3.11/site-packages/griffe/agents/visitor.py",
line 177, in get_module
top_node = compile(self.code, mode="exec", filename=str(self.filepath),
flags=ast.PyCF_ONLY_AST, optimize=1)
File "/home/femtomc/Research/genjax/src/genjax/_src/core/datatypes/generative.py",
line 1110, in
"""> Given a `key: PRNGKey` and arguments `x: Tuple`, the generative
INFO - DeprecationWarning: invalid escape sequence '\l'
File
"/home/femtomc/Research/genjax/.nox/docs-serve/lib/python3.11/site-packages/griffe/agents/visitor.py",
line 177, in get_module
top_node = compile(self.code, mode="exec", filename=str(self.filepath),
flags=ast.PyCF_ONLY_AST, optimize=1)
File "/home/femtomc/Research/genjax/src/genjax/_src/core/datatypes/generative.py",
line 1227, in
"""> Given a `key: PRNGKey`, a choice map indicating constraints ($u$),
INFO - DeprecationWarning: invalid escape sequence '\l'
File
"/home/femtomc/Research/genjax/.nox/docs-serve/lib/python3.11/site-packages/griffe/agents/visitor.py",
line 177, in get_module
top_node = compile(self.code, mode="exec", filename=str(self.filepath),
flags=ast.PyCF_ONLY_AST, optimize=1)
File "/home/femtomc/Research/genjax/src/genjax/_src/core/datatypes/generative.py",
line 1266, in
"""> Given a `key: PRNGKey`, a complete choice map indicating
WARNING:jax._src.xla_bridge:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
INFO - Documentation built in 3.77 seconds
About this issue
- Original URL
- State: closed
- Created 10 months ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- fix: Regression in children template: fix condition for when members are specified Issue #100: https://github.com/mkdocstrings/python/issues/100 — committed to mkdocstrings/python by pawamoy 10 months ago
That’s fine! If you want to interact with me about the repo, let’s do so via an issue which you start at the repo itself 😃 thanks!
Hi @femtomc, thanks for the report! I’ll investigate with what you gave me and come back to you if I need more info 🙂