Skip to content

Add a feature flag to use latest RTD Sphinx ext #7198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this isn't inherently related, but I think we should drop the <2 on the positive here too, and likely consider a newer default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems easy enough. I'll make another PR for that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

),
'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