Repository navigation
refactor: move transcripts_utils from xmodule to video-config - #37600
Conversation
|
Sandbox deployment failed 💥 |
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment successful 🚀 |
|
Testing Notes: I have done the testing this PR on the sandbox.
|
c4aa007 to
0b6e6cf
Compare
|
Sandbox deployment successful 🚀 |
|
Sandbox deployment successful 🚀 |
b52aa2b to
c40b90c
Compare
|
Sandbox deployment successful 🚀 |
…core/djangoapps/video_config Ticket: openedx/public-engineering#445
8b9f59c to
909c628
Compare
| # We are ignoring this existing import until we can refactor contenstore/helpers. | ||
| # https://github.com/openedx/edx-platform/issues/37637 | ||
| openedx.core.djangoapps.content_libraries.api.libraries -> cms.djangoapps.contentstore.helpers | ||
| openedx.core.djangoapps.content_libraries.api.blocks -> cms.djangoapps.contentstore.helpers | ||
| openedx.core.djangoapps.content_staging.serializers -> cms.djangoapps.contentstore.helpers | ||
| # These imports will become OK once we move content_libraries into CMS | ||
| # https://github.com/openedx/edx-platform/issues/33428 | ||
| openedx.core.djangoapps.content_libraries.permissions -> cms.djangoapps.course_creators.views | ||
| openedx.core.djangoapps.content_libraries.tasks -> cms.djangoapps.contentstore.storage |
There was a problem hiding this comment.
Hey @farhan , I pushed a change to the importlinter ignores. Before they were:
lms.djangoapps.courseware.tests.test_video_handlers -> openedx.core.djangoapps.video_config.transcripts_utils
lms.djangoapps.courseware.tests.test_video_mongo -> openedx.core.djangoapps.video_config.transcripts_utils
Essentially, in the medium-to-long term, we are aiming for edx-platform to have a structure like this:
[ common, ]
[ lms ] --> | openedx, | <-- [ cms ]
[ xmodule ]
in other words, we want: "LMS and CMS folders are indepdendent, but they can import the shared folders. The shared folders don't import LMS or CMS.". (side note: as we've discussed, we will also try to remove xmodule and combine openedx+common into one folder).
When adding new importlinter rules, it's best if possible to dig down and ignore the import that is the source of the architectural problem, and then add a link for actionable future clean-up work. In this case, the problems are that a couple apps within the shared folders (content_libraries and content_staging depending) are depending on CMS code. Your code, on the other hand, just has a dependency from LMS code into shared code, which is completely OK. You were just unlucky enough to trigger the underlying problem.
With these ignore and links in place, other developers are less likely to hit similar importlinter issues. And if they do, they will have links to context that explain what the issues are stemming from.
There was a problem hiding this comment.
Thanks for sharing details ❤️
FYI @openedx/axim-aximprovements , @ttqureshi
The transcripts_utils module got moved to a different namespace in openedx/openedx-platform#37600 which broke this plugin. This adds a fallback for the new location when import fails.
…x#37600) As part of the ongoing effort to deprecate and eventually remove xmodule, we’ve started gradually migrating the necessary code files from xmodule to more appropriate locations within the codebase. Ticket: openedx/public-engineering#445 Also: this tweaks importlinter ignores & add follow-up issue links Co-authored-by: Kyle McCormick <[email protected]>
Ticket: openedx/public-engineering#445
Moved transcripts_utils.py module from xmodule/video_block/ to openedx/core/djangoapps/video_config/ to centralize video configuration utilities.