Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ annotations:
- ".. event_description:":
- ".. event_data:":
- ".. event_key_field:":
- ".. event_warning:":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the fields for events be documented somewhere? I see https://edx-toggles.readthedocs.io/en/latest/how_to/documenting_new_feature_toggles.html mentioned at L9 but it doesn't contain anything about events

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the L9 was a copy-paste error, perhaps. And yes, this should definitely be documented somewhere. I going to find them a place in the openedx-events' docs. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be good to go if you update that link 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's the PR with the updated docs: openedx/openedx-events#432

Copy link
Member Author

@mariajgrimaldi mariajgrimaldi Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Thank you both

I'll update code-annotations in openedx-events once this gets merged.

extensions:
python:
- py
Expand Down
5 changes: 5 additions & 0 deletions code_annotations/contrib/sphinx/extensions/openedx_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def iter_nodes(self):
f" {event['line_number']})"
)

if event.get(".. event_warning:") not in (None, "None", "n/a", "N/A"):
event_section += nodes.warning(
"", nodes.paragraph("", event[".. event_warning:"]), ids=[f"warning-{event_name}"]
)

subject_header += event_section

if domain_header:
Expand Down
Loading