14. Project Structure Updates#
Status#
Draft -> Accepted
Context#
This ADR builds upon, and in some cases, supersedes ADR 8 Project Structure.
The Aspects requirements for version 1 include adding a new LMS plugin that could potentially live in another repository. We have many repositories to maintain currently, including one LMS plugin that is unlikely to be used for anything outside of Aspects.
This ADR offers guiding principles to address these issues:
Adding a new repository to the project will increase the maintenance burden and complexity of the overall project.
We already have an Aspects-specific LMS plugin project.
The openedx-aspects repository has been a shell, holding only documentation and project management infrastructure.
There are license conflicts between repositories.
Decisions#
Aspects repo
This repo (openedx-aspects) remains the primary Aspects repository where the project decisions and documentation are stored. However, we will also move all Aspects-specific LMS plugin functionality into this repository, including the code currently stored in openedx-event-sink-clickhouse and code being contributed from EduNEXT to support Superset embedding from platform_plugin_superset which we will take over and continue to build upon.
This repo should also be used to store any common code or configuration between Tutor and non-Tutor Aspects deployments.
Re-licensing
Both openedx-event-sink-clickhouse and platform_plugin_superset are licensed under the AGPL3. Pending approval from Axim legal and EduNEXT, those repositories will be licensed to Apache 2 as part of being moved into this project. This work was already underway to allow for greater community extensibility of Aspects.
Other LMS plugins
The event-routing-backends repository will remain separate as it is useful outside of Aspects.
Proposed project structure
The thought is to reorganize the file structure of the repository to match that created by our Django app cookiecutter. The combined projects would coexist in the same space, utilizing the usual Open edX Django setup of a single apps.py, templates folder, configuration files, etc. as they will be installed together.
Configuration
Event sinks and embedded dashboards can be configured individually, allowing each set of features to be enabled or disabled simply by not configuring them. For instance, event sink configuration would like this:
settings.ASPECTS_EVENT_SINK_MODEL_CONFIG = {
"auth_user": {
"module": "django.contrib.auth.models",
"model": "User",
},
"user_profile": {
"module": "common.djangoapps.student.models",
"model": "UserProfile",
},
"course_overviews": {
"module": "openedx.core.djangoapps.content.course_overviews.models",
"model": "CourseOverview",
},
"external_id": {
"module": "openedx.core.djangoapps.external_user_ids.models",
"model": "ExternalId",
},
}
So omitting that setting or leaving it empty would disable all event sinks. Specific configuration for dashboard embeds is a work in progress, but would work similarly:
settings.ASPECTS_SUPERSET_EMBEDS = {
// Key is the tab name in the "Reports" section of the Instructor Dashboard
"Course Dashboard": {
// This is the link to Superset to embed, including any filters
"embed_link": "...",
// This would be an LMS permissions filter or function needed to view the embed
"permissions": ...,
},
"Learner Groups": {
"embed_link": "...",
"permissions": ...?,
},
...
}
Again, omitting the setting or leaving it empty would prevent the entire “Reports” tab from showing up.
Consequences#
openedx-event-sink-clickhouse and platform_plugin_superset will be consolidated into openedx-aspects and re-licensed to Apache 2. openedx-event-sink-clickhouse will be archived under the openedx-unsupported Github organization.
Rejected Alternatives#
Separate repositories for Aspects specific platform plugins
Including these plugins in tutor-contrib-aspects . This project is already quite complicated, and conflating the concerns of code and configuration will result in an more complicated and confusing codebase with different testing, documentation, and deployment needs.
Supersedes ADR 6 Areas of responsibility. Supersedes ADR 8 Project Structure.