How to use the recommonmark.states.DummyStateMachine.run_role function in recommonmark

To help you get started, we’ve selected a few recommonmark examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github deluge-torrent / deluge / docs / source / conf.py View on Github external
hasattr(obj, '_rpcserver_export') or hasattr(obj, '_json_export')
    ):
        return True


# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role


def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)


DummyStateMachine.run_role = run_role


# Run the sphinx-apidoc to create package/modules rst files for autodoc.
def run_apidoc(__):
    cur_dir = os.path.abspath(os.path.dirname(__file__))
    module_dir = os.path.join(cur_dir, '..', '..', 'deluge')
    ignore_paths = [
        os.path.join(module_dir, 'plugins'),
        os.path.join(module_dir, 'tests'),
    ]
    argv = [
        '--force',
        '--no-toc',
        '--output-dir',
        os.path.join(cur_dir, 'modules'),
        module_dir,
github hyperledger / indy-node / sphinx-conf.py View on Github external
#


source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}
# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
github hyperledger / indy-agent / docs / source / conf.py View on Github external
source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)


# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
# Monkey patch to fix recommonmark 0.4 doc reference issues.
from recommonmark.states import DummyStateMachine
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
    try:
github hyperledger / indy-node / sphinx-conf.py View on Github external
# Example configuration for intersphinx: refer to the Python standard library.

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#


source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}
# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
github hyperledger / indy-plenum / docs / source / conf.py View on Github external
app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)


# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
# Monkey patch to fix recommonmark 0.4 doc reference issues.
from recommonmark.states import DummyStateMachine
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
    try:
        os.system("git clone https://github.com/hyperledger/sovrin-docs-conf.git remote_conf")
        os.system("mv remote_conf/remote_conf.py .")
        import remote_conf
        remote_conf.generate_sidebar(globals(), nickname)
        intersphinx_mapping = remote_conf.get_intersphinx_mapping(rtd_version)
github hyperledger / indy-agent / docs / source / conf.py View on Github external
app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)


# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
# Monkey patch to fix recommonmark 0.4 doc reference issues.
from recommonmark.states import DummyStateMachine
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
    try:
        os.system("git clone https://github.com/michaeldboyd/indy-docs-conf.git remote_conf")
        os.system("mv remote_conf/remote_conf.py .")
        import remote_conf
        remote_conf.generate_sidebar(globals(), nickname)
        intersphinx_mapping = remote_conf.get_intersphinx_mapping(rtd_version)
github hyperledger / indy-node / docs / source / conf.py View on Github external
#


source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}
# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
github hyperledger / indy-node / docs / source / conf.py View on Github external
# Example configuration for intersphinx: refer to the Python standard library.

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#


source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}
# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
from recommonmark.states import DummyStateMachine
# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
github hyperledger / indy-plenum / docs / source / conf.py View on Github external
source_parsers = {
    '.md' : 'recommonmark.parser.CommonMarkParser',
}

def setup(app):
    app.add_config_value('recommonmark_config', {
            'auto_toc_tree_section': 'Contents',
            }, True)
    app.add_transform(AutoStructify)


# -------------- Additional fix for Markdown parsing support ---------------
# Once Recommonmark is fixed, remove this hack.
# Monkey patch to fix recommonmark 0.4 doc reference issues.
from recommonmark.states import DummyStateMachine
orig_run_role = DummyStateMachine.run_role
def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)
DummyStateMachine.run_role = run_role

# ------------ Remote Documentation Builder Config -----------
# Note: this is a hacky way of maintaining a consistent sidebar amongst all the repositories. 
# Do you have a better way to do it?
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if(on_rtd):
    rtd_version = os.environ.get('READTHEDOCS_VERSION', 'latest')
    if rtd_version not in ['stable', 'latest']:
        rtd_version = 'latest'
    try:
github deluge-torrent / deluge / docs / source / conf.py View on Github external
'zope.interface',
]

# Register an autodoc class directive to only include exported methods.
ClassDocumenter.option_spec['exported'] = bool_option


def maybe_skip_member(app, what, name, obj, skip, options):
    if options.exported and not (
        hasattr(obj, '_rpcserver_export') or hasattr(obj, '_json_export')
    ):
        return True


# Monkey patch to fix recommonmark 0.4 doc reference issues.
orig_run_role = DummyStateMachine.run_role


def run_role(self, name, options=None, content=None):
    if name == 'doc':
        name = 'any'
    return orig_run_role(self, name, options, content)


DummyStateMachine.run_role = run_role


# Run the sphinx-apidoc to create package/modules rst files for autodoc.
def run_apidoc(__):
    cur_dir = os.path.abspath(os.path.dirname(__file__))
    module_dir = os.path.join(cur_dir, '..', '..', 'deluge')
    ignore_paths = [