Skip to content

Commit

Permalink
Merge pull request #7198 from readthedocs/davidfischer/feature-flag-l…
Browse files Browse the repository at this point in the history
…atest-rtd-sphinx-ext

Add a feature flag to use latest RTD Sphinx ext
  • Loading branch information
davidfischer authored Jun 19, 2020
2 parents e5e5be3 + 35b3ecf commit f3cdffb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion readthedocs/doc_builder/python_environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ def install_core_requirements(self):
negative='sphinx<2',
),
'sphinx-rtd-theme<0.5',
'readthedocs-sphinx-ext<1.1',
self.project.get_feature_value(
Feature.USE_SPHINX_RTD_EXT_LATEST,
positive='readthedocs-sphinx-ext',
negative='readthedocs-sphinx-ext<1.1',
),
])

cmd = copy.copy(pip_install_cmd)
Expand Down
7 changes: 6 additions & 1 deletion readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,7 @@ def add_features(sender, **kwargs):
SPHINX_PARALLEL = 'sphinx_parallel'
USE_SPHINX_BUILDERS = 'use_sphinx_builders'
DEDUPLICATE_BUILDS = 'deduplicate_builds'
USE_SPHINX_RTD_EXT_LATEST = 'rtd_sphinx_ext_latest'
DEFAULT_TO_FUZZY_SEARCH = 'default_to_fuzzy_search'

FEATURES = (
Expand Down Expand Up @@ -1646,10 +1647,14 @@ def add_features(sender, **kwargs):
DEDUPLICATE_BUILDS,
_('Mark duplicated builds as NOOP to be skipped by builders'),
),
(
USE_SPHINX_RTD_EXT_LATEST,
_('Use latest version of the Read the Docs Sphinx extension'),
),
(
DEFAULT_TO_FUZZY_SEARCH,
_('Default to fuzzy search for simple search queries'),
)
),
)

projects = models.ManyToManyField(
Expand Down

0 comments on commit f3cdffb

Please sign in to comment.