From 0db54143f9a1990d945c3d1fc3bead692e06a61e Mon Sep 17 00:00:00 2001 From: Feanil Patel Date: Tue, 20 Jan 2026 11:41:29 -0500 Subject: [PATCH] feat: migrate CMS Django app entry points to pyproject.toml Migrates 14 cms.djangoapp entry points from setup.py. Preserves important comment explaining why discussion app (from LMS) is imported into Studio process. Co-Authored-By: Claude Opus 4.5 --- pyproject.toml | 22 ++++++++++++++++++++++ setup.py | 22 ---------------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 51666e5c1b..6f8a3d41f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,3 +111,25 @@ instructor = "lms.djangoapps.instructor.apps:InstructorConfig" password_policy = "openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig" user_authn = "openedx.core.djangoapps.user_authn.apps:UserAuthnConfig" program_enrollments = "lms.djangoapps.program_enrollments.apps:ProgramEnrollmentsConfig" + +[project.entry-points."cms.djangoapp"] +ace_common = "openedx.core.djangoapps.ace_common.apps:AceCommonConfig" +bookmarks = "openedx.core.djangoapps.bookmarks.apps:BookmarksConfig" +course_live = "openedx.core.djangoapps.course_live.apps:CourseLiveConfig" +content_libraries = "openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig" +content_staging = "openedx.core.djangoapps.content_staging.apps:ContentStagingAppConfig" +course_apps = "openedx.core.djangoapps.course_apps.apps:CourseAppsConfig" +# Importing an LMS app into the Studio process is not a good practice. +# We're ignoring this for Discussions here because its placement in LMS +# is a historical artifact. The eventual goal is to consolidate the multiple +# discussions-related Django apps and either put them in the openedx/ dir, +# or in another repo entirely. +discussion = "lms.djangoapps.discussion.apps:DiscussionConfig" +discussions = "openedx.core.djangoapps.discussions.apps:DiscussionsConfig" +instructor = "lms.djangoapps.instructor.apps:InstructorConfig" +olx_rest_api = "openedx.core.djangoapps.olx_rest_api.apps:OlxRestApiAppConfig" +password_policy = "openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig" +plugins = "openedx.core.djangoapps.plugins.apps:PluginsConfig" +theming = "openedx.core.djangoapps.theming.apps:ThemingConfig" +user_authn = "openedx.core.djangoapps.user_authn.apps:UserAuthnConfig" +zendesk_proxy = "openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig" diff --git a/setup.py b/setup.py index 7b44538290..7f6a800e24 100644 --- a/setup.py +++ b/setup.py @@ -41,28 +41,6 @@ setup( "openedx.call_to_action": [ "personalized_learner_schedules = openedx.features.personalized_learner_schedules.call_to_action:PersonalizedLearnerScheduleCallToAction" # lint-amnesty, pylint: disable=line-too-long ], - "cms.djangoapp": [ - "ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig", - "bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig", - "course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig", - "content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig", - "content_staging = openedx.core.djangoapps.content_staging.apps:ContentStagingAppConfig", - "course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig", - # Importing an LMS app into the Studio process is not a good - # practice. We're ignoring this for Discussions here because its - # placement in LMS is a historical artifact. The eventual goal is to - # consolidate the multiple discussions-related Django apps and - # either put them in the openedx/ dir, or in another repo entirely. - "discussion = lms.djangoapps.discussion.apps:DiscussionConfig", - "discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig", - "instructor = lms.djangoapps.instructor.apps:InstructorConfig", - "olx_rest_api = openedx.core.djangoapps.olx_rest_api.apps:OlxRestApiAppConfig", - "password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig", - "plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig", - "theming = openedx.core.djangoapps.theming.apps:ThemingConfig", - "user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig", - "zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig", - ], 'openedx.learning_context': [ 'lib = openedx.core.djangoapps.content_libraries.library_context:LibraryContextImpl', ],