From 8630cca7274d2456b39c70866e4b8e242c427b08 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 14 Mar 2019 11:29:28 -0500 Subject: [PATCH 1/3] Regroup settings This is an initial proposal for #5413 --- readthedocs/projects/forms.py | 22 +++++++++---------- .../rtd_tests/tests/test_project_symlinks.py | 1 + 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index a32b6978df4..ef6254f44c3 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -208,24 +208,23 @@ class ProjectAdvancedForm(ProjectTriggerBuildMixin, ProjectForm): class Meta: model = Project fields = ( - # Standard build edits + # Global settings. + 'default_version', + 'default_branch', + 'privacy_level', + 'analytics_code', + 'show_version_warning', + 'single_version', + + # Options that can be set per-version using a config file. + 'documentation_type', 'install_project', 'requirements_file', - 'single_version', 'conf_py_file', - 'default_branch', - 'default_version', - 'show_version_warning', 'enable_pdf_build', 'enable_epub_build', - # Privacy - 'privacy_level', - # 'version_privacy_level', - # Python specific 'use_system_packages', 'python_interpreter', - # Fringe - 'analytics_code', ) def __init__(self, *args, **kwargs): @@ -287,7 +286,6 @@ class Meta: 'repo_type', # Extra 'description', - 'documentation_type', 'language', 'programming_language', 'project_url', diff --git a/readthedocs/rtd_tests/tests/test_project_symlinks.py b/readthedocs/rtd_tests/tests/test_project_symlinks.py index b3075167eb4..2316522e4cf 100644 --- a/readthedocs/rtd_tests/tests/test_project_symlinks.py +++ b/readthedocs/rtd_tests/tests/test_project_symlinks.py @@ -1214,6 +1214,7 @@ def test_change_subproject_privacy(self): # Required defaults 'python_interpreter': 'python', 'default_version': 'latest', + 'documentation_type': 'sphinx', 'privacy_level': 'private', }, From b856e791b6be6cff68a98efd1422f30136c2d856 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Thu, 14 Mar 2019 11:34:27 -0500 Subject: [PATCH 2/3] Reorder again --- readthedocs/projects/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index ef6254f44c3..872aae26771 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -218,12 +218,12 @@ class Meta: # Options that can be set per-version using a config file. 'documentation_type', - 'install_project', 'requirements_file', + 'install_project', + 'use_system_packages', 'conf_py_file', 'enable_pdf_build', 'enable_epub_build', - 'use_system_packages', 'python_interpreter', ) From 7af0ecd3270c698644fcfb43b6b60280596fcd4f Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Mon, 18 Mar 2019 10:35:45 -0500 Subject: [PATCH 3/3] Move python interpreter --- readthedocs/projects/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readthedocs/projects/forms.py b/readthedocs/projects/forms.py index 872aae26771..76e6b779b18 100644 --- a/readthedocs/projects/forms.py +++ b/readthedocs/projects/forms.py @@ -219,12 +219,12 @@ class Meta: # Options that can be set per-version using a config file. 'documentation_type', 'requirements_file', + 'python_interpreter', 'install_project', 'use_system_packages', 'conf_py_file', 'enable_pdf_build', 'enable_epub_build', - 'python_interpreter', ) def __init__(self, *args, **kwargs):