Skip to content

Commit

Permalink
feat: add event_status to inline docs add ADR to support it
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi committed Aug 18, 2021
1 parent b085b04 commit cf5f8de
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/decisions/0004-events-status.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
1. Events status
================

Status
------

Draft

Context
-------

Each Open edX Event will evolve according to the needs of the community.
For that reason, with this ADR, we will define a lifecycle that each
event will follow individually.

Decision
--------

Each Open edX Event will follow the following lifecycle:

State 1. Provisional
~~~~~~~~~~~~~~~~~~~~

Events just created and accepted in the repository `openedx-events`,
these events haven't been accepted in Open edX platform or by the community.

State 2. Active
~~~~~~~~~~~~~~~

Events being used by Open edX platform and by the community.

State 3. Deprecated
~~~~~~~~~~~~~~~~~~~

Events that members of the community decide to deprecate in Open edX platform.

State 4. Removed
~~~~~~~~~~~~~~~~~

Events that members of the community removed from Open edX platform after
documentation and discussion of the removal.

State 5. Replaced
~~~~~~~~~~~~~~~~~

Events that members of the community replaced for another event after
documentation and discussion of the change.


Consequences
------------

1. Each event must carry its state in its code-annotation documentation.

2. Each event must go through each state in order. First, must be created
in this repository with the state `provisional`, when Open edX accepts it
must change to `active` and when the community decides to deprecate it, it
must be updated to `deprecated`, then `removed`.

1. Each state must be up-to-date.
9 changes: 9 additions & 0 deletions openedx_events/learning/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# .. event_name: STUDENT_REGISTRATION_COMPLETED
# .. event_description: emitted when the user registration process in the LMS is completed.
# .. event_data: UserData
# .. event_status: provisional
STUDENT_REGISTRATION_COMPLETED = OpenEdxPublicSignal(
event_type="org.openedx.learning.student.registration.completed.v1",
data={
Expand All @@ -27,6 +28,7 @@
# .. event_name: SESSION_LOGIN_COMPLETED
# .. event_description: emitted when the user's login process in the LMS is completed.
# .. event_data: UserData
# .. event_status: provisional
SESSION_LOGIN_COMPLETED = OpenEdxPublicSignal(
event_type="org.openedx.learning.auth.session.login.completed.v1",
data={
Expand All @@ -39,6 +41,7 @@
# .. event_name: COURSE_ENROLLMENT_CREATED
# .. event_description: emitted when the user's enrollment process is completed.
# .. event_data: CourseEnrollmentData
# .. event_status: provisional
COURSE_ENROLLMENT_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.learning.course.enrollment.created.v1",
data={
Expand All @@ -51,6 +54,7 @@
# .. event_name: COURSE_ENROLLMENT_CHANGED
# .. event_description: emitted when the user's enrollment update process is completed.
# .. event_data: CourseEnrollmentData
# .. event_status: provisional
COURSE_ENROLLMENT_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.learning.course.enrollment.changed.v1",
data={
Expand All @@ -63,6 +67,7 @@
# .. event_name: COURSE_ENROLLMENT_CHANGED
# .. event_description: emitted when the user's unenrollment process is completed.
# .. event_data: CourseEnrollmentData
# .. event_status: provisional
COURSE_UNENROLLMENT_COMPLETED = OpenEdxPublicSignal(
event_type="org.openedx.learning.course.unenrollment.completed.v1",
data={
Expand All @@ -75,6 +80,7 @@
# .. event_name: CERTIFICATE_CREATED
# .. event_description: emitted when the user's certificate creation process is completed.
# .. event_data: CertificateData
# .. event_status: provisional
CERTIFICATE_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.learning.certificate.created.v1",
data={
Expand All @@ -87,6 +93,7 @@
# .. event_name: CERTIFICATE_CHANGED
# .. event_description: emitted when the user's certificate update process is completed.
# .. event_data: CertificateData
# .. event_status: provisional
CERTIFICATE_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.learning.certificate.changed.v1",
data={
Expand All @@ -99,6 +106,7 @@
# .. event_name: CERTIFICATE_REVOKED
# .. event_description: emitted when the user's certificate annulation process is completed.
# .. event_data: CertificateData
# .. event_status: provisional
CERTIFICATE_REVOKED = OpenEdxPublicSignal(
event_type="org.openedx.learning.certificate.revoked.v1",
data={
Expand All @@ -111,6 +119,7 @@
# .. event_name: COHORT_MEMBERSHIP_CHANGED
# .. event_description: emitted when the user's cohort update is completed.
# .. event_data: CohortData
# .. event_status: provisional
COHORT_MEMBERSHIP_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.learning.cohort_membership.changed.v1",
data={
Expand Down

0 comments on commit cf5f8de

Please sign in to comment.