Create a management command to run edx courserun migration #2922
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the relevant tickets?
https://github.com/mitodl/hq/issues/8318
Description (What does it do?)
Creating a management command to import the edX courses and course runs via Trino from data platform to mitxonline
The management command will be extended to migrate enrollments/certificate/grades later
How can this be tested?
docker compose run --build
Create one signatory page if not exist
Run
./manage.py migrate_edx_data --use-default-signatory --limit 10: this will create 10 course runs with their associate courses, course pages, and course certificate pages using the default signatoryCheck these course pages, their certificate pages and signatories in CMS
Check these imported courses/runs are not published and not enrollable
They don't show up in http://mitxonline.odl.local:8013/catalog/courses
They don't show up in http://mitxonline.odl.local:8013/api/v2/courses/?live=true&page__live=true&courserun_is_enrollable=true
Check the certificate page revisions are listed in
admin/courses/courseruncertificate/add/