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 should output generated rst #2953
Comments
+1 FYI: You can use |
As per this Stack Overflow answer, it would be nearly impossible to write these files with a custom
Nevertheless, in this particular case, it would be possible to hook this line and save the generated reStructuredText as a file before it gets parsed: sphinx/sphinx/ext/autodoc/directive.py Line 156 in d635d94
Users could be able to provide an output path from
Then, we could retreve the provided output path and the file contents from output = self.config.autodoc_default_options.get('output_path')
contents = '\n'.join(params.result) The missing piece, would be finding appropriate names for each output file. |
Another less hacky alternative could be separating |
When using autodoc or autosummary, the generated rst is never saved as far as I can tell.
So if you go to a page that was generated with autosummary, like this:
http://scikit-learn.org/dev/modules/generated/sklearn.cluster.DBSCAN.html#sklearn.cluster.DBSCAN
and you click "show this page's source" you'll just get the autosummary template:
http://scikit-learn.org/dev/_sources/modules/generated/sklearn.cluster.DBSCAN.txt
That's not very helpful for debugging. I think storing the generated RST would be more helpful, possibly optionally?
The text was updated successfully, but these errors were encountered: