def with_config(fn):

    def configured(*args, **kwargs):
        """
        Inject configuration
        """

        if herculeum.sphinx.helpers.config is None:
           herculeum.sphinx.helpers.qt_app = QApplication([])
           herculeum.sphinx.helpers.world = Model()
           herculeum.sphinx.helpers.config = Configuration(
                                                herculeum.sphinx.helpers.world,
                                                herculeum.config.levels,
                                                QtControlsConfiguration(),
                                                QtSurfaceManager())
           herculeum.sphinx.helpers.config.initialise()

        kwargs['config'] = config

        return fn(*args, **kwargs)

    return configured
Decorator to inject configuration
dataset/ETHPy150Open tuturto/pyherc/src/herculeum/sphinx/helpers.py/with_config