Sphinx with PyCharm


I am trying to find documentation on how the Sphinx integration works. In the professional version I see no task under tools or anything mentioned in the documentation.

Even if it were there, it runs the sphinx-quickstart that many have already run.

My question is does the Sphinx integration into PyCharm help the user create docstrings formatted for sphinx and resulting RST files?  Like right click a lib and say 'create sphinx RST', anything useful?  I don't see any documentation for anything other than running the quickstart that comes with Sphinx, please link me to anything I have missed.


Comment actions Permalink

The PyCharm help page on Sphinx explains the two things you need: Tools -> Sphinx Quickstart to generate a project, and the run configs are under Python Docs -> Sphinx. Make sure you have Sphinx in your virtual environment.

PyCharm also has decent support for RST. I'd say line wrapping is the top thing I miss.

FWIW I've done a stupendous crapton of Sphinx in PyCharm in the last few months (developing Sphinx extensions.) I wind up skipping the Sphinx run config and just doing a Python run config that points at sphinx-quickstart and passes in the arguments. This lets me use the debugger and coverage when running my Sphinx.

Comment actions Permalink

Thanks for the quick reply,  that documentation page is what I was referring to, it basically just runs the quickstart that ships with Sphinx, also it refers to UI elements that do not exist in the Pro version.  I was able to set the Sphinx directory under the Settings UI, but I was wondering how/where there is any documentation about PyCharm helping me to craft docstrings quickly, and maybe auto-generating RST files.. Like, where is the documentation showing the benefits of this integration, is there something under refactor... to allow for adding docstrings in the way Sphinx expects or something?

Comment actions Permalink

Can you list the places in the docs that refer to UI elements that don't exist? I took a look and couldn't spot anything wrong. But if you can point something out, I'll file a ticket.

PyCharm can help with type information in docstrings. For any features that might be missing, feel free to take a look at the #ReStructuredText tag in our issue tracker and vote for tickets that match things important for you.


Please sign in to leave a comment.