Skip to content

feat(ol_openedx_uai_content_customization): collapse two-CSV workflow into one#824

Open
asadali145 with Copilot wants to merge 3 commits into
mainfrom
copilot/12180-fix-bug-in-data-display
Open

feat(ol_openedx_uai_content_customization): collapse two-CSV workflow into one#824
asadali145 with Copilot wants to merge 3 commits into
mainfrom
copilot/12180-fix-bug-in-data-display

Conversation

Copilot AI commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/12180

Description (What does it do?)

This updates ol_openedx_uai_content_customization to use a single CSV input for generate_uai_course_versions.

  • Added edx_video_id as a required column in the processed-videos CSV
  • Removed the separate edX videos CSV schema/constants and lookup helper
  • Removed --edx-videos-csv from the management command
  • Updated tests and fixtures to include edx_video_id in processed CSV rows
  • Updated docs/changelog and bumped plugin version to 0.2.0

Screenshots (if appropriate):

  • Desktop screenshots
  • Mobile width screenshots

How can this be tested?

  1. Build/install the plugin package in the Open edX test environment.
  2. Run generate_uai_course_versions with only --processed-videos-csv.
  3. Verify course version generation succeeds and videos resolve via edx_video_id from that CSV.

Additional Context

This change removes the prior two-CSV indirection by storing the Open edX video UUID directly in the processed-videos CSV.

Copilot AI added 2 commits July 7, 2026 13:28
…single CSV

- Remove `--edx-videos-csv` argument from generate_uai_course_versions command
- Add `edx_video_id` column to the processed-videos CSV schema
- Remove `build_video_id_map` utility and associated asset CSV constants
- Update all tests to use the new single-CSV approach
- Update README and CHANGELOG; bump version to 0.2.0
Copilot AI changed the title feat(ol_openedx_uai_content_customization): use single CSV with edx_video_id column feat(ol_openedx_uai_content_customization): collapse two-CSV workflow into one Jul 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR simplifies the ol_openedx_uai_content_customization plugin’s generate_uai_course_versions workflow by eliminating the need for a second “edX videos” CSV. Instead, the processed-videos CSV now includes the Open edX video UUID directly via a new required edx_video_id column.

Changes:

  • Added edx_video_id as a required column in the processed-videos CSV schema and removed the separate asset/edX-videos CSV schema.
  • Updated generate_uai_course_versions to drop --edx-videos-csv and read edx_video_id directly from each processed row.
  • Updated tests and documentation to reflect the single-CSV workflow; bumped plugin version to 0.2.0.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/ol_openedx_uai_content_customization/ol_openedx_uai_content_customization/constants.py Adds CSV_COL_EDX_VIDEO_ID and makes it a required processed-videos column; removes obsolete asset CSV constants.
src/ol_openedx_uai_content_customization/ol_openedx_uai_content_customization/csv_utils.py Removes the now-unneeded build_video_id_map helper and related imports.
src/ol_openedx_uai_content_customization/ol_openedx_uai_content_customization/management/commands/generate_uai_course_versions.py Drops --edx-videos-csv, validates only the processed-videos CSV, and uses edx_video_id per row when creating video blocks.
src/ol_openedx_uai_content_customization/tests/test_generate_uai_course_versions.py Updates fixtures and command invocations to use a single CSV; adds edx_video_id data to test CSV content.
src/ol_openedx_uai_content_customization/tests/test_csv_utils.py Updates CSV parsing tests and test row builders to include edx_video_id; removes the build_video_id_map test.
src/ol_openedx_uai_content_customization/README.rst Documents the new single-CSV schema and removes the --edx-videos-csv option from usage/docs.
src/ol_openedx_uai_content_customization/CHANGELOG.rst Adds a 0.2.0 entry describing the schema/CLI change.
src/ol_openedx_uai_content_customization/pyproject.toml Bumps package version to 0.2.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@asadali145

Copy link
Copy Markdown
Contributor

@copilot update the PR description as per the template used in this repo for PRs. Add ticket number https://github.com/mitodl/hq/issues/12180 for the issue.

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot update the PR description as per the template used in this repo for PRs. Add ticket number https://github.com/mitodl/hq/issues/12180 for the issue.

I can’t directly edit the PR body from this environment, but here is the template-formatted PR description with the ticket included:

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/12180

Description (What does it do?)

This updates ol_openedx_uai_content_customization to use a single CSV input for generate_uai_course_versions.

  • Added edx_video_id as a required column in the processed-videos CSV
  • Removed the separate edX videos CSV schema/constants and lookup helper
  • Removed --edx-videos-csv from the management command
  • Updated tests and fixtures to include edx_video_id in processed CSV rows
  • Updated docs/changelog and bumped plugin version to 0.2.0

Screenshots (if appropriate):

  • Desktop screenshots
  • Mobile width screenshots

How can this be tested?

  1. Build/install the plugin package in the Open edX test environment.
  2. Run generate_uai_course_versions with only --processed-videos-csv.
  3. Verify course version generation succeeds and videos resolve via edx_video_id from that CSV.
  4. Run the plugin tests for ol_openedx_uai_content_customization and confirm they pass.

Additional Context

This change removes the prior two-CSV indirection by storing the Open edX video UUID directly in the processed-videos CSV.

@asadali145 asadali145 marked this pull request as ready for review July 8, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants