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
'autosummary: failed to import' when using numpydoc instead of sphinx.ext.napoleon #426
Comments
There's a lot here so it's difficult to say anything concrete. Given the build warnings you've posted at the top and the fact that your problem is platform specific, my best guess is that there is some sort of environment management/install problem. The warnings make it look like the stimuli package isn't fully installed, at least not correctly, in the environment where you got the warnings. This of course doesn't explain why there's a difference between using napoleon/numpydoc, but perhaps you installed them in different envs? Or ran/re-ran the set of commands with one installed and not the other? In other words if I were trying to debug this I'd start by ensuring that the environment/package installation is 100% correct and behaving exactly the way I expect. The test procedure outlined at the end of your post looks fine to me... at least there's nothing that jumps out to me as potentially problematic, so I really don't know 🤷 Sorry this isn't that helpful "/ - there's only so much one can do when the failing example is so non-specific & doesn't reproduce on all platforms. |
Hello @rossbar! Thank you for looking into it. I've played with it more after the initial post, and I figured out a couple of additional points.
I've written those bullet points from memory, from the experimentations I did a couple of months ago on this sandbox repository. So maybe some version changes in |
I've been playing with doc build for a while now, using this sandbox repository with a simple project and code-base. I am running into an issue a bit similar to #80, I'm at a complete loss and I only managed to narrow it down to 'bad things happen when I used numpydoc on macOS and on Windows'.
When building the documentation on my Linux PC, or on the GitHub CI with this workflow, the build works without any issue. Here is the current version deployed.
When building the documentation locally on my Windows or macOS PC, I'm greeted with 52 similar warnings. You can find 2 of them below:
And obviously, the documentation is a bit broken. Based on the pasted warnings, take the
Noise
class defined innoise.py
: Left -> local (windows). Right -> CI (ubuntu). Both build on the same commit,Why is
numpydoc
involved?It turns out that if I remove
numpydoc
from the extensions and loadsphinx.ext.napoleon
instead, the doc builds without warnings (except the missingx-ref
since they are not defined anymore). However, the render is missing the summary tables, so at least it makes sense that warnings about those tables are missing:And the attributes and method tables that are failing are a feature of
numpydoc
, right?In both cases, the generated
.rst
is the same:I tried with different templates, and with the default templates, but nothing changed.
I'm at a complete loss as to why the doc build is failing on macOS or Windows, and not on Linux, I'm not even sure it's a bug, or an issue with my configuration. Here is a couple of lines to set-up the project if you want to give it a try:
The text was updated successfully, but these errors were encountered: