From c27d55a25383c08363671c2a847442b7a816b54c Mon Sep 17 00:00:00 2001 From: Emad Rad Date: Sat, 25 May 2024 18:05:28 +0330 Subject: [PATCH] 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 2ce9903b60..aca7318525 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.outline.views import ( 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 1df0610c78..7fbddadf38 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -290,7 +290,7 @@ FEATURES = { # 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 @@ FEATURES = { # .. 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 @@ FEATURES = { # .. 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 @@ FEATURES = { # .. 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 @@ FEATURES = { # .. 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 @@ MARKETING_EMAILS_OPT_IN = False # .. 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 @@ CONTEXT_PROCESSORS = [ # 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 @@ SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = False # .. 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 @@ CODE_JAIL = { # ] 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 @@ FINANCIAL_ASSISTANCE_MAX_LENGTH = 2500 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 149cf09821..43486ca024 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 82e9134f45..a2e3675b51 100644 --- a/lms/envs/devstack.py +++ b/lms/envs/devstack.py @@ -135,7 +135,7 @@ REQUIRE_DEBUG = DEBUG 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 449c7f5c72..4c865c629a 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 9c6b1d8992..b38c2d2886 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 014cf59aa3..84cbdc420e 100644 --- a/lms/envs/production.py +++ b/lms/envs/production.py @@ -143,8 +143,8 @@ if STATIC_URL_BASE: 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 @@ VIDEO_CDN_URL = ENV_TOKENS.get('VIDEO_CDN_URL', {}) # 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 @@ MODULESTORE = convert_module_store_setting_if_needed(AUTH_TOKENS.get('MODULESTOR # 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 57b6a10298..1b5ff23622 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 b36f15a1fd..1e4b87c4d8 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 8d275232ab..146846b15b 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 0ffb1aeb8e..b288c718c8 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 @@ class TestSafeSessionMiddleware(TestSafeSessionsLogMixin, CacheIsolationTestCase 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 @@ class TestSafeSessionMiddleware(TestSafeSessionsLogMixin, CacheIsolationTestCase 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 87fbc1aa6c..94ab6a513d 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 3ad2a2df86..7f476954c1 100644 --- a/openedx/core/lib/mobile_utils.py +++ b/openedx/core/lib/mobile_utils.py @@ -10,7 +10,7 @@ from django.conf import settings 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: