astropy / astropy/sphinx-automodapi

automodsumm don't work with templates?

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
67
Forks
48
Avg merge
11h 52m
Merged PRs (30d)
1

Description

I get the following error when I try to use` automodsumm ` with a template when building matplotlib.
`jinja2.exceptions.TemplateAssertionError: no filter named 'underline'`. The error happen in the call
```
template = template_env.get_template(template_name)
```
on line 511.

I looked into the code and saw that the line
```
template_env.filters['underline'] = _underline
```
where in the sphinx `generate_autosummary_docs` function but not in the `generate_automodsumm_docs` function.

I added that line and the` _underline` function and I don't get the error anymore. The result is more as expected but sphinx doesn't render the last level of `autosummary` files (if that makes any sense, the links on my class pages don't work).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing generate_automodsumm_docs with Sphinx's generate_autosummary_docs, focusing on template_env.get_template at line 511 and the reported underline filter registration. Reproduce the matplotlib template build, then verify both the template error and the missing links on the last autosummary level are resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.