python-sphinx

Sphinx not removing doctest flags in html output

风流意气都作罢 提交于 2020-05-31 03:04:31
问题 I cannot eliminate the doctest flags (ie. <BLANKLINE> , # doctest: +ELLIPSIS ) for the html output. I am able to generate the documentation as I would like, so no errors there but it includes theses flags which I would like removed. Sphinx documentation here claims this is possible so I must be doing something wrong. My documentation examples are in numpy style and I have tried using both the napoleon and numpydoc extensions. Here are the steps I have taken. run sphinx-quickstart (enabling

How to make translations of full articles from po files in Sphinx or gettext

一世执手 提交于 2020-05-30 10:47:21
问题 I'm writing a project documentation in Sphinx. I want to make translations of my .rst files, and I generated and translated .po files. Sphinx generates html translations fine, but I want to have .rst or markdown full articles (to use them on another site). How can I recreate .rst or markdown files with translations from these .po (or .mo ) files? Sphinx, gettext or Python solutions will suit. I tried to find information about that, but most answers concern translation of a string, not of a

Sphinx not documenting complex Enum classes

▼魔方 西西 提交于 2020-05-29 07:28:38
问题 In my code I have some classes that are complex Enum types. For example: class ComplexEnum(SomeOtherClass, Enum): """ Some documentation """ MEMBER1 = SomeOtherClass(1) MEMBER2 = SomeOtherClass(2) def __init__(self, arg): """ more doc """ pass def somemethod(self): """ more doc """ pass @classmethod def someclassmethod(cls, otherparam): """ more doc """ pass When I now create my documentation with Sphinx using autodoc this class is just skipped. I tried adding a custom documenter like this to

Sphinx not documenting complex Enum classes

久未见 提交于 2020-05-29 07:28:25
问题 In my code I have some classes that are complex Enum types. For example: class ComplexEnum(SomeOtherClass, Enum): """ Some documentation """ MEMBER1 = SomeOtherClass(1) MEMBER2 = SomeOtherClass(2) def __init__(self, arg): """ more doc """ pass def somemethod(self): """ more doc """ pass @classmethod def someclassmethod(cls, otherparam): """ more doc """ pass When I now create my documentation with Sphinx using autodoc this class is just skipped. I tried adding a custom documenter like this to

Getting started with Sphinx when your source files aren't in the project base folder

北城余情 提交于 2020-05-27 13:07:03
问题 Alright, I've been struggling with Sphinx not producing any documentation from the docstrings I've written in this example code. Its a simple implementation of a stack in Python. You probably need not read all of this: src/stack.py class Stack: """Stack A simple implementation of a stack data structure in Python. """ def __init__(self): self._data = [] def push(self,item): """Push Push an item on to the stack. Args: arg: Item to be pushed to the top of the stack """ self._data.append(item)

Sphinx documentation: Include svg images in PDFs via latex

空扰寡人 提交于 2020-05-14 05:18:26
问题 I'm doing an internship for an IT company which needs a document application for its firmware docs (md files). The request was to maintain these md files and to convert them to rst format (I used pandoc). So now I have a configured Sphinx application with only rst files. The problem now is that some rst have links to SVG images, and I have to use the latex builder of Sphinx to convert them to PDFs. I've searched around and I found this solution from 2 years ago, which was essentially what I

Sphinx error in make html

风流意气都作罢 提交于 2020-04-30 09:31:28
问题 I am trying to build a Sphinx documentation for a package but I keep getting errors and could use some help. My project directory is bb_lite and the codes are located in the backend folder. bb_lite ├── 1.0\ docs ├── 2.0\ data ├── README.md └── backend This is how my backend folder looks like . ├── README.md ├── __init__.py ├── __pycache__ │ └── __init__.cpython-36.pyc ├── archive │ ├── cont_pca_transform_w_original_func.py │ └── model_tuner.py ├── automl_pipeline │ ├── __init__.py │ ├── flow

Sphinx error in make html

怎甘沉沦 提交于 2020-04-30 09:30:55
问题 I am trying to build a Sphinx documentation for a package but I keep getting errors and could use some help. My project directory is bb_lite and the codes are located in the backend folder. bb_lite ├── 1.0\ docs ├── 2.0\ data ├── README.md └── backend This is how my backend folder looks like . ├── README.md ├── __init__.py ├── __pycache__ │ └── __init__.cpython-36.pyc ├── archive │ ├── cont_pca_transform_w_original_func.py │ └── model_tuner.py ├── automl_pipeline │ ├── __init__.py │ ├── flow

Is it possible to generate list of members, linking to detailed descriptions below?

只谈情不闲聊 提交于 2020-04-18 06:10:35
问题 Converting a project doc from epydoc to sphinx , I am mostly thrilled, but miss one property of epydoc , as it generated a list of methods in the top of the document, followed by the detailed section with fully rendered doc-strings below. With autodoc , I naturally get the latter simply by .. automodule:: mymodule :members: I'm not yet on the level of tweaking themes, but wounder if there was a straight forward way to achieve this. To make it more clear, I aim for something like this (even

Sphinx: Place heading between automethod entries

谁都会走 提交于 2020-04-14 08:18:27
问题 I'm using Sphinx to document a class with a lot of methods. I'd like to group the methods into sections, separated by headers, like this: .. autoclass:: MyClass .. automethod:: __init__ FooBar Methods -------------- .. automethod:: foo .. automethod:: bar BazQux Methods -------------- .. automethod:: baz .. automethod:: qux But that doesn't seem to work. Is it possible to somehow break the method list up into named sections? 回答1: Sections with headings are top-level constructs and they can't