Skip to content

saraburns1/tutor-contrib-aspects

 
 

Repository files navigation

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.

Compatibility

The plugin is compatible with Tutor 15.0.0 and later and supports Open edX releases from Nutmeg onward.

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:

    pip install tutor-contrib-aspects
    tutor plugins enable aspects
    tutor config save
  4. Rebuild Docker Images:

    tutor images build openedx --no-cache
    tutor images build aspects aspects-superset
  5. Initialize the Environment:

    tutor local do init

Data Population Options

To visualize data:

  • Generate test data:

    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:

    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:

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:

    tutor aspects import_superset_zip ~/Downloads/your_file.zip
  4. Update database connection strings to use template variables.

  5. Validate and rebuild:

    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

About

The Open Analytics Reference System - Tutor plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 90.9%
  • Shell 6.6%
  • Makefile 1.4%
  • Other 1.1%