Category "python-sphinx"

In Sphinx, when using sphinx.ext.autosummary, how do I exclude base class members?

I am using Sphinx to document a code base docString; in python. I have code like this - class foo(np.ndarray): def foo_func(): pass class bar(foo):

Sphinx - Specific file documentation with autosummary

I'm trying to use Sphinx's autosummary extension to generate the documentation automatically for the methods of a single file. I have the following folder struc

Is there a way to set the image scaling method in reST/Sphinx?

when I use the :scale: property on my pixel art, its very blurry. How can i change the scaling method to nearest neighbor for sharper scaling in Sphinx/reST?

Headings and Chapters are messed up in ReadTheDocs Sphinx PDF file

For some reason, the subtitles become the chapters in the PDF generated for my docs by ReadTheDocs. Check it out here: https://yarsaw.namantech.me/_/downloads/e

Sphinx suppress specific warnings?

In building my documentation I'm running into a lot of warning messages such as the following: /home/X/Y/src/core/include/math/bigintntl/transformntl.h:92: warn

WARNING: autodoc: failed to import module 'upload_data_to_server' from module 'manual';

I'm trying to document a Django project using Sphinx's autodoc extension. I have two main problems: It's documenting excessivelly in some modules (importing doc

Why does sphinx autosummary not create a toctree when used inside a class?

I am trying to use ..autosummary to document a module that replaces itself with a class upon import (lazy importing). Without lazy imports the module looks like

Set a default option for a given directive in Sphinx

In Sphinx, is there a way to set a default value for a directive option in conf.py, so that it is always used whenever I use that directive? In particular, I am

Force sphinx autosummary to display the first line after the heading in module docstrings in modules' summary table

For classes/functions, sphinx's autosummary extension can generate a nice table summarizing the list of available classes/functions in a particular module, such

sphinx autosummary: "failed to import Child.model" (inherited instance attribute)

I'm having trouble with sphinx and autosummary. Apparently, sphinx is unable to document inherited instance attributes. For some reason, the resulting error is

Sphinx unable to import some modules

I am using to generate documentation for codebase. While building the docs, I could see that they were built for some modules only and many were left undocument

Get autosummary to produce a flat representation

If I have a file foo.baz.py: from foo.bar.baz import Quux, Quuux __all__ = ['Quux', 'Quuux'] I'd like to document the api as follows: Baz === .. currentmodul

autodoc: workaround when "cannot import module"

The package I want to document with Sphinx contains pure Python modules (ok) + a C/C++ library bind using pybind11. There are a lot of dependencies that can not

Sphinx: how to show attributes as in scipy

Let's say we have the following module testmodule.py with a TestClass definition: """This is a test module""" class TestClass: """ This is a simple des

How to set opengraph metadata tags for a sphinx document?

I'm looking to add meta tags to my sphinx document for the opengraph properties. I see that sphinx has this meta directive .. meta:: :description: The Sphinx

Getting "Extension error (sphinx.environment.collectors.toctree)" when adding section nodes in Sphinx extension

I am trying to write a new Sphinx extension. A minimum example of an extension that does something similar to what I want is from docutils import nodes from doc

How to include external file as Sphinx documentation similar to a code block?

How to include external file as Sphinx documentation similar to a code block? And how can I make it style the syntax color?

How to use custom CSS on a default Sphinx theme?

I'm creating documentation in Python with the Sphinx default theme agogo. I would like to use the topic directive to put a box around important information but

Sphinx Extensions (numpydoc)

NOTE Added After: I finally got numpydoc working. It was also a python 2 problem. I ran 2to3 on it and now it seems to be working. OK, I've spent an entire d

Can the XeLaTeX builder be used with Sphinx?

Although the end-problem that this would solve is a TeX one (installing a new font for PDF output), this particular solution that I'm looking for is a Sphinx is