Skip to content

refactor: move transcripts_utils from xmodule to video-config - #37600

Merged
kdmccormick merged 5 commits into
masterfrom
farhan/move-transcripts-utils
Nov 14, 2025
Merged

kdmccormick merged 5 commits into
masterfrom
farhan/move-transcripts-utils

Conversation

@farhan

@farhan farhan commented Nov 4, 2025 •

Copy link
Copy Markdown
Contributor

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.

@farhan farhan added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Nov 4, 2025
@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan

farhan commented Nov 4, 2025

Copy link
Copy Markdown
Contributor Author

Testing Notes:

I have done the testing this PR on the sandbox.

  • Tested different video formats
  • Tested transcripts loading of a youtube video

@farhan
farhan force-pushed the farhan/move-transcripts-utils branch from c4aa007 to 0b6e6cf Compare November 5, 2025 07:12
@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan
farhan force-pushed the farhan/move-transcripts-utils branch from b52aa2b to c40b90c Compare November 13, 2025 09:48
@open-craft-grove

Copy link
Copy Markdown

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@farhan
farhan marked this pull request as ready for review November 14, 2025 08:02
@kdmccormick
kdmccormick self-requested a review November 14, 2025 16:21
@kdmccormick
kdmccormick force-pushed the farhan/move-transcripts-utils branch from 8b9f59c to 909c628 Compare November 14, 2025 18:04
Comment thread setup.cfg
Comment on lines +163 to +171
# 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

@kdmccormick kdmccormick Nov 14, 2025 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@farhan farhan Nov 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for sharing details ❤️
FYI @openedx/axim-aximprovements , @ttqureshi

@kdmccormick
kdmccormick enabled auto-merge (squash) November 14, 2025 18:15
@kdmccormick
kdmccormick merged commit f51343c into master Nov 14, 2025
@kdmccormick
kdmccormick deleted the farhan/move-transcripts-utils branch November 14, 2025 18:26
blarghmatey added a commit to mitodl/open-edx-plugins that referenced this pull request Nov 18, 2025
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.
anfbermudezme pushed a commit to Pearson-Advance/edx-platform that referenced this pull request Feb 16, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

create-sandbox open-craft-grove should create a sandbox environment from this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants