Skip to content

Commit

Permalink
feat: [FC-0074] add event trigger information in code annotations (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi authored Jan 16, 2025
1 parent f0c001a commit 54cab41
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 16 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ Unreleased
__________


[9.15.2] - 2025-01-16
---------------------

Added
~~~~~

* Added new inline code annotation to include triggering information about events.

[9.15.1] - 2024-12-20
---------------------

Expand Down
2 changes: 1 addition & 1 deletion openedx_events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
more information about the project.
"""

__version__ = "9.15.1"
__version__ = "9.15.2"
1 change: 1 addition & 0 deletions openedx_events/analytics/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# .. event_key_field: tracking_log.name
# .. event_description: emitted when a tracking log is created.
# .. event_data: TrackingLogData
# .. event_trigger_repository: openedx/event-tracking
TRACKING_EVENT_EMITTED = OpenEdxPublicSignal(
event_type="org.openedx.analytics.tracking.event.emitted.v1",
data={
Expand Down
17 changes: 17 additions & 0 deletions openedx_events/content_authoring/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# .. 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
COURSE_CATALOG_INFO_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.course.catalog_info.changed.v1",
data={
Expand All @@ -38,6 +39,7 @@
# .. event_key_field: xblock_info.usage_key
# .. event_description: Fired when an XBlock is created.
# .. event_data: XBlockData
# .. event_trigger_repository: openedx/edx-platform
XBLOCK_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.xblock.created.v1",
data={
Expand All @@ -50,6 +52,7 @@
# .. event_key_field: xblock_info.usage_key
# .. event_description: Fired when an XBlock is updated.
# .. event_data: XBlockData
# .. event_trigger_repository: openedx/edx-platform
XBLOCK_UPDATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.xblock.updated.v1",
data={
Expand All @@ -67,6 +70,7 @@
# 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
XBLOCK_PUBLISHED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.xblock.published.v1",
data={
Expand All @@ -80,6 +84,7 @@
# .. event_key_field: xblock_info.usage_key
# .. event_description: Fired when an XBlock is deleted.
# .. event_data: XBlockData
# .. event_trigger_repository: openedx/edx-platform
XBLOCK_DELETED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.xblock.deleted.v1",
data={
Expand All @@ -93,6 +98,7 @@
# .. 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
XBLOCK_DUPLICATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.xblock.duplicated.v1",
data={
Expand Down Expand Up @@ -129,6 +135,7 @@
# .. event_name: COURSE_CREATED
# .. event_description: emitted when a course is created
# .. event_data: CourseData
# .. event_trigger_repository: openedx/edx-platform
COURSE_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.course.created.v1",
data={
Expand All @@ -140,6 +147,7 @@
# .. event_name: CONTENT_LIBRARY_CREATED
# .. event_description: emitted when a content library is created
# .. event_data: ContentLibraryData
# .. event_trigger_repository: openedx/edx-platform
CONTENT_LIBRARY_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.created.v1",
data={
Expand All @@ -151,6 +159,7 @@
# .. event_name: CONTENT_LIBRARY_UPDATED
# .. event_description: emitted when a content library is updated
# .. event_data: ContentLibraryData
# .. event_trigger_repository: openedx/edx-platform
CONTENT_LIBRARY_UPDATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.updated.v1",
data={
Expand All @@ -162,6 +171,7 @@
# .. event_name: CONTENT_LIBRARY_DELETED
# .. event_description: emitted when a content library is deleted
# .. event_data: ContentLibraryData
# .. event_trigger_repository: openedx/edx-platform
CONTENT_LIBRARY_DELETED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.deleted.v1",
data={
Expand All @@ -173,6 +183,7 @@
# .. event_name: LIBRARY_BLOCK_CREATED
# .. event_description: emitted when a library block is created
# .. event_data: LibraryBlockData
# .. event_trigger_repository: openedx/edx-platform
LIBRARY_BLOCK_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.library_block.created.v1",
data={
Expand All @@ -184,6 +195,7 @@
# .. event_name: LIBRARY_BLOCK_UPDATED
# .. event_description: emitted when a library block is updated
# .. event_data: LibraryBlockData
# .. event_trigger_repository: openedx/edx-platform
LIBRARY_BLOCK_UPDATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.library_block.updated.v1",
data={
Expand All @@ -195,6 +207,7 @@
# .. event_name: LIBRARY_BLOCK_DELETED
# .. event_description: emitted when a library block is deleted
# .. event_data: LibraryBlockData
# .. event_trigger_repository: openedx/edx-platform
LIBRARY_BLOCK_DELETED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.library_block.deleted.v1",
data={
Expand All @@ -206,6 +219,7 @@
# .. 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
CONTENT_OBJECT_ASSOCIATIONS_CHANGED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content.object.associations.changed.v1",
data={
Expand All @@ -229,6 +243,7 @@
# .. event_name: LIBRARY_COLLECTION_CREATED
# .. event_description: emitted when a content library collection is created
# .. event_data: LibraryCollectionData
# .. event_trigger_repository: openedx/edx-platform
LIBRARY_COLLECTION_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.collection.created.v1",
data={
Expand All @@ -240,6 +255,7 @@
# .. 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
LIBRARY_COLLECTION_UPDATED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.collection.updated.v1",
data={
Expand All @@ -251,6 +267,7 @@
# .. 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
LIBRARY_COLLECTION_DELETED = OpenEdxPublicSignal(
event_type="org.openedx.content_authoring.content_library.collection.deleted.v1",
data={
Expand Down
5 changes: 5 additions & 0 deletions openedx_events/enterprise/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
# .. 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
LEDGER_TRANSACTION_CREATED = OpenEdxPublicSignal(
event_type="org.openedx.enterprise.subsidy_ledger_transaction.created.v1",
data={
Expand All @@ -52,6 +53,7 @@
# .. 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
LEDGER_TRANSACTION_COMMITTED = OpenEdxPublicSignal(
event_type="org.openedx.enterprise.subsidy_ledger_transaction.committed.v1",
data={
Expand All @@ -65,6 +67,7 @@
# .. 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
LEDGER_TRANSACTION_FAILED = OpenEdxPublicSignal(
event_type="org.openedx.enterprise.subsidy_ledger_transaction.failed.v1",
data={
Expand All @@ -78,6 +81,7 @@
# .. 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
LEDGER_TRANSACTION_REVERSED = OpenEdxPublicSignal(
event_type="org.openedx.enterprise.subsidy_ledger_transaction.reversed.v1",
data={
Expand All @@ -91,6 +95,7 @@
# .. 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
LEARNER_CREDIT_COURSE_ENROLLMENT_REVOKED = OpenEdxPublicSignal(
event_type="org.openedx.enterprise.learner_credit_course_enrollment.revoked.v1",
data={
Expand Down
Loading

0 comments on commit 54cab41

Please sign in to comment.