platform-plugin-aspects 1.1.1__tar.gz → 1.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. {platform_plugin_aspects-1.1.1/platform_plugin_aspects.egg-info → platform_plugin_aspects-1.1.2}/PKG-INFO +90 -79
  2. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/README.rst +89 -78
  3. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/__init__.py +1 -1
  4. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/management/commands/load_test_tracking_events.py +2 -4
  5. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/xblock.py +2 -4
  6. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2/platform_plugin_aspects.egg-info}/PKG-INFO +90 -79
  7. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/setup.py +1 -0
  8. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/LICENSE +0 -0
  9. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/MANIFEST.in +0 -0
  10. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/apps.py +0 -0
  11. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/extensions/__init__.py +0 -0
  12. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/extensions/filters.py +0 -0
  13. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/management/__init__.py +0 -0
  14. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/management/commands/__init__.py +0 -0
  15. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/management/commands/dump_data_to_clickhouse.py +0 -0
  16. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/management/commands/monitor_load_test_tracking.py +0 -0
  17. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/settings/__init__.py +0 -0
  18. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/settings/common.py +0 -0
  19. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/settings/production.py +0 -0
  20. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/signals.py +0 -0
  21. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/__init__.py +0 -0
  22. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/base_sink.py +0 -0
  23. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/course_enrollment_sink.py +0 -0
  24. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/course_overview_sink.py +0 -0
  25. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/external_id_sink.py +0 -0
  26. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/serializers.py +0 -0
  27. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/tag_sink.py +0 -0
  28. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/user_profile_sink.py +0 -0
  29. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/sinks/user_retire_sink.py +0 -0
  30. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/css/superset.css +0 -0
  31. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/html/superset.html +0 -0
  32. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/html/superset_student.html +0 -0
  33. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/js/embed_dashboard.js +0 -0
  34. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/js/install_required.js +0 -0
  35. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/static/js/superset.js +0 -0
  36. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/tasks.py +0 -0
  37. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/templates/instructor_dashboard/aspects.html +0 -0
  38. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/urls.py +0 -0
  39. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/utils.py +0 -0
  40. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/views.py +0 -0
  41. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects/waffle.py +0 -0
  42. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/SOURCES.txt +0 -0
  43. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/dependency_links.txt +0 -0
  44. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/entry_points.txt +0 -0
  45. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/not-zip-safe +0 -0
  46. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/requires.txt +0 -0
  47. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/platform_plugin_aspects.egg-info/top_level.txt +0 -0
  48. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/requirements/base.in +0 -0
  49. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/requirements/constraints.txt +0 -0
  50. {platform_plugin_aspects-1.1.1 → platform_plugin_aspects-1.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: platform-plugin-aspects
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Aspects plugins for edx-platform
5
5
  Home-page: https://github.com/openedx/platform-plugin-aspects
6
6
  Author: Open edX Project
@@ -52,8 +52,8 @@ Platform Plugin Aspects
52
52
  Purpose
53
53
  *******
54
54
 
55
- This repository holds various Aspects plugins for the Open edX platform including the
56
- event sinks that move data from the LMS to ClickHouse and the embbedding of Superset
55
+ This repository holds various Aspects plugins for the Open edX platform, including the
56
+ event sinks that move data from the LMS to ClickHouse and the embedding of Superset
57
57
  dashboards back into the platform.
58
58
 
59
59
  Version Compatibility
@@ -71,70 +71,82 @@ events are emitted by the Open edX platform via `Open edX events`_ or Django sig
71
71
  Available Sinks
72
72
  ===============
73
73
 
74
- Below are the existing sink names, and their corresponding object names (as needed for the
74
+ Below are the existing sink names and their corresponding object names (as needed for the
75
75
  ``dump_data_to_clickhouse`` command below.
76
76
 
77
- - ``CourseOverviewSink`` - Listens for the `COURSE_PUBLISHED` event and stores the
78
- course structure including ordering data through `XBlockSink` in ClickHouse. Object name:
77
+ - ``CourseOverviewSink`` - Listens for the ``COURSE_PUBLISHED`` event and stores the
78
+ course structure, including ordering data through ``XBlockSink`` in ClickHouse. Object name:
79
79
  ``course_overviews``
80
- - ``ExternalIdSink`` - Listens for the `post_save` Django signal on the `ExternalId`
80
+ - ``ExternalIdSink`` - Listens for the ``post_save`` Django signal on the ``ExternalId``
81
81
  model and stores the external id data in ClickHouse. This model stores the relationships
82
82
  between users and their xAPI unique identifiers. Object name: ``external_id``
83
- - ``UserProfile`` - Listens for the `post_save` Django signal on the ``UserProfile``
83
+ - ``UserProfile`` - Listens for the ``post_save`` Django signal on the ``UserProfile``
84
84
  model and stores the user profile data in ClickHouse. Object name: ``user_profile``
85
- - ``CourseEnrollmentSink`` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
85
+ - ``CourseEnrollmentSink`` - Listen for the ``ENROLL_STATUS_CHANGE`` event and stores
86
86
  the course enrollment data. Object name: ``course_enrollment``
87
- - ``UserRetirementSink`` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
88
- remove the user PII information from ClickHouse. This is a special sink and has no object name.
87
+ - ``UserRetirementSink`` - Listen for the ``USER_RETIRE_LMS_MISC`` Django signal and
88
+ remove the user PII information from ClickHouse. This is a special sink with no assigned object name.
89
89
 
90
90
  Commands
91
91
  ========
92
92
 
93
93
  In addition to being an event listener, this package provides the following commands:
94
94
 
95
- - `dump_data_to_clickhouse` - This command allows bulk export of the data from the Sinks.
95
+ - ``dump_data_to_clickhouse`` - This command allows bulk export of the data from the Sinks.
96
96
  Allows bootstrapping a new data platform or backfilling lost or missing data. Each sink object
97
- is dumped individually. For large dumps you can use the --batch_size and --sleep_time to control
97
+ is dumped individually. For large dumps, you can use the ``--batch_size`` and ``--sleep_time`` to control
98
98
  how much load is placed on your LMS / Studio servers. Examples:
99
99
 
100
- Dump any courses that the systems thinks are out of date (last publish time is newer than the
101
- last dump time in ClickHouse):
100
+ Dump any courses that the system thinks are out of date (last publish time is newer than the
101
+ last dump time in ClickHouse):
102
102
 
103
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews``
103
+ .. code-block:: bash
104
104
 
105
- The ``force`` option willl dump all objects, regardless of the data ClickHouse currently has
106
- so this command will push all course data for all courses:
105
+ python manage.py cms dump_data_to_clickhouse --object course_overviews
107
106
 
108
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews --force``
107
+ The ``force`` option will dump all objects, regardless of the data ClickHouse currently has
108
+ so this command will push all course data for all courses:
109
109
 
110
- These commands will dump the user data Aspects uses when PII is turned on:
110
+ .. code-block:: bash
111
111
 
112
- ``python manage.py cms dump_data_to_clickhouse --object external_id``
113
- ``python manage.py cms dump_data_to_clickhouse --object user_profile``
112
+ python manage.py cms dump_data_to_clickhouse --object course_overviews --force
114
113
 
115
- To reduce server load, this command will dump 1000 user profiles at a time, with a 5 second
116
- sleep in between:
114
+ These commands will dump the user data Aspects uses when PII is turned on:
117
115
 
118
- ``python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5``
116
+ .. code-block:: bash
119
117
 
120
- There are many more options that can be used for different circumstances. Please refer to
121
- the commands help for more information. There is also a Tutor command that wraps this, so
122
- that you don't need to get shell on a container to execute this command. More information on
123
- that can be found in the `Aspects backfill documentation`_.
118
+ python manage.py cms dump_data_to_clickhouse --object external_id
119
+ python manage.py cms dump_data_to_clickhouse --object user_profile
124
120
 
125
- - `load_test_tracking_events` - This command allows loading test tracking events into
121
+ To reduce server load, this command will dump 1000 user profiles at a time, with a 5-second
122
+ sleep in between:
123
+
124
+ .. code-block:: bash
125
+
126
+ python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5
127
+
128
+ There are many more options that can be used for different circumstances. Please refer to
129
+ the commands help for more information. There is also a Tutor command that wraps this, so
130
+ that you don't need to get shell on a container to execute this command. More information on
131
+ that can be found in the `Aspects backfill documentation`_.
132
+
133
+ - ``load_test_tracking_events`` - This command allows loading test tracking events into
126
134
  ClickHouse. This is useful for testing the ClickHouse connection to measure the performance of the
127
- different data pipelines such as Vector, Event Bus (Redis and Kafka), and Celery.
135
+ different data pipelines, such as Vector, Event Bus (Redis and Kafka), and Celery.
128
136
 
129
- Do not use this command in production as it will generate a large amount of data
137
+ **Do not use this command in production**, as it will generate a large amount of data
130
138
  and will slow down the system.
131
139
 
132
- ``python manage.py cms load_test_tracking_events``
140
+ .. code-block:: bash
141
+
142
+ python manage.py cms load_test_tracking_events
133
143
 
134
- - `monitor_load_test_tracking` - Monitors the load test tracking script and saves
144
+ - ``monitor_load_test_tracking`` - Monitors the load test tracking script and saves
135
145
  output for later analysis.
136
146
 
137
- ``python manage.py cms monitor_load_test_tracking``
147
+ .. code-block:: bash
148
+
149
+ python manage.py cms monitor_load_test_tracking
138
150
 
139
151
  Instructor Dashboard Integration
140
152
  ================================
@@ -150,10 +162,10 @@ Please see the Open edX documentation for `guidance on Python development <https
150
162
  Deploying
151
163
  *********
152
164
 
153
- The `Platform Plugin Aspects` component is a django plugin which doesn't
165
+ The ``Platform Plugin Aspects`` component is a django plugin that doesn't
154
166
  need independent deployment. Therefore, its setup is reasonably straightforward.
155
167
  First, it needs to be added to your service requirements, and then it will be
156
- installed alongside requirements of the service.
168
+ installed alongside the requirements of the service.
157
169
 
158
170
  Configuration
159
171
  *************
@@ -165,80 +177,79 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
165
177
  the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
166
178
  superset pipeline into the filter as follows:
167
179
 
168
- .. code-block:: python
180
+ .. code-block:: python
169
181
 
170
- OPEN_EDX_FILTERS_CONFIG = {
171
- "org.openedx.learning.instructor.dashboard.render.started.v1": {
172
- "fail_silently": False,
173
- "pipeline": [
174
- "platform_plugin_superset.extensions.filters.AddSupersetTab",
175
- ]
176
- },
177
- }
182
+ OPEN_EDX_FILTERS_CONFIG = {
183
+ "org.openedx.learning.instructor.dashboard.render.started.v1": {
184
+ "fail_silently": False,
185
+ "pipeline": [
186
+ "platform_plugin_superset.extensions.filters.AddSupersetTab",
187
+ ]
188
+ },
189
+ }
178
190
 
179
- - `SUPERSET_CONFIG` - This setting is used to configure the Superset Embedded SDK.
191
+ - ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
180
192
  The configuration is a dictionary that contains the following keys:
181
193
 
182
- - `internal_service_url` - The URL of the Superset instance (useful in development, omit in production).
183
- - `service_url` - The URL of the Superset instance.
184
- - `username` - The username of the Superset user.
185
- - `password` - The password of the Superset user.
194
+ - ``internal_service_url`` - The URL of the Superset instance (useful in development, omit in production).
195
+ - ``service_url`` - The URL of the Superset instance.
196
+ - ``username`` - The username of the Superset user.
197
+ - ``password`` - The password of the Superset user.
186
198
 
187
- - `ASPECTS_INSTRUCTOR_DASHBOARDS` - This setting is used to configure the dashboards
199
+ - ``ASPECTS_INSTRUCTOR_DASHBOARDS`` - This setting is used to configure the dashboards
188
200
  that will be displayed in the Instructor Dashboard. The configuration is a list of
189
201
  dictionaries that contains the following keys:
190
202
 
191
- - `name` - The name of the dashboard.
192
- - `slug` - The slug of the dashboard.
193
- - `uuid` - The UUID of the dashboard.
194
- - `allow_translations` - A boolean value that determines if the dashboard
195
- is translated in `Aspects`_.
203
+ - ``name`` - The name of the dashboard.
204
+ - ``slug`` - The slug of the dashboard.
205
+ - ``uuid`` - The UUID of the dashboard.
206
+ - ``allow_translations`` - A boolean value that determines if the dashboard is translated in `Aspects`_.
196
207
 
197
- - `SUPERSET_EXTRA_FILTERS_FORMAT` - This setting is used to configure the extra filters
208
+ - ``SUPERSET_EXTRA_FILTERS_FORMAT`` - This setting is used to configure the extra filters
198
209
  that will be applied to the dashboards. The configuration is a list of strings that
199
210
  can be formatted with the following variables:
200
211
 
201
- - `user` - The user object.
202
- - `course` - The course object.
212
+ - ``user`` - The user object.
213
+ - ``course`` - The course object.
203
214
 
204
- - `SUPERSET_DASHBOARD_LOCALES` - This setting is used to configure the available locales
215
+ - ``SUPERSET_DASHBOARD_LOCALES`` - This setting is used to configure the available locales
205
216
  for the dashboards. The configuration is a list of supported locales by `Aspects`_.
206
217
 
207
- - `ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS` - This setting turns on and off the in-context
208
- metrics feature. It must be turned off in Open edX releases before Sumac and when using
209
- tutor-contrib-aspects before v2.2.0 as those dashboards will not exist, causing errors in
218
+ - ``ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS`` - This setting turns on and off the in-context
219
+ metrics feature. It must be turned off in Open edX releases before Sumac, and when using
220
+ ``tutor-contrib-aspects`` before v2.2.0, as those dashboards will not exist, causing errors in
210
221
  the embedded Instructor Dashboards.
211
222
 
212
- - `ASPECTS_IN_CONTEXT_DASHBOARDS` - This setting mirrors the `ASPECTS_INSTRUCTOR_DASHBOARDS` but
223
+ - ``ASPECTS_IN_CONTEXT_DASHBOARDS`` - This setting mirrors the ``ASPECTS_INSTRUCTOR_DASHBOARDS``, but
213
224
  with additional keys used for filtering the boards to specific courses and blocks.
214
225
 
215
226
  Event Sink Configuration
216
227
  ========================
217
228
 
218
- - `EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG` - This setting is used to configure the ClickHouse
229
+ - ``EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG`` - This setting is used to configure the ClickHouse
219
230
  connection. The configuration is a dictionary that contains the following keys:
220
231
 
221
- - `url` - The host of the ClickHouse instance.
222
- - `database` - The database name.
223
- - `username` - The username of the ClickHouse user.
224
- - `password` - The password of the ClickHouse user.
225
- - `timeout_secs` - The timeout in seconds for the ClickHouse connection.
232
+ - ``url`` - The host of the ClickHouse instance.
233
+ - ``database`` - The database name.
234
+ - ``username`` - The username of the ClickHouse user.
235
+ - ``password`` - The password of the ClickHouse user.
236
+ - ``timeout_secs`` - The timeout in seconds for the ClickHouse connection.
226
237
 
227
- - `EVENT_SINK_CLICKHOUSE_PII_MODELS` - This setting is used to configure the models that
238
+ - ``EVENT_SINK_CLICKHOUSE_PII_MODELS`` - This setting is used to configure the models that
228
239
  contain PII information. The configuration is a list of strings that contain the
229
240
  table names where the PII information is stored.
230
241
 
231
- - `EVENT_SINK_CLICKHOUSE_MODEL_CONFIG` - This setting is used to provide compatibility
242
+ - ``EVENT_SINK_CLICKHOUSE_MODEL_CONFIG`` - This setting is used to provide compatibility
232
243
  with multiple Open edX models. The configuration is a dictionary that contains the
233
- following a key per model that contains a dictionary with the following keys:
244
+ following: a key per model that contains a dictionary with the following keys:
234
245
 
235
- - `module` - The module path of the model.
236
- - `model` - The model class name.
246
+ - ``module`` - The module path of the model.
247
+ - ``model`` - The model class name.
237
248
 
238
249
  Event Sinks are disabled by default. To enable them, you need to enable the following
239
- waffle flag: `event_sink_clickhouse.{{model_name}}.enabled` where model name is the name
250
+ waffle flag: ``event_sink_clickhouse.{{model_name}}.enabled``, where model_name is the name
240
251
  of the model that you want to enable. Or, you can enable them via settings by setting
241
- `EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED` to `True`.
252
+ ``EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED`` to ``True``.
242
253
 
243
254
 
244
255
  Getting Help
@@ -255,7 +266,7 @@ More Help
255
266
  =========
256
267
 
257
268
  If you're having trouble, we have discussion forums at
258
- https://discuss.openedx.org where you can connect with others in the
269
+ https://discuss.openedx.org, where you can connect with others in the
259
270
  community.
260
271
 
261
272
  Our real-time conversations are on Slack. You can request a `Slack
@@ -4,8 +4,8 @@ Platform Plugin Aspects
4
4
  Purpose
5
5
  *******
6
6
 
7
- This repository holds various Aspects plugins for the Open edX platform including the
8
- event sinks that move data from the LMS to ClickHouse and the embbedding of Superset
7
+ This repository holds various Aspects plugins for the Open edX platform, including the
8
+ event sinks that move data from the LMS to ClickHouse and the embedding of Superset
9
9
  dashboards back into the platform.
10
10
 
11
11
  Version Compatibility
@@ -23,70 +23,82 @@ events are emitted by the Open edX platform via `Open edX events`_ or Django sig
23
23
  Available Sinks
24
24
  ===============
25
25
 
26
- Below are the existing sink names, and their corresponding object names (as needed for the
26
+ Below are the existing sink names and their corresponding object names (as needed for the
27
27
  ``dump_data_to_clickhouse`` command below.
28
28
 
29
- - ``CourseOverviewSink`` - Listens for the `COURSE_PUBLISHED` event and stores the
30
- course structure including ordering data through `XBlockSink` in ClickHouse. Object name:
29
+ - ``CourseOverviewSink`` - Listens for the ``COURSE_PUBLISHED`` event and stores the
30
+ course structure, including ordering data through ``XBlockSink`` in ClickHouse. Object name:
31
31
  ``course_overviews``
32
- - ``ExternalIdSink`` - Listens for the `post_save` Django signal on the `ExternalId`
32
+ - ``ExternalIdSink`` - Listens for the ``post_save`` Django signal on the ``ExternalId``
33
33
  model and stores the external id data in ClickHouse. This model stores the relationships
34
34
  between users and their xAPI unique identifiers. Object name: ``external_id``
35
- - ``UserProfile`` - Listens for the `post_save` Django signal on the ``UserProfile``
35
+ - ``UserProfile`` - Listens for the ``post_save`` Django signal on the ``UserProfile``
36
36
  model and stores the user profile data in ClickHouse. Object name: ``user_profile``
37
- - ``CourseEnrollmentSink`` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
37
+ - ``CourseEnrollmentSink`` - Listen for the ``ENROLL_STATUS_CHANGE`` event and stores
38
38
  the course enrollment data. Object name: ``course_enrollment``
39
- - ``UserRetirementSink`` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
40
- remove the user PII information from ClickHouse. This is a special sink and has no object name.
39
+ - ``UserRetirementSink`` - Listen for the ``USER_RETIRE_LMS_MISC`` Django signal and
40
+ remove the user PII information from ClickHouse. This is a special sink with no assigned object name.
41
41
 
42
42
  Commands
43
43
  ========
44
44
 
45
45
  In addition to being an event listener, this package provides the following commands:
46
46
 
47
- - `dump_data_to_clickhouse` - This command allows bulk export of the data from the Sinks.
47
+ - ``dump_data_to_clickhouse`` - This command allows bulk export of the data from the Sinks.
48
48
  Allows bootstrapping a new data platform or backfilling lost or missing data. Each sink object
49
- is dumped individually. For large dumps you can use the --batch_size and --sleep_time to control
49
+ is dumped individually. For large dumps, you can use the ``--batch_size`` and ``--sleep_time`` to control
50
50
  how much load is placed on your LMS / Studio servers. Examples:
51
51
 
52
- Dump any courses that the systems thinks are out of date (last publish time is newer than the
53
- last dump time in ClickHouse):
52
+ Dump any courses that the system thinks are out of date (last publish time is newer than the
53
+ last dump time in ClickHouse):
54
54
 
55
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews``
55
+ .. code-block:: bash
56
56
 
57
- The ``force`` option willl dump all objects, regardless of the data ClickHouse currently has
58
- so this command will push all course data for all courses:
57
+ python manage.py cms dump_data_to_clickhouse --object course_overviews
59
58
 
60
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews --force``
59
+ The ``force`` option will dump all objects, regardless of the data ClickHouse currently has
60
+ so this command will push all course data for all courses:
61
61
 
62
- These commands will dump the user data Aspects uses when PII is turned on:
62
+ .. code-block:: bash
63
63
 
64
- ``python manage.py cms dump_data_to_clickhouse --object external_id``
65
- ``python manage.py cms dump_data_to_clickhouse --object user_profile``
64
+ python manage.py cms dump_data_to_clickhouse --object course_overviews --force
66
65
 
67
- To reduce server load, this command will dump 1000 user profiles at a time, with a 5 second
68
- sleep in between:
66
+ These commands will dump the user data Aspects uses when PII is turned on:
69
67
 
70
- ``python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5``
68
+ .. code-block:: bash
71
69
 
72
- There are many more options that can be used for different circumstances. Please refer to
73
- the commands help for more information. There is also a Tutor command that wraps this, so
74
- that you don't need to get shell on a container to execute this command. More information on
75
- that can be found in the `Aspects backfill documentation`_.
70
+ python manage.py cms dump_data_to_clickhouse --object external_id
71
+ python manage.py cms dump_data_to_clickhouse --object user_profile
76
72
 
77
- - `load_test_tracking_events` - This command allows loading test tracking events into
73
+ To reduce server load, this command will dump 1000 user profiles at a time, with a 5-second
74
+ sleep in between:
75
+
76
+ .. code-block:: bash
77
+
78
+ python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5
79
+
80
+ There are many more options that can be used for different circumstances. Please refer to
81
+ the commands help for more information. There is also a Tutor command that wraps this, so
82
+ that you don't need to get shell on a container to execute this command. More information on
83
+ that can be found in the `Aspects backfill documentation`_.
84
+
85
+ - ``load_test_tracking_events`` - This command allows loading test tracking events into
78
86
  ClickHouse. This is useful for testing the ClickHouse connection to measure the performance of the
79
- different data pipelines such as Vector, Event Bus (Redis and Kafka), and Celery.
87
+ different data pipelines, such as Vector, Event Bus (Redis and Kafka), and Celery.
80
88
 
81
- Do not use this command in production as it will generate a large amount of data
89
+ **Do not use this command in production**, as it will generate a large amount of data
82
90
  and will slow down the system.
83
91
 
84
- ``python manage.py cms load_test_tracking_events``
92
+ .. code-block:: bash
93
+
94
+ python manage.py cms load_test_tracking_events
85
95
 
86
- - `monitor_load_test_tracking` - Monitors the load test tracking script and saves
96
+ - ``monitor_load_test_tracking`` - Monitors the load test tracking script and saves
87
97
  output for later analysis.
88
98
 
89
- ``python manage.py cms monitor_load_test_tracking``
99
+ .. code-block:: bash
100
+
101
+ python manage.py cms monitor_load_test_tracking
90
102
 
91
103
  Instructor Dashboard Integration
92
104
  ================================
@@ -102,10 +114,10 @@ Please see the Open edX documentation for `guidance on Python development <https
102
114
  Deploying
103
115
  *********
104
116
 
105
- The `Platform Plugin Aspects` component is a django plugin which doesn't
117
+ The ``Platform Plugin Aspects`` component is a django plugin that doesn't
106
118
  need independent deployment. Therefore, its setup is reasonably straightforward.
107
119
  First, it needs to be added to your service requirements, and then it will be
108
- installed alongside requirements of the service.
120
+ installed alongside the requirements of the service.
109
121
 
110
122
  Configuration
111
123
  *************
@@ -117,80 +129,79 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
117
129
  the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
118
130
  superset pipeline into the filter as follows:
119
131
 
120
- .. code-block:: python
132
+ .. code-block:: python
121
133
 
122
- OPEN_EDX_FILTERS_CONFIG = {
123
- "org.openedx.learning.instructor.dashboard.render.started.v1": {
124
- "fail_silently": False,
125
- "pipeline": [
126
- "platform_plugin_superset.extensions.filters.AddSupersetTab",
127
- ]
128
- },
129
- }
134
+ OPEN_EDX_FILTERS_CONFIG = {
135
+ "org.openedx.learning.instructor.dashboard.render.started.v1": {
136
+ "fail_silently": False,
137
+ "pipeline": [
138
+ "platform_plugin_superset.extensions.filters.AddSupersetTab",
139
+ ]
140
+ },
141
+ }
130
142
 
131
- - `SUPERSET_CONFIG` - This setting is used to configure the Superset Embedded SDK.
143
+ - ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
132
144
  The configuration is a dictionary that contains the following keys:
133
145
 
134
- - `internal_service_url` - The URL of the Superset instance (useful in development, omit in production).
135
- - `service_url` - The URL of the Superset instance.
136
- - `username` - The username of the Superset user.
137
- - `password` - The password of the Superset user.
146
+ - ``internal_service_url`` - The URL of the Superset instance (useful in development, omit in production).
147
+ - ``service_url`` - The URL of the Superset instance.
148
+ - ``username`` - The username of the Superset user.
149
+ - ``password`` - The password of the Superset user.
138
150
 
139
- - `ASPECTS_INSTRUCTOR_DASHBOARDS` - This setting is used to configure the dashboards
151
+ - ``ASPECTS_INSTRUCTOR_DASHBOARDS`` - This setting is used to configure the dashboards
140
152
  that will be displayed in the Instructor Dashboard. The configuration is a list of
141
153
  dictionaries that contains the following keys:
142
154
 
143
- - `name` - The name of the dashboard.
144
- - `slug` - The slug of the dashboard.
145
- - `uuid` - The UUID of the dashboard.
146
- - `allow_translations` - A boolean value that determines if the dashboard
147
- is translated in `Aspects`_.
155
+ - ``name`` - The name of the dashboard.
156
+ - ``slug`` - The slug of the dashboard.
157
+ - ``uuid`` - The UUID of the dashboard.
158
+ - ``allow_translations`` - A boolean value that determines if the dashboard is translated in `Aspects`_.
148
159
 
149
- - `SUPERSET_EXTRA_FILTERS_FORMAT` - This setting is used to configure the extra filters
160
+ - ``SUPERSET_EXTRA_FILTERS_FORMAT`` - This setting is used to configure the extra filters
150
161
  that will be applied to the dashboards. The configuration is a list of strings that
151
162
  can be formatted with the following variables:
152
163
 
153
- - `user` - The user object.
154
- - `course` - The course object.
164
+ - ``user`` - The user object.
165
+ - ``course`` - The course object.
155
166
 
156
- - `SUPERSET_DASHBOARD_LOCALES` - This setting is used to configure the available locales
167
+ - ``SUPERSET_DASHBOARD_LOCALES`` - This setting is used to configure the available locales
157
168
  for the dashboards. The configuration is a list of supported locales by `Aspects`_.
158
169
 
159
- - `ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS` - This setting turns on and off the in-context
160
- metrics feature. It must be turned off in Open edX releases before Sumac and when using
161
- tutor-contrib-aspects before v2.2.0 as those dashboards will not exist, causing errors in
170
+ - ``ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS`` - This setting turns on and off the in-context
171
+ metrics feature. It must be turned off in Open edX releases before Sumac, and when using
172
+ ``tutor-contrib-aspects`` before v2.2.0, as those dashboards will not exist, causing errors in
162
173
  the embedded Instructor Dashboards.
163
174
 
164
- - `ASPECTS_IN_CONTEXT_DASHBOARDS` - This setting mirrors the `ASPECTS_INSTRUCTOR_DASHBOARDS` but
175
+ - ``ASPECTS_IN_CONTEXT_DASHBOARDS`` - This setting mirrors the ``ASPECTS_INSTRUCTOR_DASHBOARDS``, but
165
176
  with additional keys used for filtering the boards to specific courses and blocks.
166
177
 
167
178
  Event Sink Configuration
168
179
  ========================
169
180
 
170
- - `EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG` - This setting is used to configure the ClickHouse
181
+ - ``EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG`` - This setting is used to configure the ClickHouse
171
182
  connection. The configuration is a dictionary that contains the following keys:
172
183
 
173
- - `url` - The host of the ClickHouse instance.
174
- - `database` - The database name.
175
- - `username` - The username of the ClickHouse user.
176
- - `password` - The password of the ClickHouse user.
177
- - `timeout_secs` - The timeout in seconds for the ClickHouse connection.
184
+ - ``url`` - The host of the ClickHouse instance.
185
+ - ``database`` - The database name.
186
+ - ``username`` - The username of the ClickHouse user.
187
+ - ``password`` - The password of the ClickHouse user.
188
+ - ``timeout_secs`` - The timeout in seconds for the ClickHouse connection.
178
189
 
179
- - `EVENT_SINK_CLICKHOUSE_PII_MODELS` - This setting is used to configure the models that
190
+ - ``EVENT_SINK_CLICKHOUSE_PII_MODELS`` - This setting is used to configure the models that
180
191
  contain PII information. The configuration is a list of strings that contain the
181
192
  table names where the PII information is stored.
182
193
 
183
- - `EVENT_SINK_CLICKHOUSE_MODEL_CONFIG` - This setting is used to provide compatibility
194
+ - ``EVENT_SINK_CLICKHOUSE_MODEL_CONFIG`` - This setting is used to provide compatibility
184
195
  with multiple Open edX models. The configuration is a dictionary that contains the
185
- following a key per model that contains a dictionary with the following keys:
196
+ following: a key per model that contains a dictionary with the following keys:
186
197
 
187
- - `module` - The module path of the model.
188
- - `model` - The model class name.
198
+ - ``module`` - The module path of the model.
199
+ - ``model`` - The model class name.
189
200
 
190
201
  Event Sinks are disabled by default. To enable them, you need to enable the following
191
- waffle flag: `event_sink_clickhouse.{{model_name}}.enabled` where model name is the name
202
+ waffle flag: ``event_sink_clickhouse.{{model_name}}.enabled``, where model_name is the name
192
203
  of the model that you want to enable. Or, you can enable them via settings by setting
193
- `EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED` to `True`.
204
+ ``EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED`` to ``True``.
194
205
 
195
206
 
196
207
  Getting Help
@@ -207,7 +218,7 @@ More Help
207
218
  =========
208
219
 
209
220
  If you're having trouble, we have discussion forums at
210
- https://discuss.openedx.org where you can connect with others in the
221
+ https://discuss.openedx.org, where you can connect with others in the
211
222
  community.
212
223
 
213
224
  Our real-time conversations are on Slack. You can request a `Slack
@@ -5,6 +5,6 @@ Aspects plugins for edx-platform.
5
5
  import os
6
6
  from pathlib import Path
7
7
 
8
- __version__ = "1.1.1"
8
+ __version__ = "1.1.2"
9
9
 
10
10
  ROOT_DIRECTORY = Path(os.path.dirname(os.path.abspath(__file__)))
@@ -99,15 +99,13 @@ class LoadTest:
99
99
  "display_name": f"Course {self.course_shortname}",
100
100
  }
101
101
 
102
- log.info(
103
- f"""Creating course:
102
+ log.info(f"""Creating course:
104
103
  Instructor: {self.instructor.id}
105
104
  Org: "OEX"
106
105
  Number: "{self.course_shortname}"
107
106
  Run: "2024-1"
108
107
  Fields: {fields}
109
- """
110
- )
108
+ """)
111
109
 
112
110
  self.course = create_new_course_in_store(
113
111
  ModuleStoreEnum.Type.split,
@@ -62,12 +62,10 @@ class SupersetXBlock(StudioEditableXBlockMixin, XBlock):
62
62
 
63
63
  filters = List(
64
64
  display_name=_("Filters"),
65
- help=_(
66
- """List of SQL filters to apply to the
65
+ help=_("""List of SQL filters to apply to the
67
66
  dashboard. E.g: ["org='edX'", "country in ('us', 'co')"]
68
67
  The fields used here must be available on every dataset used by the dashboard.
69
- """
70
- ),
68
+ """),
71
69
  default=[],
72
70
  scope=Scope.settings,
73
71
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: platform-plugin-aspects
3
- Version: 1.1.1
3
+ Version: 1.1.2
4
4
  Summary: Aspects plugins for edx-platform
5
5
  Home-page: https://github.com/openedx/platform-plugin-aspects
6
6
  Author: Open edX Project
@@ -52,8 +52,8 @@ Platform Plugin Aspects
52
52
  Purpose
53
53
  *******
54
54
 
55
- This repository holds various Aspects plugins for the Open edX platform including the
56
- event sinks that move data from the LMS to ClickHouse and the embbedding of Superset
55
+ This repository holds various Aspects plugins for the Open edX platform, including the
56
+ event sinks that move data from the LMS to ClickHouse and the embedding of Superset
57
57
  dashboards back into the platform.
58
58
 
59
59
  Version Compatibility
@@ -71,70 +71,82 @@ events are emitted by the Open edX platform via `Open edX events`_ or Django sig
71
71
  Available Sinks
72
72
  ===============
73
73
 
74
- Below are the existing sink names, and their corresponding object names (as needed for the
74
+ Below are the existing sink names and their corresponding object names (as needed for the
75
75
  ``dump_data_to_clickhouse`` command below.
76
76
 
77
- - ``CourseOverviewSink`` - Listens for the `COURSE_PUBLISHED` event and stores the
78
- course structure including ordering data through `XBlockSink` in ClickHouse. Object name:
77
+ - ``CourseOverviewSink`` - Listens for the ``COURSE_PUBLISHED`` event and stores the
78
+ course structure, including ordering data through ``XBlockSink`` in ClickHouse. Object name:
79
79
  ``course_overviews``
80
- - ``ExternalIdSink`` - Listens for the `post_save` Django signal on the `ExternalId`
80
+ - ``ExternalIdSink`` - Listens for the ``post_save`` Django signal on the ``ExternalId``
81
81
  model and stores the external id data in ClickHouse. This model stores the relationships
82
82
  between users and their xAPI unique identifiers. Object name: ``external_id``
83
- - ``UserProfile`` - Listens for the `post_save` Django signal on the ``UserProfile``
83
+ - ``UserProfile`` - Listens for the ``post_save`` Django signal on the ``UserProfile``
84
84
  model and stores the user profile data in ClickHouse. Object name: ``user_profile``
85
- - ``CourseEnrollmentSink`` - Listen for the `ENROLL_STATUS_CHANGE` event and stores
85
+ - ``CourseEnrollmentSink`` - Listen for the ``ENROLL_STATUS_CHANGE`` event and stores
86
86
  the course enrollment data. Object name: ``course_enrollment``
87
- - ``UserRetirementSink`` - Listen for the `USER_RETIRE_LMS_MISC` Django signal and
88
- remove the user PII information from ClickHouse. This is a special sink and has no object name.
87
+ - ``UserRetirementSink`` - Listen for the ``USER_RETIRE_LMS_MISC`` Django signal and
88
+ remove the user PII information from ClickHouse. This is a special sink with no assigned object name.
89
89
 
90
90
  Commands
91
91
  ========
92
92
 
93
93
  In addition to being an event listener, this package provides the following commands:
94
94
 
95
- - `dump_data_to_clickhouse` - This command allows bulk export of the data from the Sinks.
95
+ - ``dump_data_to_clickhouse`` - This command allows bulk export of the data from the Sinks.
96
96
  Allows bootstrapping a new data platform or backfilling lost or missing data. Each sink object
97
- is dumped individually. For large dumps you can use the --batch_size and --sleep_time to control
97
+ is dumped individually. For large dumps, you can use the ``--batch_size`` and ``--sleep_time`` to control
98
98
  how much load is placed on your LMS / Studio servers. Examples:
99
99
 
100
- Dump any courses that the systems thinks are out of date (last publish time is newer than the
101
- last dump time in ClickHouse):
100
+ Dump any courses that the system thinks are out of date (last publish time is newer than the
101
+ last dump time in ClickHouse):
102
102
 
103
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews``
103
+ .. code-block:: bash
104
104
 
105
- The ``force`` option willl dump all objects, regardless of the data ClickHouse currently has
106
- so this command will push all course data for all courses:
105
+ python manage.py cms dump_data_to_clickhouse --object course_overviews
107
106
 
108
- ``python manage.py cms dump_data_to_clickhouse --object course_overviews --force``
107
+ The ``force`` option will dump all objects, regardless of the data ClickHouse currently has
108
+ so this command will push all course data for all courses:
109
109
 
110
- These commands will dump the user data Aspects uses when PII is turned on:
110
+ .. code-block:: bash
111
111
 
112
- ``python manage.py cms dump_data_to_clickhouse --object external_id``
113
- ``python manage.py cms dump_data_to_clickhouse --object user_profile``
112
+ python manage.py cms dump_data_to_clickhouse --object course_overviews --force
114
113
 
115
- To reduce server load, this command will dump 1000 user profiles at a time, with a 5 second
116
- sleep in between:
114
+ These commands will dump the user data Aspects uses when PII is turned on:
117
115
 
118
- ``python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5``
116
+ .. code-block:: bash
119
117
 
120
- There are many more options that can be used for different circumstances. Please refer to
121
- the commands help for more information. There is also a Tutor command that wraps this, so
122
- that you don't need to get shell on a container to execute this command. More information on
123
- that can be found in the `Aspects backfill documentation`_.
118
+ python manage.py cms dump_data_to_clickhouse --object external_id
119
+ python manage.py cms dump_data_to_clickhouse --object user_profile
124
120
 
125
- - `load_test_tracking_events` - This command allows loading test tracking events into
121
+ To reduce server load, this command will dump 1000 user profiles at a time, with a 5-second
122
+ sleep in between:
123
+
124
+ .. code-block:: bash
125
+
126
+ python manage.py cms dump_data_to_clickhouse --object user_profile --batch_size 1000 --sleep_time 5
127
+
128
+ There are many more options that can be used for different circumstances. Please refer to
129
+ the commands help for more information. There is also a Tutor command that wraps this, so
130
+ that you don't need to get shell on a container to execute this command. More information on
131
+ that can be found in the `Aspects backfill documentation`_.
132
+
133
+ - ``load_test_tracking_events`` - This command allows loading test tracking events into
126
134
  ClickHouse. This is useful for testing the ClickHouse connection to measure the performance of the
127
- different data pipelines such as Vector, Event Bus (Redis and Kafka), and Celery.
135
+ different data pipelines, such as Vector, Event Bus (Redis and Kafka), and Celery.
128
136
 
129
- Do not use this command in production as it will generate a large amount of data
137
+ **Do not use this command in production**, as it will generate a large amount of data
130
138
  and will slow down the system.
131
139
 
132
- ``python manage.py cms load_test_tracking_events``
140
+ .. code-block:: bash
141
+
142
+ python manage.py cms load_test_tracking_events
133
143
 
134
- - `monitor_load_test_tracking` - Monitors the load test tracking script and saves
144
+ - ``monitor_load_test_tracking`` - Monitors the load test tracking script and saves
135
145
  output for later analysis.
136
146
 
137
- ``python manage.py cms monitor_load_test_tracking``
147
+ .. code-block:: bash
148
+
149
+ python manage.py cms monitor_load_test_tracking
138
150
 
139
151
  Instructor Dashboard Integration
140
152
  ================================
@@ -150,10 +162,10 @@ Please see the Open edX documentation for `guidance on Python development <https
150
162
  Deploying
151
163
  *********
152
164
 
153
- The `Platform Plugin Aspects` component is a django plugin which doesn't
165
+ The ``Platform Plugin Aspects`` component is a django plugin that doesn't
154
166
  need independent deployment. Therefore, its setup is reasonably straightforward.
155
167
  First, it needs to be added to your service requirements, and then it will be
156
- installed alongside requirements of the service.
168
+ installed alongside the requirements of the service.
157
169
 
158
170
  Configuration
159
171
  *************
@@ -165,80 +177,79 @@ The Instructor Dashboard integration uses the `Open edX Filters`_. To learn more
165
177
  the filters, see the `Open edX Filters`_ documentation. Make sure to configure the
166
178
  superset pipeline into the filter as follows:
167
179
 
168
- .. code-block:: python
180
+ .. code-block:: python
169
181
 
170
- OPEN_EDX_FILTERS_CONFIG = {
171
- "org.openedx.learning.instructor.dashboard.render.started.v1": {
172
- "fail_silently": False,
173
- "pipeline": [
174
- "platform_plugin_superset.extensions.filters.AddSupersetTab",
175
- ]
176
- },
177
- }
182
+ OPEN_EDX_FILTERS_CONFIG = {
183
+ "org.openedx.learning.instructor.dashboard.render.started.v1": {
184
+ "fail_silently": False,
185
+ "pipeline": [
186
+ "platform_plugin_superset.extensions.filters.AddSupersetTab",
187
+ ]
188
+ },
189
+ }
178
190
 
179
- - `SUPERSET_CONFIG` - This setting is used to configure the Superset Embedded SDK.
191
+ - ``SUPERSET_CONFIG`` - This setting is used to configure the Superset Embedded SDK.
180
192
  The configuration is a dictionary that contains the following keys:
181
193
 
182
- - `internal_service_url` - The URL of the Superset instance (useful in development, omit in production).
183
- - `service_url` - The URL of the Superset instance.
184
- - `username` - The username of the Superset user.
185
- - `password` - The password of the Superset user.
194
+ - ``internal_service_url`` - The URL of the Superset instance (useful in development, omit in production).
195
+ - ``service_url`` - The URL of the Superset instance.
196
+ - ``username`` - The username of the Superset user.
197
+ - ``password`` - The password of the Superset user.
186
198
 
187
- - `ASPECTS_INSTRUCTOR_DASHBOARDS` - This setting is used to configure the dashboards
199
+ - ``ASPECTS_INSTRUCTOR_DASHBOARDS`` - This setting is used to configure the dashboards
188
200
  that will be displayed in the Instructor Dashboard. The configuration is a list of
189
201
  dictionaries that contains the following keys:
190
202
 
191
- - `name` - The name of the dashboard.
192
- - `slug` - The slug of the dashboard.
193
- - `uuid` - The UUID of the dashboard.
194
- - `allow_translations` - A boolean value that determines if the dashboard
195
- is translated in `Aspects`_.
203
+ - ``name`` - The name of the dashboard.
204
+ - ``slug`` - The slug of the dashboard.
205
+ - ``uuid`` - The UUID of the dashboard.
206
+ - ``allow_translations`` - A boolean value that determines if the dashboard is translated in `Aspects`_.
196
207
 
197
- - `SUPERSET_EXTRA_FILTERS_FORMAT` - This setting is used to configure the extra filters
208
+ - ``SUPERSET_EXTRA_FILTERS_FORMAT`` - This setting is used to configure the extra filters
198
209
  that will be applied to the dashboards. The configuration is a list of strings that
199
210
  can be formatted with the following variables:
200
211
 
201
- - `user` - The user object.
202
- - `course` - The course object.
212
+ - ``user`` - The user object.
213
+ - ``course`` - The course object.
203
214
 
204
- - `SUPERSET_DASHBOARD_LOCALES` - This setting is used to configure the available locales
215
+ - ``SUPERSET_DASHBOARD_LOCALES`` - This setting is used to configure the available locales
205
216
  for the dashboards. The configuration is a list of supported locales by `Aspects`_.
206
217
 
207
- - `ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS` - This setting turns on and off the in-context
208
- metrics feature. It must be turned off in Open edX releases before Sumac and when using
209
- tutor-contrib-aspects before v2.2.0 as those dashboards will not exist, causing errors in
218
+ - ``ASPECTS_ENABLE_STUDIO_IN_CONTEXT_METRICS`` - This setting turns on and off the in-context
219
+ metrics feature. It must be turned off in Open edX releases before Sumac, and when using
220
+ ``tutor-contrib-aspects`` before v2.2.0, as those dashboards will not exist, causing errors in
210
221
  the embedded Instructor Dashboards.
211
222
 
212
- - `ASPECTS_IN_CONTEXT_DASHBOARDS` - This setting mirrors the `ASPECTS_INSTRUCTOR_DASHBOARDS` but
223
+ - ``ASPECTS_IN_CONTEXT_DASHBOARDS`` - This setting mirrors the ``ASPECTS_INSTRUCTOR_DASHBOARDS``, but
213
224
  with additional keys used for filtering the boards to specific courses and blocks.
214
225
 
215
226
  Event Sink Configuration
216
227
  ========================
217
228
 
218
- - `EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG` - This setting is used to configure the ClickHouse
229
+ - ``EVENT_SINK_CLICKHOUSE_BACKEND_CONFIG`` - This setting is used to configure the ClickHouse
219
230
  connection. The configuration is a dictionary that contains the following keys:
220
231
 
221
- - `url` - The host of the ClickHouse instance.
222
- - `database` - The database name.
223
- - `username` - The username of the ClickHouse user.
224
- - `password` - The password of the ClickHouse user.
225
- - `timeout_secs` - The timeout in seconds for the ClickHouse connection.
232
+ - ``url`` - The host of the ClickHouse instance.
233
+ - ``database`` - The database name.
234
+ - ``username`` - The username of the ClickHouse user.
235
+ - ``password`` - The password of the ClickHouse user.
236
+ - ``timeout_secs`` - The timeout in seconds for the ClickHouse connection.
226
237
 
227
- - `EVENT_SINK_CLICKHOUSE_PII_MODELS` - This setting is used to configure the models that
238
+ - ``EVENT_SINK_CLICKHOUSE_PII_MODELS`` - This setting is used to configure the models that
228
239
  contain PII information. The configuration is a list of strings that contain the
229
240
  table names where the PII information is stored.
230
241
 
231
- - `EVENT_SINK_CLICKHOUSE_MODEL_CONFIG` - This setting is used to provide compatibility
242
+ - ``EVENT_SINK_CLICKHOUSE_MODEL_CONFIG`` - This setting is used to provide compatibility
232
243
  with multiple Open edX models. The configuration is a dictionary that contains the
233
- following a key per model that contains a dictionary with the following keys:
244
+ following: a key per model that contains a dictionary with the following keys:
234
245
 
235
- - `module` - The module path of the model.
236
- - `model` - The model class name.
246
+ - ``module`` - The module path of the model.
247
+ - ``model`` - The model class name.
237
248
 
238
249
  Event Sinks are disabled by default. To enable them, you need to enable the following
239
- waffle flag: `event_sink_clickhouse.{{model_name}}.enabled` where model name is the name
250
+ waffle flag: ``event_sink_clickhouse.{{model_name}}.enabled``, where model_name is the name
240
251
  of the model that you want to enable. Or, you can enable them via settings by setting
241
- `EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED` to `True`.
252
+ ``EVENT_SINK_CLICKHOUSE_{{model_name}}_ENABLED`` to ``True``.
242
253
 
243
254
 
244
255
  Getting Help
@@ -255,7 +266,7 @@ More Help
255
266
  =========
256
267
 
257
268
  If you're having trouble, we have discussion forums at
258
- https://discuss.openedx.org where you can connect with others in the
269
+ https://discuss.openedx.org, where you can connect with others in the
259
270
  community.
260
271
 
261
272
  Our real-time conversations are on Slack. You can request a `Slack
@@ -2,6 +2,7 @@
2
2
  """
3
3
  Package metadata for platform_plugin_aspects.
4
4
  """
5
+
5
6
  import os
6
7
  import re
7
8
  import sys