Sphinx Feature


To use the Sphinx Feature, make sure your Projectfile contains the following:

from medikit import require

sphinx = require('sphinx')

The sphinx handle is a SphinxConfig instance, and can be used to customize the feature.

You can customize the theme:

sphinx.theme = 'sphinx_rtd_theme'

Note that this should be a parsable requirement, and it won’t be added to your docs/conf.py automatically.

This feature will add the necessary requirements to the python feature (sphinx mostly, and eventually your theme requirement) and setup the correct makefile task to build the html docs. Note that it won’t bootstrap your sphinx config file, and you still need to run the following if your documentation does not exist yet:

$ make update-requirements
$ make install-dev
$ mkdir docs
$ cd docs
$ sphinx-quickstart .

Then, eventually tune the configuration.


In the future, we may consider generating it for you if it does not exist, but it’s not a priority.


class medikit.feature.sphinx.SphinxConfig[source]

Gets the theme. Prefer using the .theme property.

Returns:parsed requirement

Sets the theme. Prefer using the .theme property.

Parameters:theme – Requirement for theme

Sphinx theme to use, that should be parsable as a requirement.


class medikit.feature.sphinx.SphinxFeature(dispatcher)[source]

alias of SphinxConfig


Listens to medikit.feature.make.on_generate event (priority: -20)


Listens to medikit.feature.python.on_generate event (priority: 0)