From a3d496a8822109a2dc898c51ae45d2e6813200c3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jul 2013 11:38:00 -0400 Subject: [PATCH 1/4] Set sys.path properly for docs to build. We used to do it this way, I'm not sure why it was changed. Our settings files add directories to the path, so we need to do it here so that names will be importable. --- docs/source/conf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2c398c1b9a..ae2d8c6015 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,17 @@ import os # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) -sys.path.insert(0, os.path.abspath('../..')) # mitx folder + +mitx = os.path.abspath('../..') + +sys.path.append(mitx) +sys.path.append(os.path.join(mitx, "common/djangoapps")) +sys.path.append(os.path.join(mitx, "common/lib")) +sys.path.append(os.path.join(mitx, "common/lib/sandbox-packages")) +sys.path.append(os.path.join(mitx, "lms/djangoapps")) +sys.path.append(os.path.join(mitx, "lms/lib")) +sys.path.append(os.path.join(mitx, "cms/djangoapps")) +sys.path.append(os.path.join(mitx, "cms/lib")) # django configuration - careful here os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.test' From 7f193bcaad73fa47ede5926467e8577e32b6290d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jul 2013 11:39:22 -0400 Subject: [PATCH 2/4] We don't need to run sphinx on our tests. --- docs/source/lms.rst | 52 --------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/docs/source/lms.rst b/docs/source/lms.rst index 6548cd71a0..3fde5d8294 100644 --- a/docs/source/lms.rst +++ b/docs/source/lms.rst @@ -39,13 +39,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. automodule:: certificates.tests - :members: - :show-inheritance: - Circuit ======= @@ -67,13 +60,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. automodule:: circuit.tests - :members: - :show-inheritance: - Course_wiki =========== @@ -181,12 +167,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. automodule:: dashboard.tests - :members: - :show-inheritance: Django comment client ===================== @@ -202,12 +182,6 @@ Models :members: :show-inheritance: -Tests ------ - -.. automodule:: django_comment_client.tests - :members: - :show-inheritance: Heartbeat ========= @@ -230,12 +204,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. .. automodule:: instructor.tests -.. :members: -.. :show-inheritance: Lisenses ======== @@ -258,12 +226,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. automodule:: licenses.tests - :members: - :show-inheritance: LMS migration ============= @@ -336,13 +298,6 @@ Views :members: :show-inheritance: -Tests ------ - -.. automodule:: static_template_view.tests - :members: - :show-inheritance: - Static book =========== @@ -364,10 +319,3 @@ Views .. automodule:: staticbook.views :members: :show-inheritance: - -Tests ------ - -.. automodule:: staticbook.tests - :members: - :show-inheritance: From 55d4d98031be5dc618b854575e3043bf45a4a025 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jul 2013 11:39:54 -0400 Subject: [PATCH 3/4] static_template_view.models is gone, remove it from docs. --- docs/source/lms.rst | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/source/lms.rst b/docs/source/lms.rst index 3fde5d8294..c7ba7dde62 100644 --- a/docs/source/lms.rst +++ b/docs/source/lms.rst @@ -284,13 +284,6 @@ Static template view :members: :show-inheritance: -Models ------- - -.. automodule:: static_template_view.models - :members: - :show-inheritance: - Views ----- From 8997ed0322909c3ac61b93f3c2433353415ecde8 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jul 2013 12:19:53 -0400 Subject: [PATCH 4/4] Suggestions from James: mitx is old-school, as is autogeneration. --- docs/source/conf.py | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ae2d8c6015..aa62613370 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,18 +1,11 @@ # -*- coding: utf-8 -*- +""" +EdX documentation build configuration file +""" #pylint: disable=C0103 #pylint: disable=W0622 #pylint: disable=W0212 #pylint: disable=W0613 -""" EdX documentation build configuration file, created by - sphinx-quickstart on Fri Nov 2 15:43:00 2012. - - This file is execfile()d with the current directory set to its containing dir. - - Note that not all possible configuration values are present in this - autogenerated file. - - All configuration values have a default; values that are commented out - serve to show the default.""" import sys import os @@ -22,16 +15,16 @@ import os # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) -mitx = os.path.abspath('../..') +root = os.path.abspath('../..') -sys.path.append(mitx) -sys.path.append(os.path.join(mitx, "common/djangoapps")) -sys.path.append(os.path.join(mitx, "common/lib")) -sys.path.append(os.path.join(mitx, "common/lib/sandbox-packages")) -sys.path.append(os.path.join(mitx, "lms/djangoapps")) -sys.path.append(os.path.join(mitx, "lms/lib")) -sys.path.append(os.path.join(mitx, "cms/djangoapps")) -sys.path.append(os.path.join(mitx, "cms/lib")) +sys.path.append(root) +sys.path.append(os.path.join(root, "common/djangoapps")) +sys.path.append(os.path.join(root, "common/lib")) +sys.path.append(os.path.join(root, "common/lib/sandbox-packages")) +sys.path.append(os.path.join(root, "lms/djangoapps")) +sys.path.append(os.path.join(root, "lms/lib")) +sys.path.append(os.path.join(root, "cms/djangoapps")) +sys.path.append(os.path.join(root, "cms/lib")) # django configuration - careful here os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.test'