Skip to content

Commit

Permalink
doxygenStripFromPath => doxygen.stripFromPath
Browse files Browse the repository at this point in the history
  • Loading branch information
svenevs committed Jun 8, 2018
1 parent 7f48a8f commit dd9b039
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 167 deletions.
21 changes: 15 additions & 6 deletions docs/conf.py
Expand Up @@ -229,22 +229,31 @@
# Output file base name for HTML help builder.
htmlhelp_basename = 'ExhaleDoc'

rst_epilog = ""

# convenience replacements for writing e.g. |containmentFolder| and linking to the
# member of exhale.configs.Config.containmentFolder
import itertools
from exhale.configs import Config
config_replacements_list = [

configs_Config_repl_list = [
'containmentFolder'
# TODO: after migration, just use this
# pack[0] for pack in itertools.chain(Config.REQUIRED_KV, Config.OPTIONAL_KV)
]
configs_replacements = "\n".join(
configs_Config_replacements = '\n'.join(
'.. |{config}| replace:: :data:`~exhale.configs.Config.{config}`'.format(config=config)
for config in config_replacements_list
for config in configs_Config_repl_list
)
configs_DoxygenConfig_repl_list = [
'stripFromPath'
]
configs_DoxygenConfig_replacements = '\n'.join(
'.. |{config}| replace:: :data:`~exhale.configs.DoxygenConfig.{config}`'.format(config=config)
for config in configs_DoxygenConfig_repl_list
)
rst_epilog = "{0}\n{1}".format(rst_epilog, configs_replacements)
rst_epilog = '\n'.join([
configs_Config_replacements,
configs_DoxygenConfig_replacements
])


def setup(app):
Expand Down
12 changes: 5 additions & 7 deletions docs/reference/configs.rst
Expand Up @@ -10,6 +10,9 @@ Exhale Configs Module
.. autoclass:: exhale.configs.Config
:members:

.. autoclass:: exhale.configs.DoxygenConfig
:members:

.. _required_configs:

Required Configuration Arguments
Expand Down Expand Up @@ -77,8 +80,6 @@ Required Arguments for Exhale

.. autodata:: exhale.configs.rootFileTitle

.. autodata:: exhale.configs.doxygenStripFromPath

Optional Configuration Arguments
----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -310,8 +311,7 @@ something like this, where special treatment is given to File pages specifically

.. tip::

The value of :data:`~exhale.configs.doxygenStripFromPath` **directly**
affects what path is displayed here.
The value of |stripFromPath| **directly** affects what path is displayed here.

.. danger::

Expand Down Expand Up @@ -395,8 +395,6 @@ something like this, where special treatment is given to File pages specifically

.. autodata:: exhale.configs.pageLevelConfigMeta

.. autodata:: exhale.configs.repoRedirectURL

Using Contents Directives
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand Down Expand Up @@ -630,7 +628,7 @@ get confused by.
OUTPUT_DIRECTORY = {out}
# Tell doxygen to strip the path names (RTD builds produce long abs paths...)
STRIP_FROM_PATH = {strip}
'''.format(out=doxy_dir, strip=configs.doxygenStripFromPath))
'''.format(out=doxy_dir, strip=config.doxygen.stripFromPath))
# The configurations you specified
external_configs = textwrap.dedent(configs.exhaleDoxygenStdin)
Expand Down
5 changes: 5 additions & 0 deletions exhale/__init__.py
Expand Up @@ -73,6 +73,11 @@ def _upgrade_doxygen(app):
for from_key, to_key in mapping:
_upgrade_flat_to_nested_dict(app, from_key, 'doxygen', to_key)

def _upgrade_root_file(app):
mapping = (
''
)

def _auto_upgrade(app):
_upgrade_doxygen(app)

Expand Down

0 comments on commit dd9b039

Please sign in to comment.