python-sphinx

Sphinx can't run 'make html'

|▌冷眼眸甩不掉的悲伤 提交于 2020-02-05 04:20:11
问题 I'm trying to create the documentation for my software by sphinx tool, so i've run sphinx-quickstart , and it's gone all ok. Then i have to run make html (inside doc folder just created) and i get an error . I don't know how to fix this error: Running Sphinx v1.2.2 loading pickled environment... not yet created building [html]: targets for 1 source files that are out of date updating environment: 1 added, 0 changed, 0 removed reading sources... [100%] index ** (sphinx-build:2390): WARNING **:

Remove the word “module” from Sphinx documentation

核能气质少年 提交于 2020-02-03 08:53:29
问题 Using Sphinx for documenting my Python project. I want to remove the word "module" which follows the name of each python file (in the navbar, TOC, the page title, etc). e.g. Details: The project is composed of 2 files utils.py and main.py . In my index.rst file, I use: .. toctree:: :maxdepth: 2 utils main to import both files as "modules". From the docs/ folder, I then call: sphinx-apidoc -f -o ./source/ .. make html to generate the static site. In the site, the word "module" follows every

How to create a custom HTML div in Sphinx that isn't automatically nested within a subsubsection?

此生再无相见时 提交于 2020-02-02 10:14:11
问题 I'm using the wonderful Sphinx tool to create some documentation and I need to create a custom HTML div so that I can style it apart from Sphinx's other, automatically-created, divs. This is possible to do using the container directive, but the problem is that if I use this directive below a subsubsection, it automatically nests the div created with the container directive within the subsubsection, like so: <div id="automatically-created sphinx subsubsection"> ... <div id="my custom container

Python-Sphinx: “inherit” method documentation from superclass

早过忘川 提交于 2020-02-02 03:03:10
问题 Edit: As of now (Sphinx 1.4.9) there seems to be no way to tell Sphinx to do what I want (see issue on GitHub). The accepted answer from Brecht Machiels solves the problem in an other way, until Sphinx might be able to do so one day. Description: I am trying to document a Python project with sphinx-apidoc. The Sphinx config is almost default, I just included 'sphinx.ext.autodoc' . It works in general, but derived classes do not inherit method documentation of their superclasses as I would

Get “flat” member output for sphinx automodule

巧了我就是萌 提交于 2020-01-31 06:47:04
问题 I'm using the Sphinx autodoc extension to document a module, and I'd like to get a flat list of the module's members in the documentation output. I tried using the following: .. automodule:: modname :members: However, there are two problems with this: It includes the module's docstring, which I don't want here. The name of each entry is prefixed with "modname.", which is completely redundant (since this page is specifically for documenting this module) However, I haven't been able to find any

Is it possible to reuse hyperlink defined in another file in restructuredtext (or sphinx)

会有一股神秘感。 提交于 2020-01-30 08:26:26
问题 Suppose I have two files a.rst and b.rst in the same folder, and a.rst looks like this .. _foo: http://stackoverflow.com `foo`_ is a website It seems using foo in b.rst is not allowed. Is there a way to define hyperlinks and use them in multiple files? Followup I used the extlinks extension as Steve Piercy suggested. Its implementation and docstring can be seen here on github. In my case, I define wikipedia link in my conf.py extlinks = {'wiki': ('https://en.wikipedia.org/wiki/%s', '')} and

Python Sphinx exclude patterns

这一生的挚爱 提交于 2020-01-30 04:19:06
问题 I'm generating documentation with Sphinx for project with structure like this : + project | +- docs | +- tests | +- workflow -+- definitions -+- <some folders> | +- <rest of the project> I want to exclude tests, and workflow/definition from documentation. I tried exclude pattern in docs/conf.py exclude_patterns = ['**/workflow/definitions', 'workflow/definitions', '*workflow/definitions', 'workflow/definitions*', 'workflow/definitions/*', 'workflow/definitions/*.*'] But even though workflow

Use Sphinx to generate standalone html files

老子叫甜甜 提交于 2020-01-25 07:33:27
问题 I'm quite new to Sphinx and I'm trying to create the docs for my application. It would be nice to generate a "standalone" html file for each topic. I mean: Sphinx creates a useful navigation panel on the left, with some modules (toc, next topic, search, etc..). But this is placed in every html! I would like to add a contextual help inside my application: whenever the user set the focus on a (relevant) widget, the related html is shown in a box. Of course I don't want to show the navigation

New to Sphinx in PyCharm

﹥>﹥吖頭↗ 提交于 2020-01-24 22:01:30
问题 I am using PyCharm as my IDE to create my python application. As I understand it has a build in documentation feature based on two different programs where one of them is Sphinx. I am trying to set up my folders but I find that either the documentation in how this is done is lacking or there is something basic I've missed. My project folder structure is the following app/ - for my main application plugins/plugin_names/version_id/ - Folder for plugins to main application can use sphinx/doc/ -

New to Sphinx in PyCharm

萝らか妹 提交于 2020-01-24 22:01:08
问题 I am using PyCharm as my IDE to create my python application. As I understand it has a build in documentation feature based on two different programs where one of them is Sphinx. I am trying to set up my folders but I find that either the documentation in how this is done is lacking or there is something basic I've missed. My project folder structure is the following app/ - for my main application plugins/plugin_names/version_id/ - Folder for plugins to main application can use sphinx/doc/ -