From 1f616f6fcd6ca799112542784fd92b6d245f19d1 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Tue, 8 Dec 2020 16:20:24 +0500 Subject: [PATCH 1/2] Fixing make docs Adding constraint on sphinx. --- common/djangoapps/third_party_auth/provider.py | 2 +- docs/docs_settings.py | 4 +++- docs/guides/conf.py | 14 +++++++++++++- requirements/constraints.txt | 3 +++ 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/common/djangoapps/third_party_auth/provider.py b/common/djangoapps/third_party_auth/provider.py index c2a95e34837a..00299a6db660 100644 --- a/common/djangoapps/third_party_auth/provider.py +++ b/common/djangoapps/third_party_auth/provider.py @@ -7,7 +7,7 @@ from openedx.core.djangoapps.theming.helpers import get_current_request -from .models import ( +from common.djangoapps.third_party_auth.models import ( _LTI_BACKENDS, _PSA_OAUTH2_BACKENDS, _PSA_SAML_BACKENDS, diff --git a/docs/docs_settings.py b/docs/docs_settings.py index 87959f39f487..03992630e356 100644 --- a/docs/docs_settings.py +++ b/docs/docs_settings.py @@ -41,6 +41,8 @@ 'contentstore.apps.ContentstoreConfig', 'cms.djangoapps.course_creators', 'xblock_config.apps.XBlockConfig', - 'user_tasks', 'lms.djangoapps.lti_provider' ]) + + +COMMON_TEST_DATA_ROOT = '' diff --git a/docs/guides/conf.py b/docs/guides/conf.py index 6c36e8306ec9..dfc8747fc629 100644 --- a/docs/guides/conf.py +++ b/docs/guides/conf.py @@ -255,6 +255,17 @@ modules[path] = path +# These Django apps under lms don't import correctly with the "lms.djangapps" prefix +# Others don't import correctly without it...INSTALLED_APPS entries are inconsistent +lms_djangoapps = ['badges', 'branding', 'bulk_email', 'courseware', + 'coursewarehistoryextended', 'email_marketing', 'experiments', 'lti_provider', + 'mobile_api', 'notes', 'rss_proxy', 'shoppingcart', 'survey'] +for app in lms_djangoapps: + path = os.path.join('lms', 'djangoapps', app) + if app not in ['notes']: + modules[path] = path + + def update_settings_module(service='lms'): """ Set the "DJANGO_SETTINGS_MODULE" environment variable appropriately @@ -283,6 +294,7 @@ def on_init(app): # pylint: disable=unused-argument exclude_dirs = ['envs', 'migrations', 'test', 'tests'] exclude_dirs.extend(cms_djangoapps) exclude_dirs.extend(lms_djangoapps) + exclude_files = ['admin.py', 'test.py', 'testing.py', 'tests.py', 'testutils.py', 'wsgi.py'] for module in modules: module_path = six.text_type(root / module) @@ -315,5 +327,5 @@ def on_init(app): # pylint: disable=unused-argument def setup(app): """Sphinx extension: run sphinx-apidoc.""" - event = b'builder-inited' if six.PY2 else 'builder-inited' + event = 'builder-inited' app.connect(event, on_init) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index df0d3297a09c..2dc0f2e31071 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -136,3 +136,6 @@ sympy==1.6.2 # cryptography 3.3.1 started failing tests on sandbox because it dropped support for python3.5 cryptography==3.2.1 + +# greater versions breaking the code +Sphinx==3.3.0 From c4ae96d0004e0a14e9f673b0840712b60b1d3522 Mon Sep 17 00:00:00 2001 From: Awais Qureshi Date: Wed, 6 Jan 2021 00:35:33 +0500 Subject: [PATCH 2/2] Running makeupgrade --- requirements/edx-sandbox/py35.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/edx-sandbox/py35.txt b/requirements/edx-sandbox/py35.txt index b34247ead1c0..55b0aa008078 100644 --- a/requirements/edx-sandbox/py35.txt +++ b/requirements/edx-sandbox/py35.txt @@ -20,7 +20,7 @@ matplotlib==2.2.4 # via -c requirements/edx-sandbox/../constraints.txt, mpmath==1.1.0 # via sympy networkx==2.2 # via -r requirements/edx-sandbox/py35.in nltk==3.5 # via -r requirements/edx-sandbox/shared.txt, chem -numpy==1.16.5 # via -c requirements/edx-sandbox/../constraints.txt, -r requirements/edx-sandbox/py35.in, chem, matplotlib, openedx-calc, scipy +numpy==1.16.5 # via -c requirements/edx-sandbox/../constraints.txt, -r requirements/edx-sandbox/py35.in, chem, matplotlib, openedx-calc openedx-calc==1.0.9 # via -r requirements/edx-sandbox/py35.in pycparser==2.20 # via -r requirements/edx-sandbox/shared.txt, cffi pyparsing==2.2.0 # via -r requirements/edx-sandbox/py35.in, chem, matplotlib, openedx-calc diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index 1a4bf0dd6cd8..4c5f4e59039b 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -275,7 +275,7 @@ social-auth-core==3.3.3 # via -r requirements/edx/testing.txt, social-auth-app sorl-thumbnail==12.7.0 # via -r requirements/edx/testing.txt, django-wiki sortedcontainers==2.3.0 # via -r requirements/edx/testing.txt soupsieve==2.1 # via -r requirements/edx/testing.txt, beautifulsoup4 -sphinx==3.4.2 # via edx-sphinx-theme, sphinxcontrib-httpdomain +sphinx==3.3.0 # via -c requirements/edx/../constraints.txt, edx-sphinx-theme, sphinxcontrib-httpdomain sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx sphinxcontrib-htmlhelp==1.0.3 # via sphinx diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index 368d70c6b8d7..bb31fce358bb 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -30,7 +30,7 @@ requests==2.25.1 # via sphinx six==1.15.0 # via edx-sphinx-theme, stevedore smmap==3.0.4 # via gitdb snowballstemmer==2.0.0 # via sphinx -sphinx==3.4.2 # via -r requirements/edx/doc.in, edx-sphinx-theme +sphinx==3.3.0 # via -c requirements/edx/../constraints.txt, -r requirements/edx/doc.in, edx-sphinx-theme sphinxcontrib-applehelp==1.0.2 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx sphinxcontrib-htmlhelp==1.0.3 # via sphinx