diff --git a/openedx_filters/course_authoring/filters.py b/openedx_filters/course_authoring/filters.py index fd8c42b2..2aa4af2d 100644 --- a/openedx_filters/course_authoring/filters.py +++ b/openedx_filters/course_authoring/filters.py @@ -7,15 +7,24 @@ class LMSPageURLRequested(OpenEdxPublicFilter): """ - Custom class used to get lms page url filters and its custom methods. + Filter used to modify the URL of the page requested by the user. + + Filter Type: + org.openedx.course_authoring.lms.page.url.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: cms/djangoapps/contentstore/asset_storage_handler.py + - Function: get_asset_json """ filter_type = "org.openedx.course_authoring.lms.page.url.requested.v1" @classmethod - def run_filter(cls, url, org): + def run_filter(cls, url: str, org: str) -> tuple[str, str]: """ - Execute a filter with the signature specified. + Process the input url and org using the configured pipeline steps to modify the URL of the page requested by the + user. Arguments: url (str): the URL of the page to be modified. diff --git a/openedx_filters/learning/filters.py b/openedx_filters/learning/filters.py index 9b4b79ca..8e700620 100644 --- a/openedx_filters/learning/filters.py +++ b/openedx_filters/learning/filters.py @@ -2,9 +2,11 @@ Package where filters related to the learning architectural subdomain are implemented. """ -from typing import Optional +from typing import Any, Optional from django.db.models.query import QuerySet +from django.http import HttpResponse +from opaque_keys.edx.keys import CourseKey from openedx_filters.exceptions import OpenEdxFilterException from openedx_filters.tooling import OpenEdxPublicFilter @@ -13,39 +15,62 @@ class AccountSettingsRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create Account settings filters. + Filter used to modify the rendering of the account settings page in the LMS, triggered when a user + visits the page. + + Filter Type: + org.openedx.learning.student.settings.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/user_api/accounts/settings_views.py + - Function or Method: account_settings + + Additional Information: + This filter doesn't work alongside the account MFE, only with the legacy account settings page. """ filter_type = "org.openedx.learning.student.settings.render.started.v1" class RedirectToPage(OpenEdxFilterException): """ - Custom class used to redirect before the account settings rendering process. + Raise to trigger a redirect before the account settings page is rendered. + + This exception is propagated to the account settings view and handled by the view to redirect the user to + a new page. """ - def __init__(self, message, redirect_to=""): + def __init__(self, message: str, redirect_to: str) -> None: """ - Override init that defines specific arguments used in the account settings render process. + Initialize the exception with the message and the URL to redirect to. Arguments: - message: error message for the exception. - redirect_to: URL to redirect to. + - message: error message for the exception. + - redirect_to: URL to redirect to. """ super().__init__(message, redirect_to=redirect_to) class RenderInvalidAccountSettings(OpenEdxFilterException): """ - Custom class used to stop the account settings rendering process. + Raise to render a different template instead of the account settings page. + + This exception is propagated to the account settings view and handled by the view to render a different + template instead. """ - def __init__(self, message, account_settings_template="", template_context=None): + def __init__( + self, + message: str, + account_settings_template: str = "", + template_context: Optional[dict] = None + ) -> None: """ - Override init that defines specific arguments used in the account settings render process. + Initialize the exception with the message and the template path to render instead. Arguments: - message: error message for the exception. - account_settings_template: template path rendered instead. - template_context: context used to the new account settings template. + - message: error message for the exception. + - account_settings_template: template path rendered instead. + - template_context: context used to the new account settings template. """ super().__init__( message, @@ -55,27 +80,35 @@ def __init__(self, message, account_settings_template="", template_context=None) class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the account settings rendering process and return a custom response. + Raise to return a custom response instead of the usual account settings page. + + This exception is propagated to the account settings view and handled by the view to return a custom response + instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: Optional[dict] = None) -> None: """ - Override init that defines specific arguments used in the account settings render process. + Initialize the exception with the message and the custom response to return. Arguments: - message: error message for the exception. - response: custom response which will be returned by the account settings view. + - message: error message for the exception. + - response: custom response which will be returned by the account settings view. """ super().__init__(message, response=response) @classmethod - def run_filter(cls, context, template_name): + def run_filter(cls, context: dict, template_name: str) -> tuple[dict, str]: """ - Execute a filter with the signature specified. + Process the input context and template_name using the configured pipeline steps to modify the account settings + page. Arguments: - context (dict): template context for the account settings page. - template_name (str): template path used to render the account settings page. + - context (dict): template context for the account settings page. + - template_name (str): template path used to render the account settings page. + + Returns: + - dict: context dictionary for the account settings page, possibly modified. + - str: template name to be rendered by the account settings page, possibly modified. """ data = super().run_pipeline(context=context, template_name=template_name) return data.get("context"), data.get("template_name") @@ -83,27 +116,45 @@ def run_filter(cls, context, template_name): class StudentRegistrationRequested(OpenEdxPublicFilter, SensitiveDataManagementMixin): """ - Custom class used to create registration filters and its custom methods. + Filter used to modify the registration process, triggered when a user begins registration in the LMS. + + Filter Type: + org.openedx.learning.student.registration.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/user_authn/views/register.py + - Function or Method: RegistrationView.post """ filter_type = "org.openedx.learning.student.registration.requested.v1" sensitive_form_data = [ - "password", "newpassword", "new_password", "oldpassword", "old_password", "new_password1", "new_password2", + "password", + "newpassword", + "new_password", + "oldpassword", + "old_password", + "new_password1", + "new_password2", ] class PreventRegistration(OpenEdxFilterException): """ - Custom class used to stop the registration process. + Raise to prevent the registration process to continue. + + This exception is propagated to the registration view and handled by the view to stop the registration process. """ @classmethod - def run_filter(cls, form_data): + def run_filter(cls, form_data: dict) -> dict: """ - Execute a filter with the signature specified. + Process the registration form data using the configured pipeline steps to modify the registration process. Arguments: - form_data (QueryDict): contains the request.data submitted by the registration - form. + - form_data (QueryDict): contains the request.data submitted by the registration form. + + Returns: + - dict: form data dictionary, possibly modified. """ sensitive_data = cls.extract_sensitive_data(form_data) data = super().run_pipeline(form_data=form_data) @@ -114,29 +165,54 @@ def run_filter(cls, form_data): class StudentLoginRequested(OpenEdxPublicFilter): """ - Custom class used to create login filters and its custom methods. + Filter used to modify the login process, triggered when a user logins. + + Filter Type: + org.openedx.learning.student.login.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/user_authn/views/login.py + - Function or Method: login_user """ filter_type = "org.openedx.learning.student.login.requested.v1" class PreventLogin(OpenEdxFilterException): """ - Custom class used to stop the login process. + Raise to prevent the login process to continue. + + This exception is propagated to the login view and handled by the view to stop the login process. """ - def __init__(self, message, redirect_to=None, error_code="", context=None): + def __init__( + self, + message: str, + redirect_to: str = "", + error_code: str = "", + context: dict = None + ) -> None: """ - Override init that defines specific arguments used in the login process. + Initialize the exception with the message and the URL to redirect to. + + Arguments: + - message: error message for the exception. + - redirect_to: URL to redirect to. + - error_code: error code for the exception. + - context: context dictionary to be used in the exception. """ super().__init__(message, redirect_to=redirect_to, error_code=error_code, context=context) @classmethod - def run_filter(cls, user): + def run_filter(cls, user: Any) -> Any: """ - Execute a filter with the signature specified. + Process the user object using the configured pipeline steps to modify the login process. Arguments: - user (User): is a Django User object. + - user (User): Django User object trying to log in. + + Returns: + - User: Django User object, possibly modified. """ data = super().run_pipeline(user=user) return data.get("user") @@ -144,25 +220,41 @@ def run_filter(cls, user): class CourseEnrollmentStarted(OpenEdxPublicFilter): """ - Custom class used to create enrollment filters and its custom methods. + Filter used to modify the course enrollment process, triggered when a user initiates the enrollment. + + Filter Type: + org.openedx.learning.course.enrollment.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: common/djangoapps/student/models/course_enrollment.py + - Function or Method: enroll """ filter_type = "org.openedx.learning.course.enrollment.started.v1" class PreventEnrollment(OpenEdxFilterException): """ - Custom class used to stop the enrollment process. + Raise to prevent the enrollment process to continue. + + This exception is propagated to the course enrollment model and handled by the model to stop the enrollment + process. All components using the enroll method handle this exception in the appropriate way. """ @classmethod - def run_filter(cls, user, course_key, mode): + def run_filter(cls, user: Any, course_key: CourseKey, mode: str) -> tuple[Any, CourseKey, str]: """ - Execute a filter with the signature specified. + Process the user, course_key, and mode using the configured pipeline steps to modify the enrollment process. Arguments: - user (User): is a Django User object. - course_key (CourseKey): course key associated with the enrollment. - mode (str): is a string specifying what kind of enrollment. + - user (User): Django User enrolling in the course. + - course_key (CourseKey): course key associated with the enrollment. + - mode (str): specifies what kind of enrollment. + + Returns: + - User: Django User object. + - CourseKey: course key associated with the enrollment. + - str: mode of the enrollment. """ data = super().run_pipeline( user=user, course_key=course_key, mode=mode, @@ -172,23 +264,37 @@ def run_filter(cls, user, course_key, mode): class CourseUnenrollmentStarted(OpenEdxPublicFilter): """ - Custom class used to create unenrollment filters and its custom methods. + Filter used to modify the course unenrollment process, triggered when a user initiates the unenrollment. + + Filter Type: + org.openedx.learning.course.unenrollment.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: common/djangoapps/student/models/course_enrollment.py + - Function or Method: unenroll """ filter_type = "org.openedx.learning.course.unenrollment.started.v1" class PreventUnenrollment(OpenEdxFilterException): """ - Custom class used to stop the unenrollment process. + Raised to prevent the unenrollment process to continue. + + This exception is propagated to the course enrollment model and handled by the model to stop the unenrollment + process. All components using the unenroll method handle this exception in the appropriate way. """ @classmethod - def run_filter(cls, enrollment): + def run_filter(cls, enrollment: Any) -> Any: """ - Execute a filter with the signature specified. + Process the enrollment object using the configured pipeline steps to modify the unenrollment process. Arguments: - enrollment (CourseEnrollment): edxapp object representing course enrollments. + - enrollment (CourseEnrollment): user's enrollment in the course. + + Returns: + - CourseEnrollment: user's enrollment in the course. """ data = super().run_pipeline(enrollment=enrollment) return data.get("enrollment") @@ -196,32 +302,60 @@ def run_filter(cls, enrollment): class CertificateCreationRequested(OpenEdxPublicFilter): """ - Custom class used to create certificate creation filters and its custom methods. + Filter used to modify the certificate creation process, triggered when a certificate starts to be generated. + + Usage: + - Modify certificate parameters in runtime. + - Stop the certificate creation given a specific condition. + - Etc. + + Filter Type: + org.openedx.learning.certificate.creation.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/certificates/generated_certificate.py + - Function or Method: _generate_certificate_task """ filter_type = "org.openedx.learning.certificate.creation.requested.v1" class PreventCertificateCreation(OpenEdxFilterException): """ - Custom class used to stop the certificate creation process. + Raise to prevent the certificate creation process to continue. + + This exception is propagated from the certificate generation function and handled by the caller to stop the + certificate creation process before starting the async task. """ @classmethod - def run_filter(cls, user, course_key, mode, status, grade, generation_mode): - """ - Execute a filter with the signature specified. + def run_filter( + cls: type, + user: Any, + course_key: CourseKey, + mode: str, + status: str, + grade: float, + generation_mode: str, + ) -> tuple[Any, CourseKey, str, str, float, str]: + """ + Process the user, course_key, mode, status, grade, and generation_mode using the configured pipeline steps to Arguments: - user (User): is a Django User object. - course_key (CourseKey): course key associated with the certificate. - mode (str): mode of the certificate. - status (str): status of the certificate. - grade (CourseGrade): user's grade in this course run. - generation_mode (str): Options are "self" (implying the user generated the cert themself) and "batch" - for everything else. + - user (User): Django User object. + - course_key (CourseKey): course key associated with the certificate. + - mode (str): specifies what kind of certificate. + - status (str): specifies the status of the certificate. + - grade (float): grade of the certificate. + - generation_mode (str): specifies the mode of generation. """ data = super().run_pipeline( - user=user, course_key=course_key, mode=mode, status=status, grade=grade, generation_mode=generation_mode, + user=user, + course_key=course_key, + mode=mode, + status=status, + grade=grade, + generation_mode=generation_mode, ) return ( data.get("user"), @@ -235,53 +369,69 @@ def run_filter(cls, user, course_key, mode, status, grade, generation_mode): class CertificateRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create certificate render filters and its custom methods. + Filter used to modify the certificate rendering process, triggered when a user begins rendering a certificate. + + Filter Type: + org.openedx.learning.certificate.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/certificates/views/webview.py + - Function or Method: render_html_view """ filter_type = "org.openedx.learning.certificate.render.started.v1" class RedirectToPage(OpenEdxFilterException): """ - Custom class used to stop the certificate rendering process. + Raise to redirect to a different page instead of rendering the certificate. + + This exception is propagated to the certificate view and handled by the view to redirect the user to a new page. """ - def __init__(self, message, redirect_to=""): + def __init__(self, message: str, redirect_to: str = "") -> None: """ - Override init that defines specific arguments used in the certificate render process. + Initialize the exception with the message and the URL to redirect to. Arguments: - message: error message for the exception. - redirect_to: URL to redirect to. + - message: error message for the exception. + - redirect_to: URL to redirect to. """ super().__init__(message, redirect_to=redirect_to) class RenderAlternativeInvalidCertificate(OpenEdxFilterException): """ - Custom class used to stop the certificate rendering process. + Raise to render a different certificate template instead of the default one. + + This exception is propagated to the certificate view and handled by the view to render a different template + instead. """ - def __init__(self, message, template_name=""): + def __init__(self, message: str, template_name: str = "") -> None: """ - Override init that defines specific arguments used in the certificate render process. + Initialize the exception with the message and the template path to render instead. Arguments: - message: error message for the exception. - template_name: template path of the new certificate. + - message: error message for the exception. + - template_name: template path of the new certificate. """ super().__init__(message, template_name=template_name) class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the certificate rendering process. + Raise to stop the certificate rendering process and return a custom response. + + This exception is propagated to the certificate view and handled by the view to return a custom response + instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: HttpResponse) -> None: """ - Override init that defines specific arguments used in the certificate render process. + Initialize the exception with the message and the custom response to return. Arguments: - message: error message for the exception. - response: custom response which will be returned by the certificate view. + - message: error message for the exception. + - response: custom response which will be returned by the certificate view. """ super().__init__( message, @@ -289,14 +439,13 @@ def __init__(self, message, response=None): ) @classmethod - def run_filter(cls, context, custom_template): + def run_filter(cls, context: dict, custom_template: Any) -> tuple[dict, Any]: """ - Execute a filter with the signature specified. + Process the context and custom_template using the configured pipeline steps to modify the certificate rendering. Arguments: - context (dict): context dictionary for certificate template. - custom_template (CertificateTemplate): edxapp object representing custom web - certificate template. + - context (dict): context dictionary for certificate template. + - custom_template (CertificateTemplate): custom web certificate template. """ data = super().run_pipeline(context=context, custom_template=custom_template) return data.get("context"), data.get("custom_template") @@ -304,25 +453,35 @@ def run_filter(cls, context, custom_template): class CohortChangeRequested(OpenEdxPublicFilter): """ - Custom class used to create cohort change filters and its custom methods. + Filter used to modify the cohort change process, triggered when a user changes cohorts. + + Filter Type: + org.openedx.learning.cohort.change.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/course_groups/models.py + - Function or Method: assign """ filter_type = "org.openedx.learning.cohort.change.requested.v1" class PreventCohortChange(OpenEdxFilterException): """ - Custom class used to stop the cohort change process. + Raise to prevent the cohort change process to continue. + + This exception is propagated to the assign method and handled by it to stop the cohort change process. """ @classmethod - def run_filter(cls, current_membership, target_cohort): + def run_filter(cls, current_membership: Any, target_cohort: Any) -> tuple[Any, Any]: """ - Execute a filter with the signature specified. + Process the current_membership and target_cohort using the configured pipeline steps to modify the cohort + change process. Arguments: - current_membership (CohortMembership): edxapp object representing the user's cohort - current membership object. - target_cohort (CourseUserGroup): edxapp object representing the new user's cohort. + - current_membership (CohortMembership): CohortMembership instance representing the current user's cohort. + - target_cohort (CourseUserGroup): CourseUserGroup instance representing the new user's cohort. """ data = super().run_pipeline(current_membership=current_membership, target_cohort=target_cohort) return data.get("current_membership"), data.get("target_cohort") @@ -330,24 +489,34 @@ def run_filter(cls, current_membership, target_cohort): class CohortAssignmentRequested(OpenEdxPublicFilter): """ - Custom class used to create cohort assignment filters and its custom methods. + Filter used to modify the cohort assignment process, triggered when a user is assigned to a new cohort. + + Filter Type: + org.openedx.learning.cohort.assignment.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/course_groups/models.py + - Function or Method: assign """ filter_type = "org.openedx.learning.cohort.assignment.requested.v1" class PreventCohortAssignment(OpenEdxFilterException): """ - Custom class used to stop the cohort assignment process. + Raise to prevent the cohort assignment process to continue. + + This exception is propagated to the assign method and handled by it to stop the cohort assignment process. """ @classmethod - def run_filter(cls, user, target_cohort): + def run_filter(cls, user: Any, target_cohort: Any) -> tuple[Any, Any]: """ - Execute a filter with the signature specified. + Process the user and target_cohort using the configured pipeline steps to modify the cohort assignment process. Arguments: - user (User): is a Django User object to be added in the cohort. - target_cohort (CourseUserGroup): edxapp object representing the new user's cohort. + - user (User): Django User object representing the new user. + - target_cohort (CourseUserGroup): CourseUserGroup instance representing the new user's cohort. """ data = super().run_pipeline(user=user, target_cohort=target_cohort) return data.get("user"), data.get("target_cohort") @@ -355,39 +524,54 @@ def run_filter(cls, user, target_cohort): class CourseAboutRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create course about render filters and its custom methods. + Filter used to modify the course about rendering process, triggered when a user requests to view the course about + page. + + Filter Type: + org.openedx.learning.course_about.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/courseware/views/views.py + - Function or Method: course_about """ filter_type = "org.openedx.learning.course_about.render.started.v1" class RedirectToPage(OpenEdxFilterException): """ - Custom class used to stop the course about rendering process. + Raise to redirect to a different page instead of rendering the course about. + + This exception is propagated to the course about view and handled by the view to redirect the user to a new + page. """ - def __init__(self, message, redirect_to=""): + def __init__(self, message: str, redirect_to: str = "") -> None: """ - Override init that defines specific arguments used in the course about render process. + Initialize the exception with the message and the URL to redirect to. Arguments: - message: error message for the exception. - redirect_to: URL to redirect to. + - message: error message for the exception. + - redirect_to: URL to redirect to. """ super().__init__(message, redirect_to=redirect_to) class RenderInvalidCourseAbout(OpenEdxFilterException): """ - Custom class used to stop the course about rendering process. + Raise to render a different course about template instead of the default one. + + This exception is propagated to the course about view and handled by the view to render a different template + instead. """ - def __init__(self, message, course_about_template="", template_context=None): + def __init__(self, message: str, course_about_template: str = "", template_context: dict = None) -> None: """ - Override init that defines specific arguments used in the course about render process. + Initialize the exception with the message and the template to render instead. Arguments: - message: error message for the exception. - course_about_template: template path rendered instead. - template_context: context used to the new course_about_template. + - message: error message for the exception. + - course_about_template: template path rendered instead. + - template_context: context used to the new course_about_template. """ super().__init__( message, @@ -397,16 +581,19 @@ def __init__(self, message, course_about_template="", template_context=None): class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the course about rendering process. + Raise to stop the course about rendering process and return a custom response. + + This exception is propagated to the course about view and handled by the view to return a custom response + instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: HttpResponse) -> None: """ - Override init that defines specific arguments used in the course about render process. + Initialize the exception with the message and the custom response to return. Arguments: - message: error message for the exception. - response: custom response which will be returned by the course about view. + - message: error message for the exception. + - response: custom response which will be returned by the course about view. """ super().__init__( message, @@ -414,13 +601,13 @@ def __init__(self, message, response=None): ) @classmethod - def run_filter(cls, context, template_name): + def run_filter(cls, context: dict, template_name: str) -> tuple[dict, str]: """ - Execute a filter with the signature specified. + Process the context and template_name using the configured pipeline steps to modify the course about rendering. Arguments: - context (dict): context dictionary for course about template. - template_name (str): template name to be rendered by the course about. + - context (dict): context dictionary for course about template. + - template_name (str): template name to be rendered by the course about. """ data = super().run_pipeline(context=context, template_name=template_name) return data.get("context"), data.get("template_name") @@ -428,39 +615,54 @@ def run_filter(cls, context, template_name): class DashboardRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create dashboard render filters and its custom methods. + Filter used to modify the dashboard rendering process, triggered when a user requests to view the student dashboard. + + Filter Type: + org.openedx.learning.dashboard.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: common/djangoapps/student/views/dashboard.py + - Function or Method: student_dashboard + + Additional Information: + This filter doesn't work alongside the dashboard MFE, only with the legacy student dashboard. """ filter_type = "org.openedx.learning.dashboard.render.started.v1" class RedirectToPage(OpenEdxFilterException): """ - Custom class used to stop the dashboard rendering process. + Raise to redirect to a different page instead of rendering the dashboard. + + This exception is propagated to the dashboard view and handled by the view to redirect the user to a new page. """ - def __init__(self, message, redirect_to=""): + def __init__(self, message: str, redirect_to: str = "") -> None: """ - Override init that defines specific arguments used in the dashboard render process. + Initialize the exception with the message and the URL to redirect to. Arguments: - message: error message for the exception. - redirect_to: URL to redirect to. + - message: error message for the exception. + - redirect_to: URL to redirect to. """ super().__init__(message, redirect_to=redirect_to) class RenderInvalidDashboard(OpenEdxFilterException): """ - Custom class used to stop the dashboard render process. + Raise to render a different dashboard template instead of the default one. + + This exception is propagated to the dashboard view and handled by the view to render a different template """ - def __init__(self, message, dashboard_template="", template_context=None): + def __init__(self, message: str, dashboard_template: str = "", template_context: dict = None) -> None: """ - Override init that defines specific arguments used in the dashboard render process. + Initialize the exception with the message and the template to render instead. Arguments: - message: error message for the exception. - dashboard_template: template path rendered instead. - template_context: context used to the new dashboard_template. + - message: error message for the exception. + - dashboard_template: template path rendered instead. + - template_context: context used to the new dashboard_template. """ super().__init__( message, @@ -470,16 +672,18 @@ def __init__(self, message, dashboard_template="", template_context=None): class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the dashboard rendering process. + Raise to stop the dashboard rendering process and return a custom response. + + This exception is propagated to the dashboard view and handled by the view to return a custom response instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: HttpResponse = None) -> None: """ - Override init that defines specific arguments used in the dashboard render process. + Initialize the exception with the message and the custom response to return. Arguments: - message: error message for the exception. - response: custom response which will be returned by the dashboard view. + - message: error message for the exception. + - response: custom response which will be returned by the dashboard view. """ super().__init__( message, @@ -487,13 +691,13 @@ def __init__(self, message, response=None): ) @classmethod - def run_filter(cls, context, template_name): + def run_filter(cls, context: dict, template_name: str) -> tuple[dict, str]: """ - Execute a filter with the signature specified. + Process the context and template_name using the configured pipeline steps to modify the dashboard rendering. Arguments: - context (dict): context dictionary for student's dashboard template. - template_name (str): template name to be rendered by the student's dashboard. + - context (dict): context dictionary for student's dashboard template. + - template_name (str): template name to be rendered by the student's dashboard. """ data = super().run_pipeline(context=context, template_name=template_name) return data.get("context"), data.get("template_name") @@ -501,24 +705,36 @@ def run_filter(cls, context, template_name): class VerticalBlockChildRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create vertical block children's render filters. + Filter used to modify the rendering of a child block within a vertical block, triggered when a child block starts + rendering. + + Filter Type: + org.openedx.learning.vertical_block_child.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: xmodule/vertical_block.py + - Function or Method: VerticalBlock._student_or_public_view """ filter_type = "org.openedx.learning.vertical_block_child.render.started.v1" class PreventChildBlockRender(OpenEdxFilterException): """ - Custom class used to stop a particular child block from being rendered. + Raise to prevent a child block from rendering. + + This exception is propagated to the vertical block view and handled by the view to stop the rendering of the + child block. """ @classmethod - def run_filter(cls, block, context): + def run_filter(cls, block: Any, context: dict) -> tuple[Any, dict]: """ - Execute a filter with the signature specified. + Process the block and context using the configured pipeline steps to modify the rendering of a child block. Arguments: - block (XBlock): the XBlock that is about to be rendered into HTML - context (dict): rendering context values like is_mobile_app, show_title..etc + - block (XBlock): the XBlock that is about to be rendered into HTML + - context (dict): rendering context values like is_mobile_app, show_title..etc """ data = super().run_pipeline(block=block, context=context) return data.get("block"), data.get("context") @@ -526,23 +742,32 @@ def run_filter(cls, block, context): class CourseEnrollmentQuerysetRequested(OpenEdxPublicFilter): """ - Custom class used to create course enrollments queryset filters and its custom methods. + Filter used to modify the QuerySet of course enrollments. + + Filter Type: + org.openedx.learning.course_enrollment_queryset.requested.v1 + + Trigger: NA + + Additional Information: + This filter is not currently triggered by any specific function or method in any codebase. It should be + marked to be removed if it's not used. See openedx-filters#245 for more information. """ filter_type = "org.openedx.learning.course_enrollment_queryset.requested.v1" class PreventEnrollmentQuerysetRequest(OpenEdxFilterException): """ - Custom class used to stop the course enrollment queryset request process. + Raise to prevent the course enrollment queryset request to continue. """ @classmethod - def run_filter(cls, enrollments): + def run_filter(cls, enrollments: QuerySet) -> QuerySet: """ - Execute a filter with the signature specified. + Process the enrollments QuerySet using the configured pipeline steps to modify the course enrollment data. Arguments: - enrollments (QuerySet): data with all user's course enrollments + - enrollments (QuerySet): data with all user's course enrollments """ data = super().run_pipeline(enrollments=enrollments) return data.get("enrollments") @@ -551,23 +776,37 @@ def run_filter(cls, enrollments): class RenderXBlockStarted(OpenEdxPublicFilter): """ Filter in between context generation and rendering of XBlock scope. + + Filter Type: + org.openedx.learning.xblock.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/courseware/views/views.py + - Function or Method: render_xblock """ filter_type = "org.openedx.learning.xblock.render.started.v1" class PreventXBlockBlockRender(OpenEdxFilterException): """ - Custom class used to prevent the XBlock from rendering for the user. + Raise to prevent the XBlock from rendering for the user. + + This exception is propagated to the XBlock render view and handled by the view to stop the rendering of the + XBlock. """ class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the XBlock rendering process and return a custom response. + Raise to stop the XBlock rendering process by returning a custom response. + + This exception is propagated to the XBlock render view and handled by the view to return a custom response + instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: HttpResponse = None): """ - Override init that defines specific arguments used in the XBlock render process. + Initialize the exception with the message and the custom response to return. Arguments: message: error message for the exception. @@ -576,13 +815,14 @@ def __init__(self, message, response=None): super().__init__(message, response=response) @classmethod - def run_filter(cls, context, student_view_context): + def run_filter(cls, context: dict, student_view_context: dict): """ - Execute a filter with the specified signature. + Process the context and student_view_context using the configured pipeline steps to modify the rendering of an + XBlock. Arguments: - context (dict): rendering context values like is_mobile_app, show_title, etc. - student_view_context (dict): context passed to the student_view of the block context + - context (dict): rendering context values like is_mobile_app, show_title, etc. + - student_view_context (dict): context passed to the student_view of the block context """ data = super().run_pipeline(context=context, student_view_context=student_view_context) return data.get("context"), data.get("student_view_context") @@ -590,26 +830,38 @@ def run_filter(cls, context, student_view_context): class VerticalBlockRenderCompleted(OpenEdxPublicFilter): """ - Custom class used to create filters to act on vertical block rendering completed. + Filter used to act on vertical block rendering completed. + + Filter Type: + org.openedx.learning.vertical_block.render.completed.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: xmodule/vertical_block.py + - Function or Method: VerticalBlock._student_or_public_view """ filter_type = "org.openedx.learning.vertical_block.render.completed.v1" class PreventVerticalBlockRender(OpenEdxFilterException): """ - Custom class used to prevent the vertical block from rendering for the user. + Raise to prevent the vertical block from rendering for the user. + + This exception is propagated to the vertical block view and handled by the view to stop the rendering of the + vertical block. """ @classmethod - def run_filter(cls, block, fragment, context, view): + def run_filter(cls, block: Any, fragment: Any, context: dict, view: str) -> tuple[Any, Any, dict, str]: """ - Execute a filter with the specified signature. + Process the block, fragment, context, and view using the configured pipeline steps to modify the rendering of a + vertical block. Arguments: - block (VerticalBlock): The VeriticalBlock instance which is being rendered - fragment (web_fragments.Fragment): The web-fragment containing the rendered content of VerticalBlock - context (dict): rendering context values like is_mobile_app, show_title..etc., - view (str): the rendering view. Can be either 'student_view', or 'public_view' + - block (VerticalBlock): The VeriticalBlock instance which is being rendered. + - fragment (web_fragments.Fragment): The web-fragment containing the rendered content of VerticalBlock. + - context (dict): rendering context values like is_mobile_app, show_title..etc. + - view (str): the rendering view. Can be either 'student_view', or 'public_view'. """ data = super().run_pipeline(block=block, fragment=fragment, context=context, view=view) return data.get("block"), data.get("fragment"), data.get("context"), data.get("view") @@ -617,15 +869,23 @@ def run_filter(cls, block, fragment, context, view): class CourseHomeUrlCreationStarted(OpenEdxPublicFilter): """ - Custom class used to create filters to act on course home url creation. + Filter used to modify the course home url creation process. + + Filter Type: + org.openedx.learning.course.homepage.url.creation.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/features/course_experience/__init__.py + - Function or Method: course_home_url """ filter_type = "org.openedx.learning.course.homepage.url.creation.started.v1" @classmethod - def run_filter(cls, course_key, course_home_url): + def run_filter(cls, course_key: CourseKey, course_home_url: str) -> tuple[CourseKey, str]: """ - Execute a filter with the specified signature. + Process the course_key and course_home_url using the configured pipeline steps to modify the course home url. Arguments: course_key (CourseKey): The course key for which the home url is being requested. @@ -637,15 +897,24 @@ def run_filter(cls, course_key, course_home_url): class CourseEnrollmentAPIRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create filters for enrollment data. + Filter used to modify the course enrollment API rendering process. + + Filter Type: + org.openedx.learning.home.enrollment.api.rendered.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/learner_home/serializers.py + - Function or Method: EnrollmentSerializer.to_representation """ filter_type = "org.openedx.learning.home.enrollment.api.rendered.v1" @classmethod - def run_filter(cls, course_key, serialized_enrollment): + def run_filter(cls, course_key: CourseKey, serialized_enrollment: dict) -> tuple[CourseKey, dict]: """ - Execute a filter with the specified signature. + Process the course_key and serialized_enrollment using the configured pipeline steps to modify the course + enrollment data. Arguments: course_key (CourseKey): The course key for which isStarted is being modify. @@ -657,18 +926,26 @@ def run_filter(cls, course_key, serialized_enrollment): class CourseRunAPIRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create filters for course run data. + Filter used to modify the course run API rendering process. + + Filter Type: + org.openedx.learning.home.courserun.api.rendered.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/learner_home/serializers.py + - Function or Method: CourseRunSerializer.to_representation """ filter_type = "org.openedx.learning.home.courserun.api.rendered.started.v1" @classmethod - def run_filter(cls, serialized_courserun): + def run_filter(cls, serialized_courserun: dict) -> dict: """ - Execute a filter with the specified signature. + Process the serialized_courserun using the configured pipeline steps to modify the course run data. Arguments: - serialized_courserun (dict): courserun data + serialized_courserun (dict): courserun data. """ data = super().run_pipeline(serialized_courserun=serialized_courserun) return data.get("serialized_courserun") @@ -676,39 +953,53 @@ def run_filter(cls, serialized_courserun): class InstructorDashboardRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create instructor dashboard filters and its custom methods. + Filter used to modify the instructor dashboard rendering process. + + Filter Type: + org.openedx.learning.instructor.dashboard.render.started.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/instructor/views/instructor_dashboard.py + - Function or Method: instructor_dashboard_2 """ filter_type = "org.openedx.learning.instructor.dashboard.render.started.v1" class RedirectToPage(OpenEdxFilterException): """ - Custom class used to stop the instructor dashboard render by redirecting to a new page. + Raise to redirect to a different page instead of rendering the instructor dashboard. + + This exception is propagated to the instructor dashboard view and handled by the view to redirect the user to a + new page. """ - def __init__(self, message, redirect_to=""): + def __init__(self, message: str, redirect_to: str = ""): """ - Override init that defines specific arguments used in the instructor dashboard render process. + Initialize the exception with the message and the URL to redirect to. Arguments: - message: error message for the exception. - redirect_to: URL to redirect to. + - message: error message for the exception. + - redirect_to: URL to redirect to. """ super().__init__(message, redirect_to=redirect_to) class RenderInvalidDashboard(OpenEdxFilterException): """ - Custom class used to render a custom template instead of the instructor dashboard. + Raise to render a different instructor dashboard template instead of the default one. + + This exception is propagated to the instructor dashboard view and handled by the view to render a different + template instead. """ - def __init__(self, message, instructor_template="", template_context=None): + def __init__(self, message: str, instructor_template: str = "", template_context: dict = None): """ - Override init that defines specific arguments used in the instructor dashboard render process. + Initialize the exception with the message and the template to render instead. Arguments: - message: error message for the exception. - instructor_template: template path rendered instead. - template_context: context used to the new instructor_template. + - message: error message for the exception. + - instructor_template: template path rendered instead. + - template_context: context used to the new instructor_template. """ super().__init__( message, @@ -718,16 +1009,19 @@ def __init__(self, message, instructor_template="", template_context=None): class RenderCustomResponse(OpenEdxFilterException): """ - Custom class used to stop the instructor dashboard rendering by returning a custom response. + Raise to stop the instructor dashboard rendering process and return a custom response. + + This exception is propagated to the instructor dashboard view and handled by the view to return a custom + response instead. """ - def __init__(self, message, response=None): + def __init__(self, message: str, response: HttpResponse = None): """ - Override init that defines specific arguments used in the instructor dashboard render process. + Initialize the exception with the message and the custom response to return. Arguments: - message: error message for the exception. - response: custom response which will be returned by the dashboard view. + - message: error message for the exception. + - response: custom response which will be returned by the dashboard view. """ super().__init__( message, @@ -735,13 +1029,16 @@ def __init__(self, message, response=None): ) @classmethod - def run_filter(cls, context, template_name): + def run_filter(cls, context: dict, template_name: str) -> tuple[dict, str]: """ - Execute a filter with the signature specified. + Process the context and template_name using the configured pipeline steps to modify the instructor dashboard. Arguments: - context (dict): context dictionary for instructor's tab template. - template_name (str): template name to be rendered by the instructor's tab. + - context (dict): context dictionary for instructor's tab template. + - template_name (str): template name to be rendered by the instructor's tab. + + Returns: + - tuple: context dictionary and template name. """ data = super().run_pipeline(context=context, template_name=template_name) return data.get("context"), data.get("template_name") @@ -749,31 +1046,42 @@ def run_filter(cls, context, template_name): class ORASubmissionViewRenderStarted(OpenEdxPublicFilter): """ - Custom class used to create ORA submission view filters and its custom methods. + Filter used to modify the submission view rendering process. + + Filter Type: + org.openedx.learning.ora.submission_view.render.started.v1 + + Trigger: + - Repository: openedx/edx-ora2 + - Path: openassessment/xblock/ui_mixins/legacy/views/submission.py + - Function or Method: render_submission """ filter_type = "org.openedx.learning.ora.submission_view.render.started.v1" class RenderInvalidTemplate(OpenEdxFilterException): """ - Custom class used to stop the submission view render process. + Raise to render a different submission view template instead of the default one. + + This exception is propagated to the submission view and handled by the view to render a different template + instead. """ - def __init__(self, message: str, context: Optional[dict] = None, template_name: str = ""): + def __init__(self, message: str, context: Optional[dict] = None, template_name: str = "") -> None: """ - Override init that defines specific arguments used in the submission view render process. + Initialize the exception with the message and the template to render instead. Arguments: - message (str): error message for the exception. - context (dict): context used to the submission view template. - template_name (str): template path rendered instead. + - message (str): error message for the exception. + - context (dict): context used to the submission view template. + - template_name (str): template path rendered instead. """ super().__init__(message, context=context, template_name=template_name) @classmethod - def run_filter(cls, context: dict, template_name: str): + def run_filter(cls, context: dict, template_name: str) -> tuple[dict, str]: """ - Execute a filter with the signature specified. + Process the context and template_name using the configured pipeline steps to modify the submission view. Arguments: context (dict): context dictionary for submission view template. @@ -785,18 +1093,26 @@ def run_filter(cls, context: dict, template_name: str): class IDVPageURLRequested(OpenEdxPublicFilter): """ - Custom class used to create filters to act on ID verification page URL requests. + Filter used to act on ID verification page URL requests. + + Filter Type: + org.openedx.learning.idv.page.url.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: lms/djangoapps/verify_student/services.py + - Function or Method: XBlockVerificationService.get_verify_location """ filter_type = "org.openedx.learning.idv.page.url.requested.v1" @classmethod - def run_filter(cls, url: str): + def run_filter(cls, url: str) -> str: """ - Execute a filter with the specified signature. + Process the URL using the configured pipeline steps to modify the ID verification page URL. Arguments: - url (str): The url for the ID verification page to be modified. + - url (str): The url for the ID verification page to be modified. """ data = super().run_pipeline(url=url) return data.get("url") @@ -804,19 +1120,19 @@ def run_filter(cls, url: str): class CourseAboutPageURLRequested(OpenEdxPublicFilter): """ - Custom class used to get course about page url filters and its custom methods. + Filter used to act on course about page URL requests. """ filter_type = "org.openedx.learning.course_about.page.url.requested.v1" @classmethod - def run_filter(cls, url, org): + def run_filter(cls, url: str, org: str) -> tuple[str, str]: """ - Execute a filter with the specified signature. + Process the URL and org using the configured pipeline steps to modify the course about page URL. Arguments: - url (str): the URL of the page to be modified. - org (str): Course org filter used as context data to get LMS configurations. + - url (str): the URL of the page to be modified. + - org (str): Course org filter used as context data to get LMS configurations. """ data = super().run_pipeline(url=url, org=org) return data.get("url"), data.get("org") @@ -824,11 +1140,19 @@ def run_filter(cls, url, org): class ScheduleQuerySetRequested(OpenEdxPublicFilter): """ - Filter class designed to apply additional filtering to a given QuerySet of Schedules. + Filter used to apply additional filtering to a given QuerySet of Schedules. If you want to know more about the Schedules feature, please refer: - - https://github.com/openedx/edx-platform/tree/master/openedx/core/djangoapps/schedules#readme - - https://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/manage_live_course/automatic_email.html + - https://github.com/openedx/edx-platform/tree/master/openedx/core/djangoapps/schedules#readme + - https://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/manage_live_course/automatic_email.html + + Filter Type: + org.openedx.learning.schedule.queryset.requested.v1 + + Trigger: + - Repository: openedx/edx-platform + - Path: openedx/core/djangoapps/schedules/resolvers.py + - Function or Method: BinnedSchedulesBaseResolver.get_schedules_with_target_date_by_bin_and_orgs """ filter_type = "org.openedx.learning.schedule.queryset.requested.v1" @@ -836,17 +1160,13 @@ class ScheduleQuerySetRequested(OpenEdxPublicFilter): @classmethod def run_filter(cls, schedules: QuerySet) -> QuerySet: """ - Execute the filtering logic for the given QuerySet of schedules. - - This method processes the input QuerySet using the configured pipeline steps - to applies additional filtering rules. It returns the filtered QuerySet for - further processing. + Process the schedules QuerySet using the configured pipeline steps to modify the schedules data. Arguments: - schedules (QuerySet): The original QuerySet of schedules to be filtered. + - schedules (QuerySet): The original QuerySet of schedules to be filtered. Returns: - QuerySet: A refined QuerySet of schedules after applying the filter. + - QuerySet: A refined QuerySet of schedules after applying the filter. """ data = super().run_pipeline(schedules=schedules) return data.get("schedules") diff --git a/requirements/base.in b/requirements/base.in index 5742db52..7ef98f4f 100644 --- a/requirements/base.in +++ b/requirements/base.in @@ -2,4 +2,4 @@ -c constraints.txt django - +edx-opaque-keys[django] diff --git a/requirements/base.txt b/requirements/base.txt index 187925c8..d49dc21f 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -10,5 +10,17 @@ django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.in +dnspython==2.7.0 + # via pymongo +edx-opaque-keys[django]==2.11.0 + # via -r requirements/base.in +pbr==6.1.0 + # via stevedore +pymongo==4.10.1 + # via edx-opaque-keys sqlparse==0.5.3 # via django +stevedore==5.4.0 + # via edx-opaque-keys +typing-extensions==4.12.2 + # via edx-opaque-keys diff --git a/requirements/ci.txt b/requirements/ci.txt index 2474d098..56fef6cb 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -30,5 +30,5 @@ pyproject-api==1.8.0 # via tox tox==4.23.2 # via -r requirements/ci.in -virtualenv==20.28.0 +virtualenv==20.28.1 # via tox diff --git a/requirements/dev.txt b/requirements/dev.txt index bdd9417a..394dc484 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,7 +8,7 @@ asgiref==3.8.1 # via # -r requirements/quality.txt # django -astroid==3.3.7 +astroid==3.3.8 # via # -r requirements/quality.txt # pylint @@ -38,7 +38,7 @@ chardet==5.2.0 # -r requirements/ci.txt # diff-cover # tox -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via # -r requirements/quality.txt # requests @@ -62,7 +62,7 @@ colorama==0.4.6 # via # -r requirements/ci.txt # tox -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 # via # -r requirements/quality.txt # pytest-cov @@ -86,12 +86,18 @@ django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/quality.txt +dnspython==2.7.0 + # via + # -r requirements/quality.txt + # pymongo docutils==0.21.2 # via # -r requirements/quality.txt # readme-renderer edx-lint==5.4.1 # via -r requirements/quality.txt +edx-opaque-keys[django]==2.11.0 + # via -r requirements/quality.txt filelock==3.16.1 # via # -r requirements/ci.txt @@ -135,7 +141,7 @@ jinja2==3.1.5 # -r requirements/quality.txt # code-annotations # diff-cover -keyring==25.5.0 +keyring==25.6.0 # via # -r requirements/quality.txt # twine @@ -206,13 +212,13 @@ pycparser==2.22 # cffi pydocstyle==6.3.0 # via -r requirements/quality.txt -pygments==2.18.0 +pygments==2.19.1 # via # -r requirements/quality.txt # diff-cover # readme-renderer # rich -pylint==3.3.2 +pylint==3.3.3 # via # -r requirements/quality.txt # edx-lint @@ -232,6 +238,10 @@ pylint-plugin-utils==0.8.2 # -r requirements/quality.txt # pylint-celery # pylint-django +pymongo==4.10.1 + # via + # -r requirements/quality.txt + # edx-opaque-keys pyproject-api==1.8.0 # via # -r requirements/ci.txt @@ -299,6 +309,7 @@ stevedore==5.4.0 # via # -r requirements/quality.txt # code-annotations + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/quality.txt @@ -311,12 +322,16 @@ tox==4.23.2 # via -r requirements/ci.txt twine==6.0.1 # via -r requirements/quality.txt +typing-extensions==4.12.2 + # via + # -r requirements/quality.txt + # edx-opaque-keys urllib3==2.3.0 # via # -r requirements/quality.txt # requests # twine -virtualenv==20.28.0 +virtualenv==20.28.1 # via # -r requirements/ci.txt # tox diff --git a/requirements/doc.txt b/requirements/doc.txt index 7b5937a1..2b1797ea 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -8,7 +8,7 @@ accessible-pygments==0.0.5 # via pydata-sphinx-theme alabaster==1.0.0 # via sphinx -anyio==4.7.0 +anyio==4.8.0 # via # starlette # watchfiles @@ -30,7 +30,7 @@ certifi==2024.12.14 # via requests cffi==1.17.1 # via cryptography -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests click==8.1.8 # via @@ -41,7 +41,7 @@ code-annotations==2.1.0 # via -r requirements/test.txt colorama==0.4.6 # via sphinx-autobuild -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 # via # -r requirements/test.txt # pytest-cov @@ -53,6 +53,10 @@ django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt +dnspython==2.7.0 + # via + # -r requirements/test.txt + # pymongo doc8==1.1.2 # via -r requirements/doc.in docutils==0.21.2 @@ -62,6 +66,8 @@ docutils==0.21.2 # readme-renderer # restructuredtext-lint # sphinx +edx-opaque-keys[django]==2.11.0 + # via -r requirements/test.txt h11==0.14.0 # via uvicorn idna==3.10 @@ -91,7 +97,7 @@ jinja2==3.1.5 # -r requirements/test.txt # code-annotations # sphinx -keyring==25.5.0 +keyring==25.6.0 # via twine markdown-it-py==3.0.0 # via rich @@ -128,7 +134,7 @@ pycparser==2.22 # via cffi pydata-sphinx-theme==0.16.1 # via sphinx-book-theme -pygments==2.18.0 +pygments==2.19.1 # via # accessible-pygments # doc8 @@ -136,6 +142,10 @@ pygments==2.18.0 # readme-renderer # rich # sphinx +pymongo==4.10.1 + # via + # -r requirements/test.txt + # edx-opaque-keys pyproject-hooks==1.2.0 # via build pytest==8.3.4 @@ -214,13 +224,14 @@ sqlparse==0.5.3 # via # -r requirements/test.txt # django -starlette==0.42.0 +starlette==0.45.2 # via sphinx-autobuild stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations # doc8 + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/test.txt @@ -229,7 +240,9 @@ twine==6.0.1 # via -r requirements/doc.in typing-extensions==4.12.2 # via + # -r requirements/test.txt # anyio + # edx-opaque-keys # pydata-sphinx-theme urllib3==2.3.0 # via diff --git a/requirements/pip.txt b/requirements/pip.txt index 25d1d695..b3dce14a 100644 --- a/requirements/pip.txt +++ b/requirements/pip.txt @@ -12,5 +12,5 @@ pip==24.2 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/pip.in -setuptools==75.6.0 +setuptools==75.7.0 # via -r requirements/pip.in diff --git a/requirements/quality.txt b/requirements/quality.txt index cc607bdf..7650d604 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -8,7 +8,7 @@ asgiref==3.8.1 # via # -r requirements/test.txt # django -astroid==3.3.7 +astroid==3.3.8 # via # pylint # pylint-celery @@ -18,7 +18,7 @@ certifi==2024.12.14 # via requests cffi==1.17.1 # via cryptography -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests click==8.1.8 # via @@ -32,7 +32,7 @@ code-annotations==2.1.0 # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 # via # -r requirements/test.txt # pytest-cov @@ -46,10 +46,16 @@ django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/test.txt +dnspython==2.7.0 + # via + # -r requirements/test.txt + # pymongo docutils==0.21.2 # via readme-renderer edx-lint==5.4.1 # via -r requirements/quality.in +edx-opaque-keys[django]==2.11.0 + # via -r requirements/test.txt idna==3.10 # via requests importlib-metadata==8.5.0 @@ -76,7 +82,7 @@ jinja2==3.1.5 # via # -r requirements/test.txt # code-annotations -keyring==25.5.0 +keyring==25.6.0 # via twine markdown-it-py==3.0.0 # via rich @@ -117,11 +123,11 @@ pycparser==2.22 # via cffi pydocstyle==6.3.0 # via -r requirements/quality.in -pygments==2.18.0 +pygments==2.19.1 # via # readme-renderer # rich -pylint==3.3.2 +pylint==3.3.3 # via # edx-lint # pylint-celery @@ -135,6 +141,10 @@ pylint-plugin-utils==0.8.2 # via # pylint-celery # pylint-django +pymongo==4.10.1 + # via + # -r requirements/test.txt + # edx-opaque-keys pytest==8.3.4 # via # -r requirements/test.txt @@ -178,6 +188,7 @@ stevedore==5.4.0 # via # -r requirements/test.txt # code-annotations + # edx-opaque-keys text-unidecode==1.3 # via # -r requirements/test.txt @@ -186,6 +197,10 @@ tomlkit==0.13.2 # via pylint twine==6.0.1 # via -r requirements/quality.in +typing-extensions==4.12.2 + # via + # -r requirements/test.txt + # edx-opaque-keys urllib3==2.3.0 # via # requests diff --git a/requirements/test.txt b/requirements/test.txt index 9d65c9fe..63c39f40 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -12,7 +12,7 @@ click==8.1.8 # via code-annotations code-annotations==2.1.0 # via -r requirements/test.in -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 # via pytest-cov ddt==1.7.2 # via -r requirements/test.in @@ -20,6 +20,12 @@ django==4.2.17 # via # -c https://raw.githubusercontent.com/edx/edx-lint/master/edx_lint/files/common_constraints.txt # -r requirements/base.txt +dnspython==2.7.0 + # via + # -r requirements/base.txt + # pymongo +edx-opaque-keys[django]==2.11.0 + # via -r requirements/base.txt iniconfig==2.0.0 # via pytest jinja2==3.1.5 @@ -29,9 +35,15 @@ markupsafe==3.0.2 packaging==24.2 # via pytest pbr==6.1.0 - # via stevedore + # via + # -r requirements/base.txt + # stevedore pluggy==1.5.0 # via pytest +pymongo==4.10.1 + # via + # -r requirements/base.txt + # edx-opaque-keys pytest==8.3.4 # via # pytest-cov @@ -49,6 +61,13 @@ sqlparse==0.5.3 # -r requirements/base.txt # django stevedore==5.4.0 - # via code-annotations + # via + # -r requirements/base.txt + # code-annotations + # edx-opaque-keys text-unidecode==1.3 # via python-slugify +typing-extensions==4.12.2 + # via + # -r requirements/base.txt + # edx-opaque-keys