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

Do not add the module prefix when generating autosummary documents #12609

Merged
merged 8 commits into from
Jul 17, 2024

Conversation

AA-Turner
Copy link
Member

Feature or Bugfix

  • Bugfix

Purpose

The warning added in #6792 is triggered by autosummary itself. Resolve this issue by no longer prepending the module name.

Relates

cc those who have commented on relevant other issues: @tbekolay @JPEWdev @munircontractor @valeriupredoi @douglas-raillard-arm -- I would be grateful if you are able to test this PR, so that I can make a Sphinx 7.4.6 release soon.

A

@mun1r0b0t
Copy link

I installed with pip install git+https://github.com/AA-Turner/sphinx@autosummary-module-prefix and it didn't raise the warning.

@AA-Turner AA-Turner merged commit e61f569 into sphinx-doc:master Jul 17, 2024
21 checks passed
@AA-Turner AA-Turner deleted the autosummary-module-prefix branch July 17, 2024 20:42
@AA-Turner
Copy link
Member Author

I have released Sphinx 7.4.6 with a fix.

A

@AA-Turner AA-Turner added this to the 7.4.x milestone Jul 23, 2024
@mwalsh161
Copy link

Is there any chance this change would have introduced a warning by mistake? We use our own module.rst and class.rst templates, but they look awfully similar to the ones here.

We're seeing:

Warning, treated as error:
[autosummary] failed to import foo.
Possible hints:
* ModuleNotFoundError: No module named 'foo'
* KeyError: 'foo'
* ValueError: not enough values to unpack (expected 2, got 1)

good chance this is user-error, but thought I would ask (it does work just before 7.4.6)!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants