Skip to content

feat!: add student competency status sinks - #279

Merged
felipemontoya merged 2 commits into
openedx:mainfrom
eduNEXT:fmo/cbe-sinks
Nov 20, 2026
Merged

felipemontoya merged 2 commits into
openedx:mainfrom
eduNEXT:fmo/cbe-sinks

Conversation

@felipemontoya

@felipemontoya felipemontoya commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

Sends openedx-core competency mastery to ClickHouse for the Competency Dashboard (openedx-aspects#387). Two commits:

  1. feat: add student competency status sinks: two new model sinks
    • student_competency_status: one row per learner and competency, from StudentCompetencyStatus (20 Partially Attempted, 30 Demonstrated)
    • student_competency_course_status: one row per learner, competency and course run, from the course-level rows of StudentCompetencyCriteriaGroupStatus
      • It is the only place openedx-core stores 10 Attempted Not Demonstrated per competency and course
      • Root and leaf group rows are skipped. No report reads them, and they would multiply the rows
  2. feat!: add taxonomy_type to the taxonomy sink: marks which taxonomies are competency taxonomies
    • competency for a taxonomy backed by openedx-core's CompetencyTaxonomy, tags otherwise
    • The dashboard uses this to find the competency taxonomies

Both status tables are keyed by the learner's xAPI actor_id, so neither holds PII.

Dependencies and release order

  • openedx-core#932 makes openedx-core send post_save when a status is raised. Without it, the sinks only see each learner's first status
  • tutor-contrib-aspects#1392 creates the two status tables and adds taxonomy.taxonomy_type
    • Order: this PR merges and releases first. #1392 then pins that release, and its CI needs it
  • aspects-dbt and xapi-db-load have companion PRs (dbt models; fake data). This PR doesn't need them

Breaking change

  • Sink inserts are positional CSV, so taxonomy_type is the last field of the taxonomy serializer
  • Against a taxonomy table without the column:
    • a single-row dump is dropped without an error, because inserts tolerate one bad row
    • a backfill fails
  • Rows dumped before the upgrade read as tags until they are dumped again: dump_data_to_clickhouse --object taxonomy --force

Merge checklist:
Check off if complete or not applicable:

  • Commit messages (and PR title, if squash merging) use the correct
    Conventional Commits type — they determine the
    release: fix: → patch, feat: → minor, ! / BREAKING CHANGE: → major
  • Documentation updated (not only docstrings)
  • Fixup commits are squashed away
  • Unit tests added/updated
  • Manual testing instructions provided
  • Noted any: Concerns, dependencies, migration issues, deadlines, tickets

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Nov 11, 2026
@openedx-webhooks

openedx-webhooks commented Nov 11, 2026 •

Copy link
Copy Markdown

Thanks for the pull request, @felipemontoya!

This repository is currently maintained by @openedx/committers-analytics.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/platform_plugin_aspects
  signals.py
  utils.py
  src/platform_plugin_aspects/sinks
  __init__.py
  serializers.py
  student_competency_status_sink.py
  tag_sink.py
Project Total  

This report was generated by python-coverage-comment-action

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@felipemontoya felipemontoya changed the title feat: add student competency status sinks feat!: add student competency status sinks Nov 19, 2026
@felipemontoya
felipemontoya marked this pull request as ready for review November 19, 2026 03:29
@bmtcril

bmtcril commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

This is looking good, just 2 requests:

  • Can you update the tutor-contrib-aspects PR to use this branch so we can test the tables end-to-end?
  • test_fields checks that the new names are present, but the order is the contract with ClickHouse. An
    exact-list assert on Meta.fields for the two new serializers would catch an accidental reorder, as
    test_taxonomy_type_is_last does for taxonomy.

@felipemontoya

Copy link
Copy Markdown
Member Author

I added the new text that you asked for, amending the last commit since it was a fixup.
Also I did the pinning in the tutor-contrib-aspects/pull/1392 So that CI will exercise this and the associated branches (currently working to make all CI pass and running my own quality and adversarial reviews using claude)

@felipemontoya

Copy link
Copy Markdown
Member Author

Just pushed a revisit to the commit message. I had marked it as a breaking change before, but going back into pathways, adding a new model doesn't break the API and if the inserts don't work because the table is missing, they will throw a silent error. For this reason I removed the breaking change notice.

@bmtcril

bmtcril commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Last note - I think we need the ! on the commit and major version bump since otherwise people with the old table schema will probably silently drop all inserts into taxonomy. That also matches the PR description, so I think that makes the most sense.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@felipemontoya
felipemontoya merged commit 2e67c32 into openedx:main Nov 20, 2026
7 checks passed
@github-project-automation github-project-automation Bot moved this from Waiting on Author to Done in Contributions Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants