From db3f7af8998bdcb9b6de2ed8392eb64818d70ea7 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 17:57:02 +0330 Subject: [PATCH 1/6] fix: application name corrected --- lms/envs/common.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lms/envs/common.py b/lms/envs/common.py index a65a7ab195ce..1df0610c7808 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3183,9 +3183,13 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring # Notes 'lms.djangoapps.edxnotes', - # User API + # Django Rest Framework 'rest_framework', + # REST framework JWT Auth + 'rest_framework_jwt', + + # User API 'openedx.core.djangoapps.user_api', # Different Course Modes @@ -3351,7 +3355,6 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring # Management of per-user schedules 'openedx.core.djangoapps.schedules', - 'rest_framework_jwt', # Learning Sequence Navigation 'openedx.core.djangoapps.content.learning_sequences.apps.LearningSequencesConfig', From c27d55a25383c08363671c2a847442b7a816b54c Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 18:05:28 +0330 Subject: [PATCH 2/6] chore: typos fixed --- lms/djangoapps/course_home_api/urls.py | 2 +- lms/envs/common.py | 20 +++++++++---------- lms/envs/devstack-experimental.yml | 2 +- lms/envs/devstack.py | 2 +- lms/envs/devstack_with_worker.py | 2 +- lms/envs/docs/README.rst | 2 +- lms/envs/production.py | 10 +++++----- .../0006-enforce-scopes-in-LMS-APIs.rst | 2 +- .../decisions/0009-jwt-in-session-cookie.rst | 8 ++++---- .../docs/how_tos/testing_manually.rst | 2 +- .../safe_sessions/tests/test_middleware.py | 8 ++++---- openedx/core/lib/.coveragerc | 2 +- openedx/core/lib/mobile_utils.py | 2 +- 13 files changed, 32 insertions(+), 32 deletions(-) diff --git a/lms/djangoapps/course_home_api/urls.py b/lms/djangoapps/course_home_api/urls.py index 2ce9903b6031..aca7318525c8 100644 --- a/lms/djangoapps/course_home_api/urls.py +++ b/lms/djangoapps/course_home_api/urls.py @@ -18,7 +18,7 @@ from lms.djangoapps.course_home_api.progress.views import ProgressTabView # This API is a BFF ("backend for frontend") designed for the learning MFE. It's not versioned because there is no -# guarantee of stability over time. It may change from one open edx release to another. Don't write any scripts +# guarantee of stability over time. It may change from one Open edX release to another. Don't write any scripts # that depend on it. urlpatterns = [] diff --git a/lms/envs/common.py b/lms/envs/common.py index 1df0610c7808..7fbddadf388c 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -290,7 +290,7 @@ # sandbox, for testing whether it's enabled properly. 'ENABLE_DEBUG_RUN_PYTHON': False, - # Enable URL that shows information about the status of variuous services + # Enable URL that shows information about the status of various services 'ENABLE_SERVICE_STATUS': False, # Don't autoplay videos for students @@ -458,7 +458,7 @@ # .. toggle_name: FEATURES['ENABLE_THIRD_PARTY_AUTH'] # .. toggle_implementation: DjangoSetting # .. toggle_default: False - # .. toggle_description: Turn on third-party auth. Disabled for now because full mplementations are not yet + # .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet # available. Remember to run migrations if you enable this; we don't create tables by default. This feature can # be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication # backends with the AUTHENTICATION_BACKENDS setting. @@ -699,7 +699,7 @@ # .. toggle_default: False # .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems # and applications. - # .. toggle_warning: After enabling this feature flag there are multiple steps invloved to configure edX + # .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX # as LTI provider. Full guide is available here: # https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/lti/index.html # .. toggle_use_cases: open_edx @@ -983,7 +983,7 @@ # .. toggle_default: False # .. toggle_description: When true, replaces the bulk email tool found on the # instructor dashboard with a link to the new communications MFE version instead. - # Stting the tool to false will leave the old bulk email tool experience in place. + # Setting the tool to false will leave the old bulk email tool experience in place. # .. toggle_use_cases: opt_in # .. toggle_creation_date: 2022-03-21 # .. toggle_target_removal_date: None @@ -1018,7 +1018,7 @@ # .. toggle_name: FEATURES['ENABLE_CERTIFICATES_IDV_REQUIREMENT'] # .. toggle_implementation: DjangoSetting # .. toggle_default: False - # .. toggle_description: Whether to enforce ID Verification requirements for couse certificates generation + # .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation # .. toggle_use_cases: open_edx # .. toggle_creation_date: 2022-04-26 # .. toggle_target_removal_date: None @@ -1129,7 +1129,7 @@ # .. toggle_name: ENABLE_COPPA_COMPLIANCE # .. toggle_implementation: DjangoSetting # .. toggle_default: False -# .. toggle_description: When True, inforces COPPA compliance and removes YOB field from registration form and accounnt +# .. toggle_description: When True, enforces COPPA compliance and removes YOB field from registration form and account # .. settings page. Also hide YOB banner from profile page. # .. toggle_use_cases: open_edx # .. toggle_creation_date: 2021-10-27 @@ -1367,7 +1367,7 @@ def _make_mako_template_dirs(settings): # Mobile App processor (Detects if request is from the mobile app) 'lms.djangoapps.mobile_api.context_processor.is_from_mobile_app', - # Context processor necesarry for the survey report message appear on the admin site + # Context processor necessary for the survey report message appear on the admin site 'openedx.features.survey_report.context_processors.admin_extra_context' @@ -1458,7 +1458,7 @@ def _make_mako_template_dirs(settings): # .. setting_name: ELASTIC_SEARCH_INDEX_PREFIX # .. setting_default: '' -# .. setting_description: Specifies the prefix used when namixng elasticsearch indexes related to edx-search. +# .. setting_description: Specifies the prefix used when naming elasticsearch indexes related to edx-search. ELASTICSEARCH_INDEX_PREFIX = "" VIDEO_CDN_URL = { @@ -1845,7 +1845,7 @@ def _make_mako_template_dirs(settings): # ] COURSES_WITH_UNSAFE_CODE = [] -# Cojail REST service +# Code jail REST service ENABLE_CODEJAIL_REST_SERVICE = False # .. setting_name: CODE_JAIL_REST_SERVICE_REMOTE_EXEC # .. setting_default: 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0' @@ -4526,7 +4526,7 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring REGISTRATION_EXTENSION_FORM = None -# Identifier included in the User Agent from open edX mobile apps. +# Identifier included in the User Agent from Open edX mobile apps. MOBILE_APP_USER_AGENT_REGEXES = [ r'edX/org.edx.mobile', ] diff --git a/lms/envs/devstack-experimental.yml b/lms/envs/devstack-experimental.yml index 149cf0982132..43486ca024bc 100644 --- a/lms/envs/devstack-experimental.yml +++ b/lms/envs/devstack-experimental.yml @@ -11,7 +11,7 @@ # A. You don't *have* to, because settings in devstack.py # override these settings. But, it doesn't harm to also make them # here in order to quell confusion. The hope is that we'll -# adpot OEP-45 eventually, which recommends against having +# adopt OEP-45 eventually, which recommends against having # a devstack.py at all. # # This is part of the effort to move our dev tools off of Ansible and diff --git a/lms/envs/devstack.py b/lms/envs/devstack.py index 82e9134f456f..a2e3675b5141 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -135,7 +135,7 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing PIPELINE['SASS_ARGUMENTS'] = '--debug-info' -# Load development webpack donfiguration +# Load development webpack configuration WEBPACK_CONFIG_PATH = 'webpack.dev.config.js' ########################### VERIFIED CERTIFICATES ################################# diff --git a/lms/envs/devstack_with_worker.py b/lms/envs/devstack_with_worker.py index 449c7f5c72d3..4c865c629aff 100644 --- a/lms/envs/devstack_with_worker.py +++ b/lms/envs/devstack_with_worker.py @@ -1,5 +1,5 @@ """ -This config file follows the devstack enviroment, but adds the +This config file follows the devstack environment, but adds the requirement of a celery worker running in the background to process celery tasks. diff --git a/lms/envs/docs/README.rst b/lms/envs/docs/README.rst index 9c6b1d8992b7..b38c2d288658 100644 --- a/lms/envs/docs/README.rst +++ b/lms/envs/docs/README.rst @@ -13,7 +13,7 @@ YAML Configuration Files In addition, there is a mechanism for reading and overriding configuration settings from YAML files on-disk. The :file:`/lms/envs/production.py` module loads settings from a YAML file. The location of the YAML file is pulled from the value of the ``LMS_CFG`` environment variable. Except for a limited set of exceptions, if a key exists in the YAML file, it will be injected into the settings module as it is defined in the YAML file. -The YAML file allow open edX operators to configure the Django runtime +The YAML file allow Open edX operators to configure the Django runtime without needing to make any changes to source-controlled python files in edx-platform. Therefore, they are not checked into the edx-platform repo. Rather, they are generated from the `edxapp playbook in the configuration diff --git a/lms/envs/production.py b/lms/envs/production.py index 014cf59aa36a..84cbdc420e44 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -143,8 +143,8 @@ def get_env_setting(setting): REQUIRE_BUILD_PROFILE = ENV_TOKENS.get('REQUIRE_BUILD_PROFILE', REQUIRE_BUILD_PROFILE) # The following variables use (or) instead of the default value inside (get). This is to enforce using the Lazy Text -# values when the varibale is an empty string. Therefore, setting these variable as empty text in related -# json files will make the system reads thier values from django translation files +# values when the variable is an empty string. Therefore, setting these variable as empty text in related +# json files will make the system reads their values from django translation files PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME') or PLATFORM_NAME PLATFORM_DESCRIPTION = ENV_TOKENS.get('PLATFORM_DESCRIPTION') or PLATFORM_DESCRIPTION @@ -362,7 +362,7 @@ def get_env_setting(setting): # Determines whether the CSRF token can be transported on # unencrypted channels. It is set to False here for backward compatibility, -# but it is highly recommended that this is True for enviroments accessed +# but it is highly recommended that this is True for environments accessed # by end users. CSRF_COOKIE_SECURE = ENV_TOKENS.get('CSRF_COOKIE_SECURE', False) @@ -502,9 +502,9 @@ def get_env_setting(setting): # After conversion above, the modulestore will have a "stores" list with all defined stores, for all stores, add the # fs_root entry to derived collection so that if it's a callable it can be resolved. We need to do this because the -# `derived_collection_entry` takes an exact index value but the config file might have overidden the number of stores +# `derived_collection_entry` takes an exact index value but the config file might have overridden the number of stores # and so we can't be sure that the 2 we define in common.py will be there when we try to derive settings. This could -# lead to execptions being thrown when the `derive_settings` call later in this file tries to update settings. We call +# lead to exceptions being thrown when the `derive_settings` call later in this file tries to update settings. We call # the derived_collection_entry function here to ensure that we update the fs_root for any callables that remain after # we've updated the MODULESTORE setting from our config file. for idx, store in enumerate(MODULESTORE['default']['OPTIONS']['stores']): diff --git a/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0006-enforce-scopes-in-LMS-APIs.rst b/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0006-enforce-scopes-in-LMS-APIs.rst index 57b6a102983c..1b5ff2362274 100644 --- a/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0006-enforce-scopes-in-LMS-APIs.rst +++ b/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0006-enforce-scopes-in-LMS-APIs.rst @@ -99,7 +99,7 @@ unprotected microservices. 4. Associate Available Scopes with Applications ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -In order to allow open edX operators to a priori limit the +In order to allow Open edX operators to a priori limit the types of access an Application can request, we will allow them to configure Application-specific "available scopes". diff --git a/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst b/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst index b36f15a1fd2b..1e4b87c4d8c0 100644 --- a/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst +++ b/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst @@ -28,7 +28,7 @@ user interacts with the overall application, the user's experience may lead them each accessing APIs on various backends. Stateless authentication (via self-contained JWTs) would allow scalable interactions between microfrontends and microservices. -Note: User authentication for open edX mobile apps is outside the scope of this decision record. As a brief note, we +Note: User authentication for Open edX mobile apps is outside the scope of this decision record. As a brief note, we believe any decisions in this record will neither affect the current authentication mechanisms used for mobile apps nor impact forward compatibility when/if mobile apps are consolidated to use a similar (if not the same) authentication mechanism as outlined here for web apps. @@ -69,7 +69,7 @@ Login -> Cookie -> API recombined JWT in a temporary cookie specified by JWT_AUTH_COOKIE_. * The `Django Rest Framework JWT`_ library we use makes use of the JWT_AUTH_COOKIE_ configuration setting. When set, the JSONWebTokenAuthentication_ class `automatically extracts the JWT from the cookie`_. Since all - open edX REST endpoints that support JWT-based authentication derive from this base class, their authentication + Open edX REST endpoints that support JWT-based authentication derive from this base class, their authentication checks will make use of the JWTs provided in the JWT-related cookies. #. **Introduce forgiving JWTs for backward compatibility.** @@ -121,7 +121,7 @@ JWT Cookie Lifetime * For simplicity and consistency, the cookies and their containing JWT will expire at the same time. There's no need to have these be different values. - * Given this, JWT cookies will always have expiration values, unlike `current open edX session cookies that may + * Given this, JWT cookies will always have expiration values, unlike `current Open edX session cookies that may have no expiration`_. * A configuration setting, JWT_AUTH_COOKIE_EXPIRATION, will specify the expiration duration for JWTs and their @@ -141,7 +141,7 @@ JWT Cookie Lifetime which will remove them from the user's browser cookie jar. Thus, the user will be logged out of all the microfrontends. -.. _`current open edX session cookies that may have no expiration`: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27 +.. _`current Open edX session cookies that may have no expiration`: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27 .. _JWT blacklist: https://auth0.com/blog/blacklist-json-web-token-api-keys/ .. _`JWT ID (jti)`: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#jtiDef diff --git a/openedx/core/djangoapps/oauth_dispatch/docs/how_tos/testing_manually.rst b/openedx/core/djangoapps/oauth_dispatch/docs/how_tos/testing_manually.rst index 8d275232abe2..146846b15b81 100644 --- a/openedx/core/djangoapps/oauth_dispatch/docs/how_tos/testing_manually.rst +++ b/openedx/core/djangoapps/oauth_dispatch/docs/how_tos/testing_manually.rst @@ -1,7 +1,7 @@ Manually Testing OAuth2 Provider implementation ----------------------------------------------- -This document explains how to manually test the open edX LMS' OAuth2 Provider +This document explains how to manually test the Open edX LMS' OAuth2 Provider implementation. In order to verify that it correctly implements the `OAuth2 standard`_, use a publicly available 3rd party standard OAuth2 client. The steps here show how to use `Google's OAuth2 Playground`_ as the client for diff --git a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py index 0ffb1aeb8e59..b288c718c8c8 100644 --- a/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py +++ b/openedx/core/djangoapps/safe_sessions/tests/test_middleware.py @@ -326,9 +326,9 @@ def test_success_from_mobile_web_view(self): self.request.path = '/xblock/block-v1:org+course+run+type@html+block@block_id' self.verify_success() - @override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'open edX Mobile App']) + @override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'Open edX Mobile App']) def test_success_from_mobile_app(self): - self.request.META = {'HTTP_USER_AGENT': 'open edX Mobile App Version 2.1'} + self.request.META = {'HTTP_USER_AGENT': 'Open edX Mobile App Version 2.1'} self.verify_success() def verify_error(self, expected_response_status): @@ -364,9 +364,9 @@ def test_error_with_http_accept(self, http_accept, expected_response): self.request.META['HTTP_ACCEPT'] = http_accept self.verify_error(expected_response) - @override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'open edX Mobile App']) + @override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'Open edX Mobile App']) def test_error_from_mobile_app(self): - self.request.META = {'HTTP_USER_AGENT': 'open edX Mobile App Version 2.1'} + self.request.META = {'HTTP_USER_AGENT': 'Open edX Mobile App Version 2.1'} self.verify_error(401) @override_settings(ENFORCE_SAFE_SESSIONS=False) diff --git a/openedx/core/lib/.coveragerc b/openedx/core/lib/.coveragerc index 87fbc1aa6cb4..94ab6a513d39 100644 --- a/openedx/core/lib/.coveragerc +++ b/openedx/core/lib/.coveragerc @@ -8,7 +8,7 @@ parallel = true ignore_errors = True [html] -title = Open edx Core Lib Python Test Coverage Report +title = Open edX Core Lib Python Test Coverage Report directory = reports/openedx/core/lib/cover [xml] diff --git a/openedx/core/lib/mobile_utils.py b/openedx/core/lib/mobile_utils.py index 3ad2a2df86cc..7f476954c19d 100644 --- a/openedx/core/lib/mobile_utils.py +++ b/openedx/core/lib/mobile_utils.py @@ -10,7 +10,7 @@ def is_request_from_mobile_app(request): """ - Returns whether the given request was made by an open edX mobile app, + Returns whether the given request was made by an Open edX mobile app, either natively or through the mobile web view. Args: From 4529041643ca9931a115383594bbd95dd0b94e09 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 18:08:25 +0330 Subject: [PATCH 3/6] chore: cleanup - rst heading definitions - indirect hyperlinks and code-blocks for better readability --- lms/djangoapps/edxnotes/README.rst | 17 +++++-- lms/envs/docs/README.rst | 26 ++++++---- .../docs/decisions/001-course-apps.rst | 48 ++++++++++++------- xmodule/modulestore/docs/index.rst | 4 +- xmodule/modulestore/docs/mixedmodulestore.rst | 4 +- xmodule/modulestore/docs/overview.rst | 16 +++---- xmodule/modulestore/docs/split-mongo.rst | 38 +++++++-------- 7 files changed, 93 insertions(+), 60 deletions(-) diff --git a/lms/djangoapps/edxnotes/README.rst b/lms/djangoapps/edxnotes/README.rst index 8ba97c1877bc..1f1820346ddd 100644 --- a/lms/djangoapps/edxnotes/README.rst +++ b/lms/djangoapps/edxnotes/README.rst @@ -2,15 +2,24 @@ Status: Maintenance Responsibilities ================ -The edxnotes app is responsible for displaying parts of the Notes UI to students in different parts of the LMS, as well as figuring out whether Notes is enabled for a particular situation. The bulk of the actual work in storing the notes is done by a separate service (see the edx-notes-api repo). + +The edxnotes app is responsible for displaying parts of the Notes UI to students in different parts of the LMS, as well as figuring out whether Notes is enabled for a particular situation. The bulk of the actual work in storing the notes is done by a separate service (see the `edx-notes-api`_ repo). + +.. _edx-notes-api: https://github.com/openedx/edx-notes-api/ Direction: Extract into Plugin ============================== -Notes needs to insert a new tab into the LMS courseware, as well as wrap/decorate the courseware XBlock output so that it can add annotation capability to it. Both of these can now be done via plugins (decorating XBlock output can be done with XBlock Asides), and this app should be extracted into a separate repository. -This app is also currently proxying some requests through the LMS instead of hitting its service endpoint directly. It should instead always let the user's browser hit the edx-notes-api service directly. +Notes needs to insert a new tab into the LMS courseware, as well as wrap/decorate the courseware XBlock output so that it can add annotation capability to it. +Both of these can now be done via plugins (decorating XBlock output can be done with XBlock Asides), and this app should be extracted into a separate repository. + +This app is also currently proxying some requests through the LMS instead of hitting its service endpoint directly. +It should instead always let the user's browser hit the edx-notes-api service directly. + +The edxnotes app also has an endpoint to get JWT tokens that the edx-notes-api will accept. +This should be removed, and the edx-notes-api service converted to use the OAuth2 + JWT Cookie approach detailed in the `Transport JWT in HTTP Cookies`_ decision record for ``oauth_dispatch``. -The edxnotes app also has an endpoint to get JWT tokens that the edx-notes-api will accept. This should be removed, and the edx-notes-api service converted to use the OAuth2 + JWT Cookie approach detailed in the `Transport JWT in HTTP Cookies `_ decision record for ``oauth_dispatch``. +.. _Transport JWT in HTTP Cookies: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst Glossary ======== diff --git a/lms/envs/docs/README.rst b/lms/envs/docs/README.rst index b38c2d288658..34211a57517d 100644 --- a/lms/envs/docs/README.rst +++ b/lms/envs/docs/README.rst @@ -1,7 +1,7 @@ LMS Configuration Settings -========================== +########################## -The lms.envs module contains project-wide settings, defined in python modules +The ``lms.envs`` module contains project-wide settings, defined in python modules using the standard `Django Settings`_ mechanism, plus some Open edX particularities, which we describe below. @@ -9,9 +9,12 @@ particularities, which we describe below. YAML Configuration Files ------------------------- +************************ -In addition, there is a mechanism for reading and overriding configuration settings from YAML files on-disk. The :file:`/lms/envs/production.py` module loads settings from a YAML file. The location of the YAML file is pulled from the value of the ``LMS_CFG`` environment variable. Except for a limited set of exceptions, if a key exists in the YAML file, it will be injected into the settings module as it is defined in the YAML file. +In addition, there is a mechanism for reading and overriding configuration settings from YAML files on-disk. +The :file:`/lms/envs/production.py` module loads settings from a YAML file. +The location of the YAML file is pulled from the value of the ``LMS_CFG`` environment variable. +Except for a limited set of exceptions, if a key exists in the YAML file, it will be injected into the settings module as it is defined in the YAML file. The YAML file allow Open edX operators to configure the Django runtime without needing to make any changes to source-controlled python files in @@ -23,7 +26,7 @@ repo`_ and available in the ``/edx/etc/`` folder on edX servers. Feature Flags and Settings Guidelines -------------------------------------- +************************************* For guidelines on using Django settings and feature flag mechanisms in the edX platform, please see `Feature Flags and Settings`_. @@ -32,16 +35,19 @@ platform, please see `Feature Flags and Settings`_. Derived Settings ----------------- +**************** + In cases where you need to define one or more settings relative to the value of another setting, you can explicitly designate them as derived calculations. This can let you override one setting (such as a path or a feature toggle) and have it automatically propagate to other settings which are defined in terms of that value, without needing to track down all potentially impacted settings and -explicitly override them as well. This can be useful for test setting overrides +explicitly override them as well. This can be useful for test setting overrides even if you don't anticipate end users customizing the value very often. -For example:: +For example: + +.. code-block:: python def _make_locale_paths(settings): locale_paths = [settings.REPO_ROOT + '/conf/locale'] # edx-platform/conf/locale/ @@ -61,7 +67,9 @@ defined in ``lms/envs/common.py`` and you're using ``lms/envs/production.py`` wh includes overrides both from that module and the JSON configuration files. List entries and dictionary values can also be derived from other settings, even -when nested within each other:: +when nested within each other: + +.. code-block:: python def _make_mako_template_dirs(settings): """ diff --git a/openedx/core/djangoapps/course_apps/docs/decisions/001-course-apps.rst b/openedx/core/djangoapps/course_apps/docs/decisions/001-course-apps.rst index 1ee8555c6826..4491779a2751 100644 --- a/openedx/core/djangoapps/course_apps/docs/decisions/001-course-apps.rst +++ b/openedx/core/djangoapps/course_apps/docs/decisions/001-course-apps.rst @@ -1,12 +1,13 @@ Course Apps API -_______________ +############### Status -====== +****** + Proposal Context -======= +******* The new `Course Authoring MFE`_ includes a new UX called "Pages and Resources" for configuring different aspects of the course experience such as progress, @@ -27,7 +28,7 @@ enable/disable these apps using the API. Decision -======== +######## We propose to call such individual course features "Course Apps". They can be introduced as a new type of Open edX plugin. Any functionality that can be @@ -39,16 +40,29 @@ some bits of metadata, such as a name, a description etc. Additionally we will need a common interface for such apps so they can be enabled/disabled using a standard common interface. -To do this we can follow the example of existing plugins, [such as Course -Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243), +To do this we can follow the example of existing plugins, `such as Course Tabs`_, which provide a specific Python class that the plugin can inherit from, or implement. The required metadata and features, can be implemented as class attributes, and methods on this class. We can then discover the installed apps using the existing tooling for plugins -using a subclass of PluginManager designed for this purpose. Here is an example -for [Course -Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47) +using a subclass of ``PluginManager`` designed for this purpose. +Here is an example for `CourseTabs`_: + +.. code-block:: python + + class CourseTabPluginManager(PluginManager): + """ + Manager for all of the course tabs that have been made available. + + All course tabs should implement `CourseTab`. + """ + NAMESPACE = COURSE_TAB_NAMESPACE + + @classmethod + def get_tab_types(cls): + """ + Returns the list of available course tabs in their canonical order. It might not always make sense for an app installed in this way to be automatically show up for use on all courses. So each app will expose a method @@ -85,14 +99,17 @@ In the case of Course Apps, the standard plugin API will automatically discover all installed apps. Inactive apps will be filtered out during the availability check. +.. _such as Course Tabs: https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243 +.. _CourseTabs: https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47 + Course App Plugin Class ------------------------ +======================= -To be loaded as a Course App, you need to provide an entrypoint in `setup.py` -with the namespace "openedx.course_app". The entry should point to a Python +To be loaded as a Course App, you need to provide an entrypoint in ``setup.py`` +with the namespace ``openedx.course_app``. The entry should point to a Python class with the following basic structure: -.. code-block :: python +.. code-block:: python class CourseApp: # The app id should match what is specified in the setup.py entrypoint @@ -143,7 +160,7 @@ such a class and have these class methods call back to the existing code for availability checks and enabled checks. Course Apps API ---------------- +=============== Each app has some associated metadata: @@ -218,9 +235,8 @@ link should only be provided for Course Apps that don't have a UI in the course authoring MFE yet. If a partial UI exists, the MFE settings view can always link back to the old studio view from there. - Consequences -============ +************ - A new Course Apps API that consistently uses a standard mechanism (a plugin class) for discovering Course Apps, determining their availability and diff --git a/xmodule/modulestore/docs/index.rst b/xmodule/modulestore/docs/index.rst index a16c92d84b87..6a6db4633606 100644 --- a/xmodule/modulestore/docs/index.rst +++ b/xmodule/modulestore/docs/index.rst @@ -1,8 +1,8 @@ .. _edX Modulestores: -########################### +################ edX Modulestores -########################### +################ .. toctree:: :maxdepth: 2 diff --git a/xmodule/modulestore/docs/mixedmodulestore.rst b/xmodule/modulestore/docs/mixedmodulestore.rst index 3a8d84c9f835..3ec11c22f53a 100644 --- a/xmodule/modulestore/docs/mixedmodulestore.rst +++ b/xmodule/modulestore/docs/mixedmodulestore.rst @@ -1,6 +1,6 @@ -################# +################ MixedModuleStore -################# +################ MixedModuleStore provides a common API for all modulestore functions. diff --git a/xmodule/modulestore/docs/overview.rst b/xmodule/modulestore/docs/overview.rst index 5ffa719d6205..a5b56689e411 100644 --- a/xmodule/modulestore/docs/overview.rst +++ b/xmodule/modulestore/docs/overview.rst @@ -1,6 +1,6 @@ -################################# +################################ Overview of the edX Modulestores -################################# +################################ The edX Platform uses several different modulestores to store course data. Each of these modulestores is in use on edx.org. @@ -11,9 +11,9 @@ See: * `DraftModuleStore`_ * :ref:`Split Mongo Modulestore` -*************** +************** XMLModuleStore -*************** +************** The XMLModuleStore was the first modulestore used for the edX Platform. @@ -23,9 +23,9 @@ server starts, XMLModuleStore loads every block for every course into memory. XMLModuleStore is read-only and does not enable users to change a course without restarting the server. -***************** +**************** DraftModuleStore -***************** +**************** DraftModuleStore was the next generation modulestore and provides greater scalability by allowing random access to course blocks and loading blocks on @@ -35,9 +35,9 @@ DraftModuleStore allows editing of courses without restarting the server. In addition, DraftModuleStore stores a draft version of some types of blocks. -***************** +*********** Split Mongo -***************** +*********** Split Mongo is the newest modulestore. See the :ref:`Split Mongo Modulestore` chapter for more information. \ No newline at end of file diff --git a/xmodule/modulestore/docs/split-mongo.rst b/xmodule/modulestore/docs/split-mongo.rst index 4df1b7ccceb3..19f116aeb23f 100644 --- a/xmodule/modulestore/docs/split-mongo.rst +++ b/xmodule/modulestore/docs/split-mongo.rst @@ -1,8 +1,8 @@ .. _Split Mongo Modulestore: -############################ +####################### Split Mongo Modulestore -############################ +####################### See: @@ -11,9 +11,9 @@ See: * `Split Mongo Capabilities`_ -************************ +******** Overview -************************ +******** *Split Mongo* is the term used for the new edX modulestore. Split Mongo is built on mongoDB. For information about mongoDB, see the `mongoDB website`_. @@ -30,9 +30,9 @@ use more advanced capabilities when developing and managing courses. .. _mongoDB website: http://www.mongodb.org -************************ +********************** Split Mongo Data Model -************************ +********************** In the Split Mongo data model, edX courses are split into three collections: @@ -42,9 +42,9 @@ In the Split Mongo data model, edX courses are split into three collections: .. Structures link is a workaround; "Course Structures" as label is already taken -============= +============ Course Index -============= +============ The course index is a dictionary that stores course IDs. Each course ID points to a course structure. @@ -69,13 +69,13 @@ In the edX Platform: about page, course updates, other course pages, sections or subsections, the draft branch is automatically published; that is, it becomes the published branch. - + * For units and components, changes are saved in the draft branch. The user must publish the unit to change the draft branch to the published branch. When the user begins another set of changes, the draft branch is updated. Course Reruns -************** +************* The edX Platform enables you to rerun a course. When you rerun a course, a new course index is created. The new course index points to the same course @@ -83,9 +83,9 @@ structure as the original course index. .. _Structures: -========================== +================= Course Structures -========================== +================= The course structure defines, or outlines, the content of a course. @@ -104,9 +104,9 @@ when a course author changes a course, or a block in the course, a new course structure is saved; the previous course structure, and previous versions of blocks within the structure, remain in the database and are not modified. -========================== +================== XBlock Definitions -========================== +================== XBlock definitions contain the content of each block. For some blocks, such as sections and subsections, the definition consists of the block's display name. @@ -129,7 +129,7 @@ enable: * `Multiple Course Branches`_ * `Versioning`_ * `Content Reuse`_ - + While these capabilities are not fully implemented in the edX Platform, Split Mongo is designed to allow future enhancements that enable these content management capabilities. @@ -145,9 +145,9 @@ different structure. The edX Platform currently uses a draft and a published branch for a course. Future enhancements may use other branches. -============ +========== Versioning -============ +========== In Split Mongo, every change to a course or a block within the course is saved, with the time and user recorded. @@ -155,9 +155,9 @@ with the time and user recorded. Versioning enables future enhancements such as allowing course authors to revert a course or block to a previous version. -============== +============= Content Reuse -============== +============= By using pointers to reference XBlock definitions from :ref:`course structures `, Split Mongo enables content reuse. A single `XBlock From 0c44a78fadbc5e77676988860e0fd1ae0fe2d7f4 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 18:05:28 +0330 Subject: [PATCH 4/6] chore: typos fixed --- .github/pull_request_template.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c8b4a34532cf..06be5a978fe6 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -8,9 +8,8 @@ Use conventional commits to separate and summarize commits logically: https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html Use this template as a guide. Omit sections that don't apply. -You may link to information rather than copy it, but only if the link is publicly -readable. If you must linked information must be private (because it has secrets), -clearly label the link as private. +You may link to information rather than copy it, but only if the link is publicly readable. +If the linked information must be private (because it contains secrets), clearly label the link as private. --> From 6c5b98087e54aad4fa61d45482d6806274712f3f Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 18:08:25 +0330 Subject: [PATCH 5/6] chore: cleanup - rst heading definitions - indirect hyperlinks and code-blocks added for better readability - MarkDown warnings resolved - Yaml style issues fixed --- .github/actions/unit-tests/action.yml | 4 +- .github/actions/verify-tests-count/action.yml | 6 +- .github/pull_request_template.md | 2 + .../workflows/add-remove-label-on-comment.yml | 1 - .../check-consistent-dependencies.yml | 2 +- .github/workflows/check-for-tutorial-prs.yml | 4 +- .github/workflows/ci-static-analysis.yml | 4 +- .../workflows/compile-python-requirements.yml | 4 +- .github/workflows/docker-publish.yml | 13 +- .github/workflows/js-tests.yml | 115 +++++++------- .github/workflows/lint-imports.yml | 3 +- .github/workflows/lockfileversion-check.yml | 2 +- .github/workflows/migrations-check.yml | 120 +++++++------- .github/workflows/publish-ci-docker-image.yml | 1 - .github/workflows/quality-checks.yml | 109 +++++++------ .github/workflows/semgrep.yml | 4 +- .github/workflows/shellcheck.yml | 2 +- .github/workflows/static-assets-check.yml | 148 +++++++++--------- .github/workflows/unit-tests.yml | 6 +- .../units-test-scripts-structures-pruning.yml | 2 +- .../units-test-scripts-user-retirement.yml | 2 +- .github/workflows/update-geolite-database.yml | 18 +-- .../upgrade-one-python-dependency.yml | 12 +- .../workflows/upgrade-python-requirements.yml | 29 ++-- .github/workflows/verify-dunder-init.yml | 19 +-- 25 files changed, 311 insertions(+), 321 deletions(-) diff --git a/.github/actions/unit-tests/action.yml b/.github/actions/unit-tests/action.yml index eb7fee0a6ba6..7d217cd26f8c 100644 --- a/.github/actions/unit-tests/action.yml +++ b/.github/actions/unit-tests/action.yml @@ -1,5 +1,5 @@ -name: 'Run unit tests' -description: 'shared steps to run unit tests on both Github hosted and self hosted runners.' +name: "Run unit tests" +description: "shared steps to run unit tests on both Github hosted and self hosted runners." runs: using: "composite" steps: diff --git a/.github/actions/verify-tests-count/action.yml b/.github/actions/verify-tests-count/action.yml index 11afb7367180..d299f1ca11c5 100644 --- a/.github/actions/verify-tests-count/action.yml +++ b/.github/actions/verify-tests-count/action.yml @@ -1,5 +1,5 @@ -name: 'Verify unit tests count' -description: 'shared steps to verify unit tests count on both Github hosted and self hosted runners.' +name: "Verify unit tests count" +description: "shared steps to verify unit tests count on both Github hosted and self hosted runners." runs: using: "composite" steps: @@ -15,14 +15,12 @@ runs: echo "cms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --cms-only)" >> $GITHUB_ENV echo "lms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --lms-only)" >> $GITHUB_ENV - - name: collect tests from GHA unit test shards shell: bash run: | echo "cms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=cms.envs.test ${{ env.cms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV echo "lms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=lms.envs.test ${{ env.lms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV - - name: add unit tests count shell: bash run: | diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 06be5a978fe6..4a01922edd49 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -21,6 +21,7 @@ Design decisions and their rationales should be documented in the repo (docstrin linked here. Useful information to include: + - Which edX user roles will this change impact? Common user roles are "Learner", "Course Author", "Developer", and "Operator". - Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable). @@ -43,6 +44,7 @@ Please provide detailed step-by-step instructions for testing this change. ## Other information Include anything else that will help reviewers and consumers understand the change. + - Does this change depend on other changes elsewhere? - Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility. - If your [database migration](https://openedx.atlassian.net/wiki/spaces/AC/pages/23003228/Everything+About+Database+Migrations) can't be rolled back easily. diff --git a/.github/workflows/add-remove-label-on-comment.yml b/.github/workflows/add-remove-label-on-comment.yml index 0f369db7d293..a658064f09f0 100644 --- a/.github/workflows/add-remove-label-on-comment.yml +++ b/.github/workflows/add-remove-label-on-comment.yml @@ -17,4 +17,3 @@ on: jobs: add_remove_labels: uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master - diff --git a/.github/workflows/check-consistent-dependencies.yml b/.github/workflows/check-consistent-dependencies.yml index 1c57fc6f6b9f..0e4595a9d0cd 100644 --- a/.github/workflows/check-consistent-dependencies.yml +++ b/.github/workflows/check-consistent-dependencies.yml @@ -40,7 +40,7 @@ jobs: - uses: actions/setup-python@v5 if: ${{ env.RELEVANT == 'true' }} with: - python-version: '3.8' + python-version: "3.8" - name: "Recompile requirements" if: ${{ env.RELEVANT == 'true' }} diff --git a/.github/workflows/check-for-tutorial-prs.yml b/.github/workflows/check-for-tutorial-prs.yml index da7995e0c4d3..dc8d8557e56f 100644 --- a/.github/workflows/check-for-tutorial-prs.yml +++ b/.github/workflows/check-for-tutorial-prs.yml @@ -14,7 +14,7 @@ on: pull_request: types: [opened] paths: - - 'lms/templates/dashboard.html' + - "lms/templates/dashboard.html" jobs: # Provide helpful bot comment @@ -32,4 +32,4 @@ jobs: Thank you for your pull request! Congratulations on completing the Open edX tutorial! A team member will be by to take a look shortly. To those watching community pull requests: No need to worry about this one, a tCRIL team member will be taking care of it. For this PR's author: If this is a PR that is NOT coming from the Open edX tutorial, please comment and let us know to disregard this message. - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/ci-static-analysis.yml b/.github/workflows/ci-static-analysis.yml index e1c663c08372..0ae7363601c8 100644 --- a/.github/workflows/ci-static-analysis.yml +++ b/.github/workflows/ci-static-analysis.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: python-version: - - '3.11' - os: ['ubuntu-20.04'] + - "3.11" + os: ["ubuntu-20.04"] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/compile-python-requirements.yml b/.github/workflows/compile-python-requirements.yml index 85d0eb0882ea..0ff99b9c685a 100644 --- a/.github/workflows/compile-python-requirements.yml +++ b/.github/workflows/compile-python-requirements.yml @@ -4,9 +4,9 @@ on: workflow_dispatch: inputs: branch: - description: 'Target branch to create requirements PR against' + description: "Target branch to create requirements PR against" required: true - default: 'master' + default: "master" type: string defaults: diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index b0af217e6e70..98a80f1da37d 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -9,8 +9,8 @@ jobs: # See also https://docs.docker.com/docker-hub/builds/ push: runs-on: ubuntu-latest - if: github.event_name == 'push' - + if: github.event_name == 'push' + strategy: matrix: variant: @@ -32,12 +32,11 @@ jobs: - name: Login to DockerHub uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push lms base docker image env: DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - run : make docker_tag_build_push_${{matrix.variant}} - \ No newline at end of file + DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} + run: make docker_tag_build_push_${{matrix.variant}} diff --git a/.github/workflows/js-tests.yml b/.github/workflows/js-tests.yml index 37d825d9ab87..243f56262a1f 100644 --- a/.github/workflows/js-tests.yml +++ b/.github/workflows/js-tests.yml @@ -12,74 +12,73 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] - node-version: [ 18 ] + os: [ubuntu-20.04] + node-version: [18] python-version: - - '3.11' + - "3.11" steps: + - uses: actions/checkout@v4 + - name: Fetch master to compare coverage + run: git fetch --depth=1 origin master - - uses: actions/checkout@v4 - - name: Fetch master to compare coverage - run: git fetch --depth=1 origin master + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + - name: Setup npm + run: npm i -g npm@10.5.x - - name: Setup npm - run: npm i -g npm@10.5.x + - name: Install Firefox 123.0 + run: | + sudo apt-get purge firefox + wget "https://ftp.mozilla.org/pub/firefox/releases/123.0/linux-x86_64/en-US/firefox-123.0.tar.bz2" + tar -xjf firefox-123.0.tar.bz2 + sudo mv firefox /opt/firefox + sudo ln -s /opt/firefox/firefox /usr/bin/firefox - - name: Install Firefox 123.0 - run: | - sudo apt-get purge firefox - wget "https://ftp.mozilla.org/pub/firefox/releases/123.0/linux-x86_64/en-US/firefox-123.0.tar.bz2" - tar -xjf firefox-123.0.tar.bz2 - sudo mv firefox /opt/firefox - sudo ln -s /opt/firefox/firefox /usr/bin/firefox + - name: Install Required System Packages + run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb - - name: Install Required System Packages - run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Get pip cache dir + id: pip-cache-dir + run: | + echo "::set-output name=dir::$(pip cache dir)" - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" + - name: Cache pip dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }} + restore-keys: ${{ runner.os }}-pip- - - name: Cache pip dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }} - restore-keys: ${{ runner.os }}-pip- + - name: Install Required Python Dependencies + run: | + make base-requirements - - name: Install Required Python Dependencies - run: | - make base-requirements + - uses: c-hive/gha-npm-cache@v1 + - name: Run JS Tests + env: + TEST_SUITE: js-unit + SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh + run: | + npm install -g jest + xvfb-run --auto-servernum ./scripts/all-tests.sh - - uses: c-hive/gha-npm-cache@v1 - - name: Run JS Tests - env: - TEST_SUITE: js-unit - SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh - run: | - npm install -g jest - xvfb-run --auto-servernum ./scripts/all-tests.sh - - - name: Save Job Artifacts - uses: actions/upload-artifact@v4 - with: - name: Build-Artifacts - path: | - reports/**/* - test_root/log/*.png - test_root/log/*.log - **/TEST-*.xml - overwrite: true + - name: Save Job Artifacts + uses: actions/upload-artifact@v4 + with: + name: Build-Artifacts + path: | + reports/**/* + test_root/log/*.png + test_root/log/*.log + **/TEST-*.xml + overwrite: true diff --git a/.github/workflows/lint-imports.yml b/.github/workflows/lint-imports.yml index f9ae712cfd78..24f241016bc7 100644 --- a/.github/workflows/lint-imports.yml +++ b/.github/workflows/lint-imports.yml @@ -7,7 +7,6 @@ on: - master jobs: - lint-imports: name: Lint Python Imports runs-on: ubuntu-20.04 @@ -19,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: "3.11" - name: Install system requirements run: sudo apt update && sudo apt install -y libxmlsec1-dev diff --git a/.github/workflows/lockfileversion-check.yml b/.github/workflows/lockfileversion-check.yml index 916dcb40d28d..736f1f98de13 100644 --- a/.github/workflows/lockfileversion-check.yml +++ b/.github/workflows/lockfileversion-check.yml @@ -5,7 +5,7 @@ name: Lockfile Version check on: push: branches: - - master + - master pull_request: jobs: diff --git a/.github/workflows/migrations-check.yml b/.github/workflows/migrations-check.yml index 75d9fde9fda0..45919c8f65f6 100644 --- a/.github/workflows/migrations-check.yml +++ b/.github/workflows/migrations-check.yml @@ -13,9 +13,9 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ubuntu-20.04] python-version: - - '3.11' + - "3.11" # 'pinned' is used to install the latest patch version of Django # within the global constraint i.e. Django==4.2.8 in current case # because we have global constraint of Django<4.2 @@ -50,73 +50,73 @@ jobs: --health-timeout 5s --health-retries 3 steps: - - name: Setup mongodb user - run: | - mongosh edxapp --eval ' - db.createUser( - { - user: "edxapp", - pwd: "password", - roles: [ - { role: "readWrite", db: "edxapp" }, - ] - } - ); - ' + - name: Setup mongodb user + run: | + mongosh edxapp --eval ' + db.createUser( + { + user: "edxapp", + pwd: "password", + roles: [ + { role: "readWrite", db: "edxapp" }, + ] + } + ); + ' - - name: Verify mongo and mysql db credentials - run: | - mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp - mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp + - name: Verify mongo and mysql db credentials + run: | + mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp + mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp - - name: Checkout repo - uses: actions/checkout@v4 + - name: Checkout repo + uses: actions/checkout@v4 - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install system Packages - run: | - sudo apt-get update - make ubuntu-requirements + - name: Install system Packages + run: | + sudo apt-get update + make ubuntu-requirements - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" + - name: Get pip cache dir + id: pip-cache-dir + run: | + echo "::set-output name=dir::$(pip cache dir)" - - name: Cache pip dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} - restore-keys: ${{ runner.os }}-pip- + - name: Cache pip dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} + restore-keys: ${{ runner.os }}-pip- - - name: Install Python dependencies - run: | - make dev-requirements - if [[ "${{ matrix.django-version }}" != "pinned" ]]; then - pip install "django~=${{ matrix.django-version }}.0" - pip check # fail if this test-reqs/Django combination is broken - fi + - name: Install Python dependencies + run: | + make dev-requirements + if [[ "${{ matrix.django-version }}" != "pinned" ]]; then + pip install "django~=${{ matrix.django-version }}.0" + pip check # fail if this test-reqs/Django combination is broken + fi - - name: list installed package versions - run: | - sudo pip freeze + - name: list installed package versions + run: | + sudo pip freeze - - name: Run Tests - env: - LMS_CFG: lms/envs/minimal.yml - # This is from the LMS dir on purpose since we don't need anything different for the CMS yet. - STUDIO_CFG: lms/envs/minimal.yml - run: | - echo "Running the LMS migrations." - ./manage.py lms migrate - echo "Running the CMS migrations." - ./manage.py cms migrate + - name: Run Tests + env: + LMS_CFG: lms/envs/minimal.yml + # This is from the LMS dir on purpose since we don't need anything different for the CMS yet. + STUDIO_CFG: lms/envs/minimal.yml + run: | + echo "Running the LMS migrations." + ./manage.py lms migrate + echo "Running the CMS migrations." + ./manage.py cms migrate # This job aggregates test results. It's the required check for branch protection. # https://github.com/marketplace/actions/alls-green#why diff --git a/.github/workflows/publish-ci-docker-image.yml b/.github/workflows/publish-ci-docker-image.yml index d97b205cfa94..0a9f50f6daf9 100644 --- a/.github/workflows/publish-ci-docker-image.yml +++ b/.github/workflows/publish-ci-docker-image.yml @@ -41,4 +41,3 @@ jobs: run: | docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f scripts/ci-runner.Dockerfile . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG - diff --git a/.github/workflows/quality-checks.yml b/.github/workflows/quality-checks.yml index d2264297a0ec..b9e2250cb169 100644 --- a/.github/workflows/quality-checks.yml +++ b/.github/workflows/quality-checks.yml @@ -13,71 +13,70 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ubuntu-20.04] python-version: - - '3.11' - node-version: [ 18 ] + - "3.11" + node-version: [18] steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 - - uses: actions/checkout@v4 - with: - fetch-depth: 2 + - name: Fetch base branch for comparison + run: git fetch --depth=1 origin ${{ github.base_ref }} - - name: Fetch base branch for comparison - run: git fetch --depth=1 origin ${{ github.base_ref }} + - name: Install Required System Packages + run: sudo apt-get update && sudo apt-get install libxmlsec1-dev - - name: Install Required System Packages - run: sudo apt-get update && sudo apt-get install libxmlsec1-dev + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + - name: Setup npm + run: npm i -g npm@8.5.x - - name: Setup npm - run: npm i -g npm@8.5.x + - name: Get pip cache dir + id: pip-cache-dir + run: | + echo "::set-output name=dir::$(pip cache dir)" - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" + - name: Cache pip dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }} + restore-keys: ${{ runner.os }}-pip- - - name: Cache pip dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }} - restore-keys: ${{ runner.os }}-pip- + - name: Install Required Python Dependencies + env: + PIP_SRC: ${{ runner.temp }} + run: | + make test-requirements - - name: Install Required Python Dependencies - env: - PIP_SRC: ${{ runner.temp }} - run: | - make test-requirements + - name: Run Quality Tests + env: + TEST_SUITE: quality + SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh + PIP_SRC: ${{ runner.temp }} + TARGET_BRANCH: ${{ github.base_ref }} + run: | + ./scripts/all-tests.sh - - name: Run Quality Tests - env: - TEST_SUITE: quality - SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh - PIP_SRC: ${{ runner.temp }} - TARGET_BRANCH: ${{ github.base_ref }} - run: | - ./scripts/all-tests.sh - - - name: Save Job Artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: Build-Artifacts - path: | - **/reports/**/* - test_root/log/**/*.log - *.log - overwrite: true + - name: Save Job Artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: Build-Artifacts + path: | + **/reports/**/* + test_root/log/**/*.log + *.log + overwrite: true diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 4f01f1112277..7f2b4925af8e 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -17,9 +17,9 @@ jobs: runs-on: "${{ matrix.os }}" strategy: matrix: - os: [ "ubuntu-20.04" ] + os: ["ubuntu-20.04"] python-version: - - '3.11' + - "3.11" steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index 704ff778a1b1..2e5b04bcc2ff 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -9,7 +9,7 @@ on: pull_request: push: branches: - - master + - master permissions: contents: read diff --git a/.github/workflows/static-assets-check.yml b/.github/workflows/static-assets-check.yml index 09307145be3b..e6cb1a3b4450 100644 --- a/.github/workflows/static-assets-check.yml +++ b/.github/workflows/static-assets-check.yml @@ -12,11 +12,11 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ ubuntu-20.04 ] + os: [ubuntu-20.04] python-version: - - '3.11' - node-version: [ 18 ] - npm-version: [ 10.5.x ] + - "3.11" + node-version: [18] + npm-version: [10.5.x] mongo-version: - "7.0" @@ -34,73 +34,73 @@ jobs: --health-retries 3 steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install system Packages - run: | - sudo apt-get update - sudo apt-get install libxmlsec1-dev pkg-config - - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Setup npm - run: npm i -g npm@${{ matrix.npm-version }} - - - name: Get pip cache dir - id: pip-cache-dir - run: | - echo "::set-output name=dir::$(pip cache dir)" - - - name: Cache pip dependencies - id: cache-dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.pip-cache-dir.outputs.dir }} - key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} - restore-keys: ${{ runner.os }}-pip- - - - name: Install Limited Python Deps for Build - run: | - pip install -r requirements/edx/assets.txt - - - name: Initiate Mongo DB Service - run: sudo systemctl start mongod - - - name: Add node_modules bin to $Path - run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH - - - name: Check Dev Assets Build - env: - COMPREHENSIVE_THEMES_DIR: ./themes - run: | - npm clean-install --dev - npm run build-dev - - - name: Check Prod Assets Build - env: - COMPREHENSIVE_THEMES_DIR: ./themes - run: | - npm clean-install - npm run build - - - name: Install Full Python Deps for Collection - run: | - pip install -r requirements/edx/base.txt -e . - - - name: Check Assets Collection - env: - LMS_CFG: lms/envs/minimal.yml - CMS_CFG: lms/envs/minimal.yml - DJANGO_SETTINGS_MODULE: lms.envs.production - run: | - ./manage.py lms collectstatic --noinput - ./manage.py cms collectstatic --noinput + - name: Checkout repo + uses: actions/checkout@v4 + + - name: Setup Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install system Packages + run: | + sudo apt-get update + sudo apt-get install libxmlsec1-dev pkg-config + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Setup npm + run: npm i -g npm@${{ matrix.npm-version }} + + - name: Get pip cache dir + id: pip-cache-dir + run: | + echo "::set-output name=dir::$(pip cache dir)" + + - name: Cache pip dependencies + id: cache-dependencies + uses: actions/cache@v4 + with: + path: ${{ steps.pip-cache-dir.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }} + restore-keys: ${{ runner.os }}-pip- + + - name: Install Limited Python Deps for Build + run: | + pip install -r requirements/edx/assets.txt + + - name: Initiate Mongo DB Service + run: sudo systemctl start mongod + + - name: Add node_modules bin to $Path + run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH + + - name: Check Dev Assets Build + env: + COMPREHENSIVE_THEMES_DIR: ./themes + run: | + npm clean-install --dev + npm run build-dev + + - name: Check Prod Assets Build + env: + COMPREHENSIVE_THEMES_DIR: ./themes + run: | + npm clean-install + npm run build + + - name: Install Full Python Deps for Collection + run: | + pip install -r requirements/edx/base.txt -e . + + - name: Check Assets Collection + env: + LMS_CFG: lms/envs/minimal.yml + CMS_CFG: lms/envs/minimal.yml + DJANGO_SETTINGS_MODULE: lms.envs.production + run: | + ./manage.py lms collectstatic --noinput + ./manage.py cms collectstatic --noinput diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7df346e65810..5eb1e468dd05 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -133,7 +133,7 @@ jobs: success: name: Unit tests successful runs-on: ubuntu-20.04 - needs: [ run-tests ] + needs: [run-tests] steps: - name: Decide whether the needed jobs succeeded or failed # uses: re-actors/alls-green@v1.2.1 @@ -143,7 +143,7 @@ jobs: compile-warnings-report: runs-on: ubuntu-20.04 - needs: [ run-tests ] + needs: [run-tests] steps: - uses: actions/checkout@v4 - name: collect pytest warnings files @@ -172,7 +172,7 @@ jobs: coverage: if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false)) runs-on: ubuntu-20.04 - needs: [ run-tests ] + needs: [run-tests] strategy: matrix: python-version: diff --git a/.github/workflows/units-test-scripts-structures-pruning.yml b/.github/workflows/units-test-scripts-structures-pruning.yml index 28476ecefdaf..cbf9da8f5c9f 100644 --- a/.github/workflows/units-test-scripts-structures-pruning.yml +++ b/.github/workflows/units-test-scripts-structures-pruning.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: python-version: - - '3.12' + - "3.12" steps: - name: Checkout code diff --git a/.github/workflows/units-test-scripts-user-retirement.yml b/.github/workflows/units-test-scripts-user-retirement.yml index a0f1d466c627..f1b2b2c539f6 100644 --- a/.github/workflows/units-test-scripts-user-retirement.yml +++ b/.github/workflows/units-test-scripts-user-retirement.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: python-version: - - '3.12' + - "3.12" steps: - name: Checkout code diff --git a/.github/workflows/update-geolite-database.yml b/.github/workflows/update-geolite-database.yml index 3289d31a2212..08716b8ad963 100644 --- a/.github/workflows/update-geolite-database.yml +++ b/.github/workflows/update-geolite-database.yml @@ -6,18 +6,18 @@ on: workflow_dispatch: inputs: branch: - description: 'Target branch against which to create PR' + description: "Target branch against which to create PR" required: false - default: 'master' + default: "master" env: - MAXMIND_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz' - MAXMIND_SHA256_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256' - TAR_FILE_NAME: 'GeoLite2-Country.tar.gz' - TAR_SHA256_FILE_NAME: 'GeoLite2-Country.tar.gz.sha256' - TAR_UNZIPPED_ROOT_PATTERN: 'GeoLite2-Country_*' - DB_FILE: 'GeoLite2-Country.mmdb' - DB_DESTINATION_PATH: 'common/static/data/geoip' + MAXMIND_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz" + MAXMIND_SHA256_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256" + TAR_FILE_NAME: "GeoLite2-Country.tar.gz" + TAR_SHA256_FILE_NAME: "GeoLite2-Country.tar.gz.sha256" + TAR_UNZIPPED_ROOT_PATTERN: "GeoLite2-Country_*" + DB_FILE: "GeoLite2-Country.mmdb" + DB_DESTINATION_PATH: "common/static/data/geoip" jobs: download-and-replace: diff --git a/.github/workflows/upgrade-one-python-dependency.yml b/.github/workflows/upgrade-one-python-dependency.yml index adb2d2742e14..6ca5dfcb355e 100644 --- a/.github/workflows/upgrade-one-python-dependency.yml +++ b/.github/workflows/upgrade-one-python-dependency.yml @@ -4,22 +4,22 @@ on: workflow_dispatch: inputs: branch: - description: 'Target branch to create requirements PR against' + description: "Target branch to create requirements PR against" required: true - default: 'master' + default: "master" type: string package: - description: 'Name of package to upgrade' + description: "Name of package to upgrade" required: true type: string version: - description: 'Version number to upgrade to in constraints.txt (only needed if pinned)' - default: '' + description: "Version number to upgrade to in constraints.txt (only needed if pinned)" + default: "" type: string change_desc: description: | Description of change, for commit message and PR. (What does the new version add or fix?) - default: '' + default: "" type: string defaults: diff --git a/.github/workflows/upgrade-python-requirements.yml b/.github/workflows/upgrade-python-requirements.yml index fcacf81929af..ed6caf7590fb 100644 --- a/.github/workflows/upgrade-python-requirements.yml +++ b/.github/workflows/upgrade-python-requirements.yml @@ -2,26 +2,25 @@ name: Upgrade Requirements on: schedule: - - cron: "0 2 * * 2" + - cron: "0 2 * * 2" workflow_dispatch: - inputs: - branch: - description: 'Target branch to create requirements PR against' - required: true - default: 'master' + inputs: + branch: + description: "Target branch to create requirements PR against" + required: true + default: "master" jobs: call-upgrade-python-requirements-workflow: # Don't run the weekly upgrade job on forks -- it will send a weekly failure email. if: github.repository == 'openedx/edx-platform' || github.event_name != 'schedule' uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master with: - branch: ${{ github.event.inputs.branch }} - team_reviewers: "arbi-bom" - email_address: arbi-bom@edx.org - send_success_notification: false + branch: ${{ github.event.inputs.branch }} + team_reviewers: "arbi-bom" + email_address: arbi-bom@edx.org + send_success_notification: false secrets: - requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} - requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} - edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }} - edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }} - + requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }} + requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }} + edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }} + edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }} diff --git a/.github/workflows/verify-dunder-init.yml b/.github/workflows/verify-dunder-init.yml index e2a7d58cd97b..611fc0afc6e3 100644 --- a/.github/workflows/verify-dunder-init.yml +++ b/.github/workflows/verify-dunder-init.yml @@ -6,21 +6,18 @@ on: - master jobs: - verify_dunder_init: - name: Verify __init__.py Files runs-on: ubuntu-20.04 steps: + - name: Check out branch + uses: actions/checkout@v4 - - name: Check out branch - uses: actions/checkout@v4 - - - name: Ensure git is installed - run: | - sudo apt-get update && sudo apt-get install git + - name: Ensure git is installed + run: | + sudo apt-get update && sudo apt-get install git - - name: Verify __init__.py files exist - run: | - scripts/verify-dunder-init.sh + - name: Verify __init__.py files exist + run: | + scripts/verify-dunder-init.sh From 53da6080977ec258984a5ea1cbd68860b2613301 Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sun, 26 May 2024 09:23:01 +0330 Subject: [PATCH 6/6] chore: sort entrypoints alphabetically --- setup.py | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index 4bbbe894fc77..bf662b563c7f 100644 --- a/setup.py +++ b/setup.py @@ -84,16 +84,16 @@ ], "openedx.course_app": [ "calculator = lms.djangoapps.courseware.plugins:CalculatorCourseApp", + "custom_pages = lms.djangoapps.courseware.plugins:CustomPagesCourseApp", "discussion = openedx.core.djangoapps.discussions.plugins:DiscussionCourseApp", "edxnotes = lms.djangoapps.edxnotes.plugins:EdxNotesCourseApp", + "live = openedx.core.djangoapps.course_live.plugins:LiveCourseApp", + "ora_settings = lms.djangoapps.courseware.plugins:ORASettingsApp", "proctoring = lms.djangoapps.courseware.plugins:ProctoringCourseApp", "progress = lms.djangoapps.courseware.plugins:ProgressCourseApp", "teams = lms.djangoapps.teams.plugins:TeamsCourseApp", "textbooks = lms.djangoapps.courseware.plugins:TextbooksCourseApp", "wiki = lms.djangoapps.course_wiki.plugins.course_app:WikiCourseApp", - "custom_pages = lms.djangoapps.courseware.plugins:CustomPagesCourseApp", - "live = openedx.core.djangoapps.course_live.plugins:LiveCourseApp", - "ora_settings = lms.djangoapps.courseware.plugins:ORASettingsApp", ], "openedx.course_tool": [ "calendar_sync_toggle = openedx.features.calendar_sync.plugins:CalendarSyncToggleTool", @@ -102,12 +102,12 @@ "financial_assistance = lms.djangoapps.courseware.course_tools:FinancialAssistanceTool", ], "openedx.user_partition_scheme": [ - "random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme", "cohort = openedx.core.djangoapps.course_groups.partition_scheme:CohortPartitionScheme", - "verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme", - "enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme", # lint-amnesty, pylint: disable=line-too-long "content_type_gate = openedx.features.content_type_gating.partitions:ContentTypeGatingPartitionScheme", + "enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme", # lint-amnesty, pylint: disable=line-too-long + "random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme", "team = lms.djangoapps.teams.team_partition_scheme:TeamPartitionScheme", + "verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme", ], "openedx.block_structure_transformer": [ "library_content = lms.djangoapps.course_blocks.transformers.library_content:ContentLibraryTransformer", @@ -135,11 +135,13 @@ "personalized_learner_schedules = openedx.features.personalized_learner_schedules.call_to_action:PersonalizedLearnerScheduleCallToAction" # lint-amnesty, pylint: disable=line-too-long ], "lms.djangoapp": [ - "announcements = openedx.features.announcements.apps:AnnouncementsConfig", "ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig", - "credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig", - "course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig", + "announcements = openedx.features.announcements.apps:AnnouncementsConfig", "content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig", + "course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig", + "course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig", + "courseware_api = openedx.core.djangoapps.courseware_api.apps:CoursewareAPIConfig", + "credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig", "discussion = lms.djangoapps.discussion.apps:DiscussionConfig", "discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig", "grades = lms.djangoapps.grades.apps:GradesConfig", @@ -151,15 +153,15 @@ "password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig", "user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig", "program_enrollments = lms.djangoapps.program_enrollments.apps:ProgramEnrollmentsConfig", - "courseware_api = openedx.core.djangoapps.courseware_api.apps:CoursewareAPIConfig", - "course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig", ], "cms.djangoapp": [ "announcements = openedx.features.announcements.apps:AnnouncementsConfig", "ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig", + "bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig", "course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig", "content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig", "content_staging = openedx.core.djangoapps.content_staging.apps:ContentStagingAppConfig", + "course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig", # Importing an LMS app into the Studio process is not a good # practice. We're ignoring this for Discussions here because its # placement in LMS is a historical artifact. The eventual goal is to @@ -167,22 +169,20 @@ # either put them in the openedx/ dir, or in another repo entirely. "discussion = lms.djangoapps.discussion.apps:DiscussionConfig", "discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig", + "instructor = lms.djangoapps.instructor.apps:InstructorConfig", "olx_rest_api = openedx.core.djangoapps.olx_rest_api.apps:OlxRestApiAppConfig", + "password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig", "plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig", "theming = openedx.core.djangoapps.theming.apps:ThemingConfig", - "bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig", - "zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig", - "password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig", "user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig", - "instructor = lms.djangoapps.instructor.apps:InstructorConfig", - "course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig", + "zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig", ], 'openedx.learning_context': [ 'lib = openedx.core.djangoapps.content_libraries.library_context:LibraryContextImpl', ], 'openedx.dynamic_partition_generator': [ - 'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long 'content_type_gating = openedx.features.content_type_gating.partitions:create_content_gating_partition', + 'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long 'team = openedx.core.lib.teams_config:create_team_set_partition', ], 'xblock.v1': XBLOCKS,