From 8385cbea210710078376ed88a0a6e2c91990a8a6 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 27 Dec 2024 14:17:03 +0100 Subject: [PATCH 1/7] feat: add trigger code-annotations --- openedx_events/analytics/signals.py | 2 + openedx_events/learning/signals.py | 73 ++++++++++++++++++++++++++++- requirements/dev.txt | 8 ++-- requirements/doc.txt | 10 ++-- requirements/quality.txt | 8 ++-- requirements/test.in | 2 +- requirements/test.txt | 4 +- 7 files changed, 90 insertions(+), 17 deletions(-) diff --git a/openedx_events/analytics/signals.py b/openedx_events/analytics/signals.py index 8817b994..8892d1f3 100644 --- a/openedx_events/analytics/signals.py +++ b/openedx_events/analytics/signals.py @@ -16,6 +16,8 @@ # .. event_key_field: tracking_log.name # .. event_description: emitted when a tracking log is created. # .. event_data: TrackingLogData +# .. event_trigger_repository: openedx/event-tracking +# .. event_trigger: eventtracking/backends/event_bus.py TRACKING_EVENT_EMITTED = OpenEdxPublicSignal( event_type="org.openedx.analytics.tracking.event.emitted.v1", data={ diff --git a/openedx_events/learning/signals.py b/openedx_events/learning/signals.py index 0f3a74df..e38e6345 100644 --- a/openedx_events/learning/signals.py +++ b/openedx_events/learning/signals.py @@ -32,8 +32,11 @@ # .. event_type: org.openedx.learning.student.registration.completed.v1 # .. event_name: STUDENT_REGISTRATION_COMPLETED +# .. event_key_field: user.pii.username # .. event_description: emitted when the user registration process in the LMS is completed. # .. event_data: UserData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: openedx/core/djangoapps/user_authn/views/register.py STUDENT_REGISTRATION_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.student.registration.completed.v1", data={ @@ -47,6 +50,8 @@ # .. event_key_field: user.pii.username # .. event_description: emitted when the user's login process in the LMS is completed. # .. event_data: UserData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: openedx/core/djangoapps/user_authn/views/login.py SESSION_LOGIN_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.auth.session.login.completed.v1", data={ @@ -57,8 +62,11 @@ # .. event_type: org.openedx.learning.course.enrollment.created.v1 # .. event_name: COURSE_ENROLLMENT_CREATED +# .. event_key_field: enrollment.course.course_key # .. event_description: emitted when the user's enrollment process is completed. # .. event_data: CourseEnrollmentData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: common/djangoapps/student/models/course_enrollment.py COURSE_ENROLLMENT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.enrollment.created.v1", data={ @@ -69,8 +77,11 @@ # .. event_type: org.openedx.learning.course.enrollment.changed.v1 # .. event_name: COURSE_ENROLLMENT_CHANGED +# .. event_key_field: enrollment.course.course_key # .. event_description: emitted when the user's enrollment update process is completed. # .. event_data: CourseEnrollmentData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: common/djangoapps/student/models/course_enrollment.py COURSE_ENROLLMENT_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.enrollment.changed.v1", data={ @@ -84,6 +95,8 @@ # .. event_key_field: enrollment.course.course_key # .. event_description: emitted when the user's unenrollment process is completed. # .. event_data: CourseEnrollmentData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: common/djangoapps/student/models/course_enrollment.py COURSE_UNENROLLMENT_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.unenrollment.completed.v1", data={ @@ -97,6 +110,8 @@ # .. event_key_field: certificate.course.course_key # .. event_description: emitted when the user's certificate creation process is completed. # .. event_data: CertificateData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/certificates/models.py CERTIFICATE_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.created.v1", data={ @@ -109,6 +124,8 @@ # .. event_key_field: program_certificate.program.uuid # .. event_description: Emit when a program certificate is awarded to a learner # .. event_data: ProgramCertificateData +# .. event_trigger_repository: openedx/credentials +# .. event_trigger: credentials/apps/credentials/issuers.py PROGRAM_CERTIFICATE_AWARDED = OpenEdxPublicSignal( event_type="org.openedx.learning.program.certificate.awarded.v1", data={ @@ -120,6 +137,8 @@ # .. event_name: CERTIFICATE_CHANGED # .. event_description: emitted when the user's certificate update process is completed. # .. event_data: CertificateData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/certificates/models.py CERTIFICATE_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.changed.v1", data={ @@ -133,6 +152,8 @@ # .. event_key_field: certificate.course.course_key # .. event_description: emitted when the user's certificate annulation process is completed. # .. event_data: CertificateData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/certificates/models.py CERTIFICATE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.revoked.v1", data={ @@ -145,6 +166,8 @@ # .. event_key_field: program_certificate.program.uuid # .. event_description: Emit when a program certificate is revoked from a learner # .. event_data: ProgramCertificateData +# .. event_trigger_repository: openedx/credentials +# .. event_trigger: credentials/apps/credentials/issuers.py PROGRAM_CERTIFICATE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.program.certificate.revoked.v1", data={ @@ -156,6 +179,8 @@ # .. event_name: COHORT_MEMBERSHIP_CHANGED # .. event_description: emitted when the user's cohort update is completed. # .. event_data: CohortData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: openedx/core/djangoapps/course_groups/models.py COHORT_MEMBERSHIP_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.cohort_membership.changed.v1", data={ @@ -169,6 +194,8 @@ # .. event_description: emitted when the configuration for a course's discussions changes in the course # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CourseDiscussionConfigurationData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: openedx/core/djangoapps/discussions/tasks.py COURSE_DISCUSSIONS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.discussions.configuration.changed.v1", data={ @@ -180,6 +207,8 @@ # .. event_name: PERSISTENT_GRADE_SUMMARY_CHANGED # .. event_description: emitted when a grade changes in the course # .. event_data: PersistentCourseGradeData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/grades/models.py PERSISTENT_GRADE_SUMMARY_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.persistent_grade_summary.changed.v1", data={ @@ -193,6 +222,8 @@ # .. event_key_field: xblock_info.usage_key # .. event_description: Fired when an XBlock skill is verified. # .. event_data: XBlockSkillVerificationData +# .. event_trigger_repository: openedx/xblock-skill-tagging +# .. event_trigger: skill_tagging/skill_tagging_mixin.py XBLOCK_SKILL_VERIFIED = OpenEdxPublicSignal( event_type="org.openedx.learning.xblock.skill.verified.v1", data={ @@ -205,6 +236,8 @@ # .. event_description: Can be fired from apps to send user notifications. # .. event_data: UserNotificationSendListData # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/discussion/rest_api/discussions_notifications.py USER_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.notification.requested.v1", data={ @@ -216,6 +249,8 @@ # .. event_name: EXAM_ATTEMPT_SUBMITTED # .. event_description: Emitted when an exam attempt is submitted by a learner in edx-exams. # .. event_data: ExamAttemptData +# .. event_trigger_repository: edx/edx-exams +# .. event_trigger: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_SUBMITTED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.submitted.v1", data={ @@ -227,6 +262,8 @@ # .. event_name: EXAM_ATTEMPT_REJECTED # .. event_description: Emitted when an exam attempt is marked rejected in edx-exams. # .. event_data: ExamAttemptData +# .. event_trigger_repository: edx/edx-exams +# .. event_trigger: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_REJECTED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.rejected.v1", data={ @@ -238,6 +275,8 @@ # .. event_name: EXAM_ATTEMPT_VERIFIED # .. event_description: Emitted when an exam attempt is marked verified in edx-exams. # .. event_data: ExamAttemptData +# .. event_trigger_repository: edx/edx-exams +# .. event_trigger: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_VERIFIED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.verified.v1", data={ @@ -249,6 +288,8 @@ # .. event_name: EXAM_ATTEMPT_ERRORED # .. event_description: Emitted when a learner's exam attempt errors out in edx-exams. # .. event_data: ExamAttemptData +# .. event_trigger_repository: edx/edx-exams +# .. event_trigger: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_ERRORED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.errored.v1", data={ @@ -260,6 +301,8 @@ # .. event_name: EXAM_ATTEMPT_RESET # .. event_description: Emitted when an exam attempt is reset in edx-exams. # .. event_data: ExamAttemptData +# .. event_trigger_repository: edx/edx-exams +# .. event_trigger: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_RESET = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.reset.v1", data={ @@ -284,6 +327,8 @@ # .. event_key_field: course_access_role_data.course_key # .. event_description: Emitted when a course access role is removed from a user. # .. event_data: CourseAccessRoleData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: common/djangoapps/student/signals/signals.py COURSE_ACCESS_ROLE_REMOVED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.course_access_role.removed.v1", data={ @@ -295,6 +340,8 @@ # .. event_name: FORUM_THREAD_CREATED # .. event_description: Emitted when a new thread is created in a discussion # .. event_data: DiscussionThreadData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_THREAD_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.thread.created.v1", @@ -307,7 +354,9 @@ # .. event_name: FORUM_THREAD_RESPONSE_CREATED # .. event_description: Emitted when a new response is added to a thread # .. event_data: DiscussionThreadData -# .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py +# .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_THREAD_RESPONSE_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.response.created.v1", data={ @@ -319,6 +368,8 @@ # .. event_name: FORUM_RESPONSE_COMMENT_CREATED # .. event_description: Emitted when a new comment is added to a response # .. event_data: DiscussionThreadData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_RESPONSE_COMMENT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.response.created.v1", @@ -332,6 +383,8 @@ # .. event_name: COURSE_NOTIFICATION_REQUESTED # .. event_description: Emitted when a notification is requested for a course # .. event_data: CourseNotificationData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/discussion/rest_api/discussions_notifications.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet COURSE_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.notification.requested.v1", @@ -345,6 +398,8 @@ # .. event_name: ORA_SUBMISSION_CREATED # .. event_description: Emitted when a new ORA submission is created # .. event_data: ORASubmissionData +# .. event_trigger_repository: openedx/edx-ora2 +# .. event_trigger: openassessment/xblock/ui_mixins/legacy/handlers_mixin.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet ORA_SUBMISSION_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.ora.submission.created.v1", @@ -358,6 +413,8 @@ # .. event_name: COURSE_PASSING_STATUS_UPDATED # .. event_description: Emitted when course grade updates. # .. event_data: CoursePassingStatusData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/grades/events.py COURSE_PASSING_STATUS_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.passing.status.updated.v1", data={ @@ -370,6 +427,8 @@ # .. event_name: CCX_COURSE_PASSING_STATUS_UPDATED # .. event_description: Emitted when a CCX course grade updates. # .. event_data: CcxCoursePassingStatusData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/grades/events.py CCX_COURSE_PASSING_STATUS_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.learning.ccx.course.passing.status.updated.v1", data={ @@ -382,6 +441,8 @@ # .. event_name: BADGE_AWARDED # .. event_description: Emit when a badge is awarded to a learner # .. event_data: BadgeData +# .. event_trigger_repository: openedx/credentials +# .. event_trigger: credentials/apps/badges/signals/signals.py BADGE_AWARDED = OpenEdxPublicSignal( event_type="org.openedx.learning.badge.awarded.v1", data={ @@ -394,6 +455,8 @@ # .. event_name: BADGE_REVOKED # .. event_description: Emit when a badge is revoked for a learner # .. event_data: BadgeData +# .. event_trigger_repository: openedx/credentials +# .. event_trigger: credentials/apps/badges/signals/signals.py BADGE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.badge.revoked.v1", data={ @@ -406,6 +469,8 @@ # .. event_name: IDV_ATTEMPT_CREATED # .. event_description: Emitted when an IDV attempt is created # .. event_data: VerificationAttemptData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.created.v1", data={ @@ -418,6 +483,8 @@ # .. event_name: IDV_ATTEMPT_PENDING # .. event_description: Emitted when an IDV attempt is marked as pending # .. event_data: VerificationAttemptData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_PENDING = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.pending.v1", data={ @@ -430,6 +497,8 @@ # .. event_name: IDV_ATTEMPT_APPROVED # .. event_description: Emitted when an IDV attempt is approved # .. event_data: VerificationAttemptData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_APPROVED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.approved.v1", data={ @@ -442,6 +511,8 @@ # .. event_name: IDV_ATTEMPT_DENIED # .. event_description: Emitted when an IDV attempt is denied # .. event_data: VerificationAttemptData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_DENIED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.denied.v1", data={ diff --git a/requirements/dev.txt b/requirements/dev.txt index 7902df16..50a5c483 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -42,7 +42,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 @@ -59,7 +59,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations==2.1.0 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via # -r requirements/quality.txt # edx-lint @@ -67,7 +67,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 @@ -165,7 +165,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 diff --git a/requirements/doc.txt b/requirements/doc.txt index a3e31b15..5cd5bef4 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -35,7 +35,7 @@ cffi==1.17.1 # -r requirements/test.txt # cryptography # pynacl -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests click==8.1.8 # via @@ -43,11 +43,11 @@ click==8.1.8 # code-annotations # edx-django-utils # uvicorn -code-annotations==2.1.0 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # 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 @@ -122,7 +122,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 @@ -267,7 +267,7 @@ sqlparse==0.5.3 # via # -r requirements/test.txt # django -starlette==0.42.0 +starlette==0.43.0 # via sphinx-autobuild stevedore==5.4.0 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index 870cc6a9..a23a91de 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -24,7 +24,7 @@ cffi==1.17.1 # -r requirements/test.txt # cryptography # pynacl -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests click==8.1.8 # via @@ -35,11 +35,11 @@ click==8.1.8 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations==2.1.0 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via # -r requirements/test.txt # edx-lint -coverage[toml]==7.6.9 +coverage[toml]==7.6.10 # via # -r requirements/test.txt # pytest-cov @@ -108,7 +108,7 @@ jinja2==3.1.5 # via # -r requirements/test.txt # code-annotations -keyring==25.5.0 +keyring==25.6.0 # via twine lazy-object-proxy==1.10.0 # via astroid diff --git a/requirements/test.in b/requirements/test.in index 15177647..b127a285 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -6,4 +6,4 @@ ddt # A library to multiply test cases pytest-cov # pytest extension for code coverage statistics pytest-django # pytest extension for better Django support -code-annotations +git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field diff --git a/requirements/test.txt b/requirements/test.txt index 35447231..94c2d668 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -19,9 +19,9 @@ click==8.1.8 # -r requirements/base.txt # code-annotations # edx-django-utils -code-annotations==2.1.0 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # 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 From 0647f18cc5c6db39a5912d6297407045e793c946 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 27 Dec 2024 14:45:24 +0100 Subject: [PATCH 2/7] temp: use 2.1 based branch instead --- requirements/dev.txt | 2 +- requirements/doc.txt | 2 +- requirements/quality.txt | 2 +- requirements/test.in | 2 +- requirements/test.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 50a5c483..5a247049 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -59,7 +59,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 # via # -r requirements/quality.txt # edx-lint diff --git a/requirements/doc.txt b/requirements/doc.txt index 5cd5bef4..c68f4c99 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -43,7 +43,7 @@ click==8.1.8 # code-annotations # edx-django-utils # uvicorn -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 # via -r requirements/test.txt colorama==0.4.6 # via sphinx-autobuild diff --git a/requirements/quality.txt b/requirements/quality.txt index a23a91de..b6a6b1ea 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -35,7 +35,7 @@ click==8.1.8 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 # via # -r requirements/test.txt # edx-lint diff --git a/requirements/test.in b/requirements/test.in index b127a285..245eaa68 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -6,4 +6,4 @@ ddt # A library to multiply test cases pytest-cov # pytest extension for code coverage statistics pytest-django # pytest extension for better Django support -git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field +git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 diff --git a/requirements/test.txt b/requirements/test.txt index 94c2d668..d8322c24 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -19,7 +19,7 @@ click==8.1.8 # -r requirements/base.txt # code-annotations # edx-django-utils -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 # via -r requirements/test.in coverage[toml]==7.6.10 # via pytest-cov From afc320ccc69b52386a3c1f44c8e9c0bf368a9280 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Fri, 27 Dec 2024 17:59:46 +0100 Subject: [PATCH 3/7] docs: use more specific name for trigger path --- openedx_events/analytics/signals.py | 2 +- openedx_events/content_authoring/signals.py | 37 +++++++++++ openedx_events/enterprise/signals.py | 12 ++++ openedx_events/learning/signals.py | 68 ++++++++++----------- 4 files changed, 84 insertions(+), 35 deletions(-) diff --git a/openedx_events/analytics/signals.py b/openedx_events/analytics/signals.py index 8892d1f3..2bee2790 100644 --- a/openedx_events/analytics/signals.py +++ b/openedx_events/analytics/signals.py @@ -17,7 +17,7 @@ # .. event_description: emitted when a tracking log is created. # .. event_data: TrackingLogData # .. event_trigger_repository: openedx/event-tracking -# .. event_trigger: eventtracking/backends/event_bus.py +# .. event_trigger_path: eventtracking/backends/event_bus.py TRACKING_EVENT_EMITTED = OpenEdxPublicSignal( event_type="org.openedx.analytics.tracking.event.emitted.v1", data={ diff --git a/openedx_events/content_authoring/signals.py b/openedx_events/content_authoring/signals.py index aaacc9c9..a15b04c4 100644 --- a/openedx_events/content_authoring/signals.py +++ b/openedx_events/content_authoring/signals.py @@ -26,6 +26,8 @@ # .. event_key_field: catalog_info.course_key # .. event_description: Fired when a course changes in Studio in a way that is relevant for catalog consumers. # .. event_data: CourseCatalogData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: cms/djangoapps/contentstore/signals/handlers.py COURSE_CATALOG_INFO_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.catalog_info.changed.v1", data={ @@ -38,6 +40,8 @@ # .. event_key_field: xblock_info.usage_key # .. event_description: Fired when an XBlock is created. # .. event_data: XBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py XBLOCK_CREATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.xblock.created.v1", data={ @@ -50,6 +54,8 @@ # .. event_key_field: xblock_info.usage_key # .. event_description: Fired when an XBlock is updated. # .. event_data: XBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py XBLOCK_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.xblock.updated.v1", data={ @@ -67,6 +73,8 @@ # only a single event is fired with section details like : # `XBlockData(usage_key="section-usage-key", block_type="chapter")` # .. event_data: XBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py XBLOCK_PUBLISHED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.xblock.published.v1", data={ @@ -80,6 +88,8 @@ # .. event_key_field: xblock_info.usage_key # .. event_description: Fired when an XBlock is deleted. # .. event_data: XBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py XBLOCK_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.xblock.deleted.v1", data={ @@ -93,6 +103,8 @@ # .. event_key_field: xblock_info.usage_key # .. event_description: Fired when an XBlock is duplicated in Studio. # .. event_data: DuplicatedXBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py XBLOCK_DUPLICATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.xblock.duplicated.v1", data={ @@ -106,6 +118,7 @@ # .. event_description: Fired when a course certificate configuration changes in Studio. # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CertificateConfigData +# TODO: Remove this event cause it's not being used COURSE_CERTIFICATE_CONFIG_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.certificate_config.changed.v1", data={ @@ -118,6 +131,7 @@ # .. event_description: Fired when a course certificate configuration deletes in Studio. # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CertificateConfigData +# TODO: Remove this event cause it's not being used COURSE_CERTIFICATE_CONFIG_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.certificate_config.deleted.v1", data={ @@ -129,6 +143,8 @@ # .. event_name: COURSE_CREATED # .. event_description: emitted when a course is created # .. event_data: CourseData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: xmodule/modulestore/mixed.py COURSE_CREATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.created.v1", data={ @@ -140,6 +156,8 @@ # .. event_name: CONTENT_LIBRARY_CREATED # .. event_description: emitted when a content library is created # .. event_data: ContentLibraryData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/api.py CONTENT_LIBRARY_CREATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.created.v1", data={ @@ -151,6 +169,8 @@ # .. event_name: CONTENT_LIBRARY_UPDATED # .. event_description: emitted when a content library is updated # .. event_data: ContentLibraryData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/api.py CONTENT_LIBRARY_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.updated.v1", data={ @@ -162,6 +182,8 @@ # .. event_name: CONTENT_LIBRARY_DELETED # .. event_description: emitted when a content library is deleted # .. event_data: ContentLibraryData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/api.py CONTENT_LIBRARY_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.deleted.v1", data={ @@ -173,6 +195,8 @@ # .. event_name: LIBRARY_BLOCK_CREATED # .. event_description: emitted when a library block is created # .. event_data: LibraryBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/api.py LIBRARY_BLOCK_CREATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.library_block.created.v1", data={ @@ -184,6 +208,8 @@ # .. event_name: LIBRARY_BLOCK_UPDATED # .. event_description: emitted when a library block is updated # .. event_data: LibraryBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/library_context.py LIBRARY_BLOCK_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.library_block.updated.v1", data={ @@ -195,6 +221,8 @@ # .. event_name: LIBRARY_BLOCK_DELETED # .. event_description: emitted when a library block is deleted # .. event_data: LibraryBlockData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/api.py LIBRARY_BLOCK_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.library_block.deleted.v1", data={ @@ -206,6 +234,8 @@ # .. event_name: CONTENT_OBJECT_ASSOCIATIONS_CHANGED # .. event_description: emitted when an object's associations are changed, e.g tags, collections # .. event_data: ContentObjectData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_tagging/api.py CONTENT_OBJECT_ASSOCIATIONS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content.object.associations.changed.v1", data={ @@ -218,6 +248,7 @@ # .. event_description: emitted when an object's tags are changed # DEPRECATED: please use CONTENT_OBJECT_ASSOCIATIONS_CHANGED instead. # .. event_data: ContentObjectData +# TODO: start deprecation process CONTENT_OBJECT_TAGS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content.object.tags.changed.v1", data={ @@ -229,6 +260,8 @@ # .. event_name: LIBRARY_COLLECTION_CREATED # .. event_description: emitted when a content library collection is created # .. event_data: LibraryCollectionData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/signal_handlers.py LIBRARY_COLLECTION_CREATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.collection.created.v1", data={ @@ -240,6 +273,8 @@ # .. event_name: LIBRARY_COLLECTION_UPDATED # .. event_description: emitted when when a content library collection is updated # .. event_data: LibraryCollectionData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/signal_handlers.py LIBRARY_COLLECTION_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.collection.updated.v1", data={ @@ -251,6 +286,8 @@ # .. event_name: LIBRARY_COLLECTION_DELETED # .. event_description: emitted when an when a content library collection is deleted # .. event_data: LibraryCollectionData +# .. event_trigger_repository: openedx/edx-platform +# .. event_trigger_path: openedx/core/djangoapps/content_libraries/signal_handlers.py LIBRARY_COLLECTION_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content_library.collection.deleted.v1", data={ diff --git a/openedx_events/enterprise/signals.py b/openedx_events/enterprise/signals.py index ee16b910..55dfca55 100644 --- a/openedx_events/enterprise/signals.py +++ b/openedx_events/enterprise/signals.py @@ -15,6 +15,7 @@ # .. event_name: SUBSIDY_REDEEMED # .. event_description: emitted when an enterprise subsidy is utilized. # .. event_data: SubsidyRedemption +# TODO: remove this event cause it's not used SUBSIDY_REDEEMED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy.redeemed.v1", data={ @@ -26,6 +27,7 @@ # .. event_name: SUBSIDY_REDEMPTION_REVERSED # .. event_description: emitted when an enterprise subsidy is reversed. # .. event_data: SubsidyRedemption +# TODO: remove this event cause it's not used SUBSIDY_REDEMPTION_REVERSED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy.redemption-reversed.v1", data={ @@ -39,6 +41,8 @@ # .. event_description: emitted when an enterprise ledger transaction is created. # See: https://github.com/openedx/openedx-ledger/tree/main/docs/decisions # .. event_data: LedgerTransaction +# .. event_trigger_repository: openedx/enterprise-subsidy +# .. event_trigger_path: enterprise_subsidy/apps/core/event_bus.py LEDGER_TRANSACTION_CREATED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy_ledger_transaction.created.v1", data={ @@ -52,6 +56,8 @@ # .. event_description: emitted when an enterprise ledger transaction is committed. # See: https://github.com/openedx/openedx-ledger/tree/main/docs/decisions # .. event_data: LedgerTransaction +# .. event_trigger_repository: openedx/enterprise-subsidy +# .. event_trigger_path: enterprise_subsidy/apps/core/event_bus.py LEDGER_TRANSACTION_COMMITTED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy_ledger_transaction.committed.v1", data={ @@ -65,6 +71,8 @@ # .. event_description: emitted when an enterprise ledger transaction fails. # See: https://github.com/openedx/openedx-ledger/tree/main/docs/decisions # .. event_data: LedgerTransaction +# .. event_trigger_repository: openedx/enterprise-subsidy +# .. event_trigger_path: enterprise_subsidy/apps/core/event_bus.py LEDGER_TRANSACTION_FAILED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy_ledger_transaction.failed.v1", data={ @@ -78,6 +86,8 @@ # .. event_description: emitted when an enterprise ledger transaction is reversed. # See: https://github.com/openedx/openedx-ledger/tree/main/docs/decisions # .. event_data: LedgerTransaction +# .. event_trigger_repository: openedx/enterprise-subsidy +# .. event_trigger_path: enterprise_subsidy/apps/core/event_bus.py LEDGER_TRANSACTION_REVERSED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy_ledger_transaction.reversed.v1", data={ @@ -91,6 +101,8 @@ # .. event_description: emitted when a LearnerCreditEnterpriseCourseEnrollment is revoked. This most often happens when # an enterprise learner unenrolls from a course which was LC-subsidized. # .. event_data: LearnerCreditEnterpriseCourseEnrollment +# .. event_trigger_repository: openedx/edx-enterprise +# .. event_trigger_path: enterprise/event_bus.py LEARNER_CREDIT_COURSE_ENROLLMENT_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.learner_credit_course_enrollment.revoked.v1", data={ diff --git a/openedx_events/learning/signals.py b/openedx_events/learning/signals.py index e38e6345..07fb55d6 100644 --- a/openedx_events/learning/signals.py +++ b/openedx_events/learning/signals.py @@ -36,7 +36,7 @@ # .. event_description: emitted when the user registration process in the LMS is completed. # .. event_data: UserData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: openedx/core/djangoapps/user_authn/views/register.py +# .. event_trigger_path: openedx/core/djangoapps/user_authn/views/register.py STUDENT_REGISTRATION_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.student.registration.completed.v1", data={ @@ -51,7 +51,7 @@ # .. event_description: emitted when the user's login process in the LMS is completed. # .. event_data: UserData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: openedx/core/djangoapps/user_authn/views/login.py +# .. event_trigger_path: openedx/core/djangoapps/user_authn/views/login.py SESSION_LOGIN_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.auth.session.login.completed.v1", data={ @@ -66,7 +66,7 @@ # .. event_description: emitted when the user's enrollment process is completed. # .. event_data: CourseEnrollmentData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: common/djangoapps/student/models/course_enrollment.py +# .. event_trigger_path: common/djangoapps/student/models/course_enrollment.py COURSE_ENROLLMENT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.enrollment.created.v1", data={ @@ -81,7 +81,7 @@ # .. event_description: emitted when the user's enrollment update process is completed. # .. event_data: CourseEnrollmentData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: common/djangoapps/student/models/course_enrollment.py +# .. event_trigger_path: common/djangoapps/student/models/course_enrollment.py COURSE_ENROLLMENT_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.enrollment.changed.v1", data={ @@ -96,7 +96,7 @@ # .. event_description: emitted when the user's unenrollment process is completed. # .. event_data: CourseEnrollmentData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: common/djangoapps/student/models/course_enrollment.py +# .. event_trigger_path: common/djangoapps/student/models/course_enrollment.py COURSE_UNENROLLMENT_COMPLETED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.unenrollment.completed.v1", data={ @@ -111,7 +111,7 @@ # .. event_description: emitted when the user's certificate creation process is completed. # .. event_data: CertificateData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/certificates/models.py +# .. event_trigger_path: lms/djangoapps/certificates/models.py CERTIFICATE_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.created.v1", data={ @@ -125,7 +125,7 @@ # .. event_description: Emit when a program certificate is awarded to a learner # .. event_data: ProgramCertificateData # .. event_trigger_repository: openedx/credentials -# .. event_trigger: credentials/apps/credentials/issuers.py +# .. event_trigger_path: credentials/apps/credentials/issuers.py PROGRAM_CERTIFICATE_AWARDED = OpenEdxPublicSignal( event_type="org.openedx.learning.program.certificate.awarded.v1", data={ @@ -138,7 +138,7 @@ # .. event_description: emitted when the user's certificate update process is completed. # .. event_data: CertificateData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/certificates/models.py +# .. event_trigger_path: lms/djangoapps/certificates/models.py CERTIFICATE_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.changed.v1", data={ @@ -153,7 +153,7 @@ # .. event_description: emitted when the user's certificate annulation process is completed. # .. event_data: CertificateData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/certificates/models.py +# .. event_trigger_path: lms/djangoapps/certificates/models.py CERTIFICATE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.certificate.revoked.v1", data={ @@ -167,7 +167,7 @@ # .. event_description: Emit when a program certificate is revoked from a learner # .. event_data: ProgramCertificateData # .. event_trigger_repository: openedx/credentials -# .. event_trigger: credentials/apps/credentials/issuers.py +# .. event_trigger_path: credentials/apps/credentials/issuers.py PROGRAM_CERTIFICATE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.program.certificate.revoked.v1", data={ @@ -180,7 +180,7 @@ # .. event_description: emitted when the user's cohort update is completed. # .. event_data: CohortData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: openedx/core/djangoapps/course_groups/models.py +# .. event_trigger_path: openedx/core/djangoapps/course_groups/models.py COHORT_MEMBERSHIP_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.cohort_membership.changed.v1", data={ @@ -195,7 +195,7 @@ # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CourseDiscussionConfigurationData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: openedx/core/djangoapps/discussions/tasks.py +# .. event_trigger_path: openedx/core/djangoapps/discussions/tasks.py COURSE_DISCUSSIONS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.discussions.configuration.changed.v1", data={ @@ -208,7 +208,7 @@ # .. event_description: emitted when a grade changes in the course # .. event_data: PersistentCourseGradeData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/grades/models.py +# .. event_trigger_path: lms/djangoapps/grades/models.py PERSISTENT_GRADE_SUMMARY_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.persistent_grade_summary.changed.v1", data={ @@ -223,7 +223,7 @@ # .. event_description: Fired when an XBlock skill is verified. # .. event_data: XBlockSkillVerificationData # .. event_trigger_repository: openedx/xblock-skill-tagging -# .. event_trigger: skill_tagging/skill_tagging_mixin.py +# .. event_trigger_path: skill_tagging/skill_tagging_mixin.py XBLOCK_SKILL_VERIFIED = OpenEdxPublicSignal( event_type="org.openedx.learning.xblock.skill.verified.v1", data={ @@ -237,7 +237,7 @@ # .. event_data: UserNotificationSendListData # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/discussion/rest_api/discussions_notifications.py +# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py USER_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.notification.requested.v1", data={ @@ -250,7 +250,7 @@ # .. event_description: Emitted when an exam attempt is submitted by a learner in edx-exams. # .. event_data: ExamAttemptData # .. event_trigger_repository: edx/edx-exams -# .. event_trigger: edx_exams/apps/core/signals/signals.py +# .. event_trigger_path: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_SUBMITTED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.submitted.v1", data={ @@ -263,7 +263,7 @@ # .. event_description: Emitted when an exam attempt is marked rejected in edx-exams. # .. event_data: ExamAttemptData # .. event_trigger_repository: edx/edx-exams -# .. event_trigger: edx_exams/apps/core/signals/signals.py +# .. event_trigger_path: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_REJECTED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.rejected.v1", data={ @@ -276,7 +276,7 @@ # .. event_description: Emitted when an exam attempt is marked verified in edx-exams. # .. event_data: ExamAttemptData # .. event_trigger_repository: edx/edx-exams -# .. event_trigger: edx_exams/apps/core/signals/signals.py +# .. event_trigger_path: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_VERIFIED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.verified.v1", data={ @@ -289,7 +289,7 @@ # .. event_description: Emitted when a learner's exam attempt errors out in edx-exams. # .. event_data: ExamAttemptData # .. event_trigger_repository: edx/edx-exams -# .. event_trigger: edx_exams/apps/core/signals/signals.py +# .. event_trigger_path: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_ERRORED = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.errored.v1", data={ @@ -302,7 +302,7 @@ # .. event_description: Emitted when an exam attempt is reset in edx-exams. # .. event_data: ExamAttemptData # .. event_trigger_repository: edx/edx-exams -# .. event_trigger: edx_exams/apps/core/signals/signals.py +# .. event_trigger_path: edx_exams/apps/core/signals/signals.py EXAM_ATTEMPT_RESET = OpenEdxPublicSignal( event_type="org.openedx.learning.exam.attempt.reset.v1", data={ @@ -328,7 +328,7 @@ # .. event_description: Emitted when a course access role is removed from a user. # .. event_data: CourseAccessRoleData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: common/djangoapps/student/signals/signals.py +# .. event_trigger_path: common/djangoapps/student/signals/signals.py COURSE_ACCESS_ROLE_REMOVED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.course_access_role.removed.v1", data={ @@ -341,7 +341,7 @@ # .. event_description: Emitted when a new thread is created in a discussion # .. event_data: DiscussionThreadData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py +# .. event_trigger_path: lms/djangoapps/discussion/django_comment_client/base/views.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_THREAD_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.thread.created.v1", @@ -355,7 +355,7 @@ # .. event_description: Emitted when a new response is added to a thread # .. event_data: DiscussionThreadData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py +# .. event_trigger_path: lms/djangoapps/discussion/django_comment_client/base/views.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_THREAD_RESPONSE_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.response.created.v1", @@ -369,7 +369,7 @@ # .. event_description: Emitted when a new comment is added to a response # .. event_data: DiscussionThreadData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/discussion/django_comment_client/base/views.py +# .. event_trigger_path: lms/djangoapps/discussion/django_comment_client/base/views.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet FORUM_RESPONSE_COMMENT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.response.created.v1", @@ -384,7 +384,7 @@ # .. event_description: Emitted when a notification is requested for a course # .. event_data: CourseNotificationData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/discussion/rest_api/discussions_notifications.py +# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet COURSE_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.notification.requested.v1", @@ -399,7 +399,7 @@ # .. event_description: Emitted when a new ORA submission is created # .. event_data: ORASubmissionData # .. event_trigger_repository: openedx/edx-ora2 -# .. event_trigger: openassessment/xblock/ui_mixins/legacy/handlers_mixin.py +# .. event_trigger_path: openassessment/xblock/ui_mixins/legacy/handlers_mixin.py # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet ORA_SUBMISSION_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.ora.submission.created.v1", @@ -414,7 +414,7 @@ # .. event_description: Emitted when course grade updates. # .. event_data: CoursePassingStatusData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/grades/events.py +# .. event_trigger_path: lms/djangoapps/grades/events.py COURSE_PASSING_STATUS_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.learning.course.passing.status.updated.v1", data={ @@ -428,7 +428,7 @@ # .. event_description: Emitted when a CCX course grade updates. # .. event_data: CcxCoursePassingStatusData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/grades/events.py +# .. event_trigger_path: lms/djangoapps/grades/events.py CCX_COURSE_PASSING_STATUS_UPDATED = OpenEdxPublicSignal( event_type="org.openedx.learning.ccx.course.passing.status.updated.v1", data={ @@ -442,7 +442,7 @@ # .. event_description: Emit when a badge is awarded to a learner # .. event_data: BadgeData # .. event_trigger_repository: openedx/credentials -# .. event_trigger: credentials/apps/badges/signals/signals.py +# .. event_trigger_path: credentials/apps/badges/signals/signals.py BADGE_AWARDED = OpenEdxPublicSignal( event_type="org.openedx.learning.badge.awarded.v1", data={ @@ -456,7 +456,7 @@ # .. event_description: Emit when a badge is revoked for a learner # .. event_data: BadgeData # .. event_trigger_repository: openedx/credentials -# .. event_trigger: credentials/apps/badges/signals/signals.py +# .. event_trigger_path: credentials/apps/badges/signals/signals.py BADGE_REVOKED = OpenEdxPublicSignal( event_type="org.openedx.learning.badge.revoked.v1", data={ @@ -470,7 +470,7 @@ # .. event_description: Emitted when an IDV attempt is created # .. event_data: VerificationAttemptData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py +# .. event_trigger_path: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_CREATED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.created.v1", data={ @@ -484,7 +484,7 @@ # .. event_description: Emitted when an IDV attempt is marked as pending # .. event_data: VerificationAttemptData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py +# .. event_trigger_path: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_PENDING = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.pending.v1", data={ @@ -498,7 +498,7 @@ # .. event_description: Emitted when an IDV attempt is approved # .. event_data: VerificationAttemptData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py +# .. event_trigger_path: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_APPROVED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.approved.v1", data={ @@ -512,7 +512,7 @@ # .. event_description: Emitted when an IDV attempt is denied # .. event_data: VerificationAttemptData # .. event_trigger_repository: openedx/edx-platform -# .. event_trigger: lms/djangoapps/verify_student/signals/signals.py +# .. event_trigger_path: lms/djangoapps/verify_student/signals/signals.py IDV_ATTEMPT_DENIED = OpenEdxPublicSignal( event_type="org.openedx.learning.idv_attempt.denied.v1", data={ From 898a7718cdc6a9a459a1498966e7b24700a6db5b Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 30 Dec 2024 10:37:14 +0100 Subject: [PATCH 4/7] temp: use latest code-annotations version --- requirements/dev.txt | 2 +- requirements/doc.txt | 4 ++-- requirements/quality.txt | 2 +- requirements/test.in | 3 ++- requirements/test.txt | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/requirements/dev.txt b/requirements/dev.txt index 5a247049..50a5c483 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -59,7 +59,7 @@ click-log==0.4.0 # via # -r requirements/quality.txt # edx-lint -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via # -r requirements/quality.txt # edx-lint diff --git a/requirements/doc.txt b/requirements/doc.txt index c68f4c99..ed65678e 100644 --- a/requirements/doc.txt +++ b/requirements/doc.txt @@ -43,7 +43,7 @@ click==8.1.8 # code-annotations # edx-django-utils # uvicorn -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via -r requirements/test.txt colorama==0.4.6 # via sphinx-autobuild @@ -267,7 +267,7 @@ sqlparse==0.5.3 # via # -r requirements/test.txt # django -starlette==0.43.0 +starlette==0.45.0 # via sphinx-autobuild stevedore==5.4.0 # via diff --git a/requirements/quality.txt b/requirements/quality.txt index b6a6b1ea..a23a91de 100644 --- a/requirements/quality.txt +++ b/requirements/quality.txt @@ -35,7 +35,7 @@ click==8.1.8 # edx-lint click-log==0.4.0 # via edx-lint -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via # -r requirements/test.txt # edx-lint diff --git a/requirements/test.in b/requirements/test.in index 245eaa68..e6bc1238 100644 --- a/requirements/test.in +++ b/requirements/test.in @@ -6,4 +6,5 @@ ddt # A library to multiply test cases pytest-cov # pytest extension for code coverage statistics pytest-django # pytest extension for better Django support -git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +# git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field diff --git a/requirements/test.txt b/requirements/test.txt index d8322c24..94c2d668 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -19,7 +19,7 @@ click==8.1.8 # -r requirements/base.txt # code-annotations # edx-django-utils -code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field-2.1 +code-annotations @ git+https://github.com/eduNEXT/code-annotations.git@MJG/triggering-field # via -r requirements/test.in coverage[toml]==7.6.10 # via pytest-cov From 41049465531edde19663042836220d83f4573c88 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 30 Dec 2024 11:39:15 +0100 Subject: [PATCH 5/7] refactor: drop todo comments in favor of issue --- openedx_events/content_authoring/signals.py | 3 --- openedx_events/enterprise/signals.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/openedx_events/content_authoring/signals.py b/openedx_events/content_authoring/signals.py index a15b04c4..8338f888 100644 --- a/openedx_events/content_authoring/signals.py +++ b/openedx_events/content_authoring/signals.py @@ -118,7 +118,6 @@ # .. event_description: Fired when a course certificate configuration changes in Studio. # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CertificateConfigData -# TODO: Remove this event cause it's not being used COURSE_CERTIFICATE_CONFIG_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.certificate_config.changed.v1", data={ @@ -131,7 +130,6 @@ # .. event_description: Fired when a course certificate configuration deletes in Studio. # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_data: CertificateConfigData -# TODO: Remove this event cause it's not being used COURSE_CERTIFICATE_CONFIG_DELETED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.course.certificate_config.deleted.v1", data={ @@ -248,7 +246,6 @@ # .. event_description: emitted when an object's tags are changed # DEPRECATED: please use CONTENT_OBJECT_ASSOCIATIONS_CHANGED instead. # .. event_data: ContentObjectData -# TODO: start deprecation process CONTENT_OBJECT_TAGS_CHANGED = OpenEdxPublicSignal( event_type="org.openedx.content_authoring.content.object.tags.changed.v1", data={ diff --git a/openedx_events/enterprise/signals.py b/openedx_events/enterprise/signals.py index 55dfca55..800a5f2a 100644 --- a/openedx_events/enterprise/signals.py +++ b/openedx_events/enterprise/signals.py @@ -15,7 +15,6 @@ # .. event_name: SUBSIDY_REDEEMED # .. event_description: emitted when an enterprise subsidy is utilized. # .. event_data: SubsidyRedemption -# TODO: remove this event cause it's not used SUBSIDY_REDEEMED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy.redeemed.v1", data={ @@ -27,7 +26,6 @@ # .. event_name: SUBSIDY_REDEMPTION_REVERSED # .. event_description: emitted when an enterprise subsidy is reversed. # .. event_data: SubsidyRedemption -# TODO: remove this event cause it's not used SUBSIDY_REDEMPTION_REVERSED = OpenEdxPublicSignal( event_type="org.openedx.enterprise.subsidy.redemption-reversed.v1", data={ From 97a5e8632bb36cd421bc224c6e8701cdaa1c4283 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 30 Dec 2024 12:23:27 +0100 Subject: [PATCH 6/7] docs: add multiple triggers to event --- openedx_events/learning/signals.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openedx_events/learning/signals.py b/openedx_events/learning/signals.py index 07fb55d6..ca3e169d 100644 --- a/openedx_events/learning/signals.py +++ b/openedx_events/learning/signals.py @@ -236,8 +236,8 @@ # .. event_description: Can be fired from apps to send user notifications. # .. event_data: UserNotificationSendListData # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet -# .. event_trigger_repository: openedx/edx-platform -# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py +# .. event_trigger_repository: openedx/edx-platform openedx/edx-ora2 +# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py openassessment/xblock/utils/notifications.py USER_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.notification.requested.v1", data={ From 8b6706a31fa711d0ec7be457abb556546005e861 Mon Sep 17 00:00:00 2001 From: Maria Grimaldi Date: Mon, 30 Dec 2024 12:26:48 +0100 Subject: [PATCH 7/7] refactor: disable line too long warning for line --- openedx_events/learning/signals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openedx_events/learning/signals.py b/openedx_events/learning/signals.py index ca3e169d..2226edd3 100644 --- a/openedx_events/learning/signals.py +++ b/openedx_events/learning/signals.py @@ -237,7 +237,7 @@ # .. event_data: UserNotificationSendListData # .. event_warning: This event is currently incompatible with the event bus, list/dict cannot be serialized yet # .. event_trigger_repository: openedx/edx-platform openedx/edx-ora2 -# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py openassessment/xblock/utils/notifications.py +# .. event_trigger_path: lms/djangoapps/discussion/rest_api/discussions_notifications.py openassessment/xblock/utils/notifications.py # noqa USER_NOTIFICATION_REQUESTED = OpenEdxPublicSignal( event_type="org.openedx.learning.user.notification.requested.v1", data={