Extension tests

This page tests the extensions that are part of this theme.

Versioning

This extension is always used if releases are passed to the Sphinx build.

Deeply nested test page versioned links work properly.

Default resolution

This extension can be enabled by adding "nengo_sphinx_theme.ext.resolvedefaults" to the extensions list in conf.py.

Autodoc with default resolution:

class nengo_sphinx_theme.ext.resolvedefaults.TestClass(self, int_param=Default<1>, str_param=Default<'hello'>)[source]

For testing that defaults are properly rendered in docs.

AutoAutoSummary

This extension automatically generates AutoSummaries for modules/classes.

This extension can be enabled by adding "nengo_sphinx_theme.ext.autoautosummary" to the extensions list in conf.py.

nengo_sphinx_theme.ext.autoautosummary.a_test_function()

This is a test function.

nengo_sphinx_theme.ext.autoautosummary.TestClass(self)

This is a test class.

nengo_sphinx_theme.ext.autoautosummary.AutoAutoSummary(…)

Automatically generates a summary for a class or module.

nengo_sphinx_theme.ext.autoautosummary.patch_autosummary_import_by_name()

Monkeypatch a function in autosummary to disallow module cycles

nengo_sphinx_theme.ext.autoautosummary.a_test_function()[source]

This is a test function.

class nengo_sphinx_theme.ext.autoautosummary.TestClass(self)[source]

This is a test class.

This is the init method.

a_method(self)[source]

This is a method.

static a_static_method()[source]

This is a static method.

class nengo_sphinx_theme.ext.autoautosummary.AutoAutoSummary(self, name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]

Automatically generates a summary for a class or module.

For classes this adds a summary for all methods.

For modules this adds a summary for all classes/functions.

nengo_sphinx_theme.ext.autoautosummary.patch_autosummary_import_by_name()[source]

Monkeypatch a function in autosummary to disallow module cycles

class nengo_sphinx_theme.ext.autoautosummary.TestClass(self)[source]

This is a test class.

This is the init method.

nengo_sphinx_theme.ext.autoautosummary.TestClass

This is a test class.

nengo_sphinx_theme.ext.autoautosummary.TestClass.a_method

This is a method.

nengo_sphinx_theme.ext.autoautosummary.TestClass.a_static_method

This is a static method.

nengo_sphinx_theme.ext.autoautosummary.TestClass._another_private_method

This method will be manually added.

a_method(self)[source]

This is a method.

static a_static_method()[source]

This is a static method.

_a_private_method(self)[source]

A private method.

_another_private_method(self)[source]

This method will be manually added.

Redirects

This extension generates pages to redirect a URL from an old location to a new one. These pages will only be generated when building with the HTML builder.

This extension can be enabled by adding "nengo_sphinx_theme.ext.redirects" to the extensions list in conf.py.

This extension adds a new configuration option to conf.py called html_redirects. html_redirects is a list of tuples, where each tuple has two elements: the original location and the new location. Locations are usually strings pointing to HTML files, but the new location can also be an anchor link or some other valid URL.

As an example, suppose we rename a file from user_guide.rst to user-guide.rst, and move the content on dev_guide.rst to a section in user-guide.rst. The redirects might look like this:

html_redirects = [
    ("user_guide.html", "user-guide.html"),
    ("dev_guide.html", "user-guide.html#developers")
]

The following page should redirect to the deeply nested testing page.