-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
autodoc tries to import classes as modules? #3768
Comments
Could you share your project to reproduce the error? Thanks, |
The project is scikit-learn. I'll try to extract a minimal example, but
I'll be traveling.
Sent from phone. Please excuse spelling and brevity.
…On May 19, 2017 11:01 AM, "Takeshi KOMIYA" ***@***.***> wrote:
Could you share your project to reproduce the error?
It would be nice if you provide small reproducible examples :-)
Thanks,
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3768 (comment)>,
or mute the thread
<https:/notifications/unsubscribe-auth/AAbcFp4AHDTYMsTf-7NGmbiut4mJXfGcks5r7a7hgaJpZM4NfxIc>
.
|
Hmm.. scikit-learn's doc is too large and complex to investigate... |
Thanks for looking into it. I'll have a look next week when I'm back from vacation ;) |
The issue is still present on master. |
I stripped down the sklearn build: you need to add the doc folder to the pythonpath so the blablub.py is found as a module. I get
|
Yes, autodoc imports the target module internally on generating document. It seems your example surely raises ImportError, but the error reason is different with first case. Is this intended?
The message on first case is here:
|
@tk0miya as I said, you need to add the doc path to the python path for the module to be found. Not sure how to autodoc a module that's not installed. |
anything I can do to make reproducing this easier? solving this will make our release process much easier, currently it prevents us from using stock packages for building our docs. |
Please add your library's path to
|
done, not that that's any different from |
maybe it was fixed by numpy/numpydoc#93 ? |
@jschueller indeed it seems to be fixed on numpydoc master. Thanks! |
After updating sphinx and numpydoc, I get
for every class in the package.
It looks like the modname is wrong as it is the class and not the module. I'm not sure what should be imported at this point, though. The class? Importing a method doesn't seem to make a lot of sense...
The text was updated successfully, but these errors were encountered: