Skip to content

Remove skip submodules flag #5406

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
Aug 7, 2019
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
2 changes: 0 additions & 2 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,6 @@ def add_features(sender, **kwargs):
USE_SPHINX_LATEST = 'use_sphinx_latest'
ALLOW_DEPRECATED_WEBHOOKS = 'allow_deprecated_webhooks'
PIP_ALWAYS_UPGRADE = 'pip_always_upgrade'
SKIP_SUBMODULES = 'skip_submodules'
DONT_OVERWRITE_SPHINX_CONTEXT = 'dont_overwrite_sphinx_context'
MKDOCS_THEME_RTD = 'mkdocs_theme_rtd'
API_LARGE_DATA = 'api_large_data'
Expand All @@ -1413,7 +1412,6 @@ def add_features(sender, **kwargs):
(USE_SPHINX_LATEST, _('Use latest version of Sphinx')),
(ALLOW_DEPRECATED_WEBHOOKS, _('Allow deprecated webhook views')),
(PIP_ALWAYS_UPGRADE, _('Always run pip install --upgrade')),
(SKIP_SUBMODULES, _('Skip git submodule checkout')),
(
DONT_OVERWRITE_SPHINX_CONTEXT,
_(
Expand Down
7 changes: 0 additions & 7 deletions readthedocs/rtd_tests/tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,13 +181,6 @@ def test_skip_submodule_checkout(self):
repo.update()
repo.checkout('submodule')
self.assertTrue(repo.are_submodules_available(self.dummy_conf))
fixture.get(
Feature,
projects=[self.project],
feature_id=Feature.SKIP_SUBMODULES,
)
self.assertTrue(self.project.has_feature(Feature.SKIP_SUBMODULES))
self.assertFalse(repo.are_submodules_available(self.dummy_conf))

def test_use_shallow_clone(self):
repo = self.project.vcs_repo()
Expand Down
7 changes: 1 addition & 6 deletions readthedocs/vcs_support/backends/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,10 @@ def repo_exists(self):

def are_submodules_available(self, config):
"""Test whether git submodule checkout step should be performed."""
# TODO remove this after users migrate to a config file
from readthedocs.projects.models import Feature
submodules_in_config = (
config.submodules.exclude != ALL or config.submodules.include
)
if (
self.project.has_feature(Feature.SKIP_SUBMODULES) or
not submodules_in_config
):
if not submodules_in_config:
return False

# Keep compatibility with previous projects
Expand Down