https://github.com/openedx/tutor-contrib-aspects
The Open Analytics Reference System - Tutor plugin
https://github.com/openedx/tutor-contrib-aspects
Last synced: 4 months ago
JSON representation
The Open Analytics Reference System - Tutor plugin
- Host: GitHub
- URL: https://github.com/openedx/tutor-contrib-aspects
- Owner: openedx
- License: apache-2.0
- Created: 2023-02-07T05:22:39.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-30T12:13:38.000Z (about 1 year ago)
- Last Synced: 2025-04-30T13:06:48.124Z (about 1 year ago)
- Language: Python
- Size: 3.09 MB
- Stars: 10
- Watchers: 7
- Forks: 19
- Open Issues: 13
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
=============================
The Aspects Plugin for Tutor
=============================
Aspects Learner Analytics integrates several open-source tools to add powerful analytics and reporting capabilities to the Open edX platform. This plugin enables seamless installation, configuration, and deployment of these tools via `Tutor `_. The tools integrated by Aspects are:
- `ClickHouse `_: A fast and scalable analytics database.
- `Apache Superset `_: A data visualization and exploration platform.
- `OpenFUN Ralph `_: A Learning Record Store that validates and stores xAPI statements in ClickHouse.
- `Vector `_: A tool for forwarding logs and xAPI data to ClickHouse.
- `Event-Routing-Backends `_: An Open edX plugin that transforms tracking logs into xAPI and forwards them to Learning Record Stores in near real-time.
- `dbt `_: A SQL-based data pipeline builder, utilizing the `aspects-dbt `_ project.
For more information, refer to the `Aspects architecture documentation `_.
Key Features
============
- Streamlined deployment of analytics and reporting tools.
- Integration with Open edX for real-time and historical data analytics.
- Extensible architecture supporting customization.
- Open edX Teak or higher: `In-context metrics in Studio `_.
Compatibility
=============
Current versions of the plugin are compatible with Tutor 19.0.0 and later and support Open edX releases from Sumac onward. Older releases can support Open edX versions as far back as Nutmeg. Details are available in the `Aspects Documentation `_.
Installation
============
Aspects is implemented as a Tutor plugin. For now, the easiest installation method is via Tutor. Follow these steps for a ``tutor local`` installation:
1. **Install Tutor**:
Follow the instructions at `Tutor Installation Guide `_.
2. **Create an Admin User**:
Refer to the `Tutor Setup Guide `_.
3. **Install and Enable the Plugin**:
.. code-block:: bash
pip install tutor-contrib-aspects
tutor plugins enable aspects
tutor config save
4. **Rebuild Docker Images**:
.. code-block:: bash
tutor images build openedx --no-cache
tutor images build mfe --no-cache # Only necessary if using in-context metrics
tutor images build aspects aspects-superset
5. **Initialize the Environment**:
.. code-block:: bash
tutor local do init
Data Population Options
------------------------
To visualize data:
- Generate test data:
.. code-block:: bash
tutor local do load-xapi-test-data
- Import a demo course and create real data:
Follow `these steps `_.
- Interact with the course to generate data:
Complete a few activities within the course (e.g., enroll, take quizzes, watch videos) to generate real data. This will provide a more realistic dataset for analytics.
- Sync data from an existing Tutor installation with default settings:
.. code-block:: bash
tutor local do dump-data-to-clickhouse --options "--object course_overviews"
tutor local do transform-tracking-logs --source_provider LOCAL --source_config '{"key": "/openedx/data", "container": "logs", "prefix": "tracking.log"}' --transformer_type xapi
Superset and Autoscaling
=========================
Superset Assets
---------------
Aspects maintains its Superset assets (dashboards, charts, datasets) in the repository. Local changes to these assets will be overwritten during updates unless saved as new assets.
To rebuild and re-import assets:
.. code-block:: bash
tutor images build aspects-superset --no-cache
tutor local do import-assets
Autoscaling
-----------
Aspects supports Kubernetes autoscaling configurations for Ralph, Superset, and Superset Worker via the `Pod Autoscaling plugin `_. Modify autoscaling settings as needed.
Contributing Charts and Dashboards
===================================
To contribute Superset assets:
1. Fork this repository and set up a local Tutor instance with Aspects installed.
2. You should work on the non-localized versions of the Superset dashboards. Export the new or updated dashboard(s) using Superset’s “Export” feature. It is best to export the entire dashboard instead of just charts or datasets to ensure that all of the correct changes are captured.
3. Use the command:
.. code-block:: bash
tutor aspects import_superset_zip ~/Downloads/your_file.zip
4. Update database connection strings to use template variables.
5. Validate and rebuild:
.. code-block:: bash
tutor images build aspects-superset --no-cache
tutor aspects check_superset_assets
tutor local do import-assets
6. Submit a pull request with screenshots and details of your contributions.
Release Workflow
================
Releases are handled by repository maintainers via GitHub Actions:
- Trigger the **Bump version and changelog** action to update the version and changelog.
- Merge the PR to initiate the **release** and **build-image** workflows.
Ensure the updated version appears on `PyPI `_ and DockerHub.
Additional Resources
=====================
- `Tutor Documentation `_
- `Aspects Beta Progress `_
- `Superset Documentation `_
- `DBT Documentation `_
- `Event Routing Backends Documentation `_
- `Tracking Logs Documentation `_