Created
August 11, 2017 20:21
-
-
Save clintonb/39d1c763311452dde4d1b201383de690 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Is the openedx directory useful, or causing pain? The `skip_unless_lms` test decorator seems like an anti-pattern. If an | |
| # app is specific to one project, its code should probably live in that project. This script is meant to help determine how | |
| # many, and which, apps should be moved out of openedx. | |
| import pprint | |
| import os | |
| DJANGO_APP_DIRS = ( | |
| 'cms/djangoapps', | |
| 'common/djangoapps', | |
| 'lms/djangoapps', | |
| 'openedx/core/djangoapps', | |
| 'openedx/features', | |
| ) | |
| LMS_APPS = set([ | |
| 'badges.apps.BadgesConfig', | |
| 'branding', | |
| 'bulk_email', | |
| 'bulk_enroll', | |
| 'celery_utils', | |
| 'certificates.apps.CertificatesConfig', | |
| 'class_dashboard', | |
| 'commerce', | |
| 'config_models', | |
| 'corsheaders', | |
| 'course_action_state', | |
| 'course_modes', | |
| 'course_structure_api', | |
| 'course_wiki', | |
| 'course_wiki.plugins.markdownedx', | |
| 'courseware', | |
| 'coursewarehistoryextended', | |
| 'dashboard', | |
| 'database_fixups', | |
| 'debug', | |
| 'debug_toolbar', | |
| 'debug_toolbar_mongo', | |
| 'discussion_api', | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.humanize', | |
| 'django.contrib.messages', | |
| 'django.contrib.redirects', | |
| 'django.contrib.sessions', | |
| 'django.contrib.sites', | |
| 'django.contrib.staticfiles', | |
| 'django_cas', | |
| 'django_comment_client', | |
| 'django_comment_common', | |
| 'django_countries', | |
| 'django_extensions', | |
| 'django_filters', | |
| 'django_nose', | |
| 'django_notify', | |
| 'django_object_actions', | |
| 'django_openid_auth', | |
| 'django_sites_extensions', | |
| 'djcelery', | |
| 'djpyfs', | |
| 'edx_jsme', | |
| 'edx_oauth2_provider', | |
| 'edx_proctoring', | |
| 'edx_sga', | |
| 'edxmako', | |
| 'edxnotes', | |
| 'edxval', | |
| 'email_marketing', | |
| 'enrollment', | |
| 'enterprise', | |
| 'eventtracking.django.apps.EventTrackingConfig', | |
| 'experiments', | |
| 'gating.apps.GatingConfig', | |
| 'integrated_channels.integrated_channel', | |
| 'integrated_channels.sap_success_factors', | |
| 'learner_dashboard', | |
| 'lettuce.django', | |
| 'lms.djangoapps.ccx', | |
| 'lms.djangoapps.course_blocks', | |
| 'lms.djangoapps.discussion', | |
| 'lms.djangoapps.grades.apps.GradesConfig', | |
| 'lms.djangoapps.instructor', | |
| 'lms.djangoapps.instructor_task', | |
| 'lms.djangoapps.lms_xblock', | |
| 'lms.djangoapps.teams', | |
| 'lms.djangoapps.verify_student', | |
| 'lms_migration', | |
| 'mailing', | |
| 'mentoring', | |
| 'microsite_configuration', | |
| 'milestones', | |
| 'mobile_api', | |
| 'mptt', | |
| 'notes', | |
| 'notification_prefs', | |
| 'notifier_api', | |
| 'oauth2_provider', | |
| 'oauth_provider', | |
| 'openassessment', | |
| 'openassessment.assessment', | |
| 'openassessment.fileupload', | |
| 'openassessment.workflow', | |
| 'openassessment.xblock', | |
| 'openedx.core.djangoapps.api_admin', | |
| 'openedx.core.djangoapps.auth_exchange', | |
| 'openedx.core.djangoapps.bookmarks', | |
| 'openedx.core.djangoapps.catalog', | |
| 'openedx.core.djangoapps.ccxcondjango.contrib.auth', | |
| 'openedx.core.djangoapps.ccxconlti_provider', | |
| 'openedx.core.djangoapps.common_views', | |
| 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', | |
| 'openedx.core.djangoapps.content.course_overviews', | |
| 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', | |
| 'openedx.core.djangoapps.contentserver', | |
| 'openedx.core.djangoapps.cors_csrf', | |
| 'openedx.core.djangoapps.course_groups', | |
| 'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig', | |
| 'openedx.core.djangoapps.crawlers', | |
| 'openedx.core.djangoapps.credentials', | |
| 'openedx.core.djangoapps.credit', | |
| 'openedx.core.djangoapps.dark_lang', | |
| 'openedx.core.djangoapps.datadog', | |
| 'openedx.core.djangoapps.embargo', | |
| 'openedx.core.djangoapps.external_auth', | |
| 'openedx.core.djangoapps.monitoring', | |
| 'openedx.core.djangoapps.oauth_dispatch.apps.OAuthDispatchAppConfig', | |
| 'openedx.core.djangoapps.plugin_api', | |
| 'openedx.core.djangoapps.programs', | |
| 'openedx.core.djangoapps.schedules', | |
| 'openedx.core.djangoapps.self_paced', | |
| 'openedx.core.djangoapps.service_status', | |
| 'openedx.core.djangoapps.signals.apps.SignalConfig', | |
| 'openedx.core.djangoapps.site_configuration', | |
| 'openedx.core.djangoapps.theming', | |
| 'openedx.core.djangoapps.user_api', | |
| 'openedx.core.djangoapps.verified_track_content', | |
| 'openedx.core.djangoapps.video_config', | |
| 'openedx.core.djangoapps.waffle_utils', | |
| 'openedx.features.course_bookmarks', | |
| 'openedx.features.course_experience', | |
| 'openedx.features.course_search', | |
| 'openedx.features.enterprise_support', | |
| 'openedx.features.learner_profile', | |
| 'openedx.tests.util.webpack_loader', | |
| 'organizations', | |
| 'pipeline', | |
| 'problem_builder', | |
| 'provider', | |
| 'provider.oauth2', | |
| 'release_util', | |
| 'rest_framework', | |
| 'rss_proxy', | |
| 'sekizai', | |
| 'shoppingcart', | |
| 'simple_history', | |
| 'social_django', | |
| 'sorl.thumbnail', | |
| 'splash', | |
| 'static_replace', | |
| 'static_template_view', | |
| 'staticbook', | |
| 'statici18n', | |
| 'status', | |
| 'student', | |
| 'submissions', | |
| 'support', | |
| 'survey', | |
| 'third_party_auth', | |
| 'track', | |
| 'util', | |
| 'waffle', | |
| 'web_fragments', | |
| 'webpack_loader', | |
| 'wiki', | |
| 'wiki.plugins.links', | |
| 'xblock_django' | |
| ]) | |
| CMS_APPS = set([ | |
| 'celery_utils', | |
| 'cms.lib.xblock.tagging', | |
| 'cms_user_tasks.apps.CmsUserTasksConfig', | |
| 'config_models', | |
| 'contentstore.apps.ContentstoreConfig', | |
| 'course_action_state', | |
| 'course_creators', | |
| 'course_modes', | |
| 'database_fixups', | |
| 'debug_toolbar', | |
| 'debug_toolbar_mongo', | |
| 'django.contrib.admin', | |
| 'django.contrib.auth', | |
| 'django.contrib.contenttypes', | |
| 'django.contrib.messages', | |
| 'django.contrib.redirects', | |
| 'django.contrib.sessions', | |
| 'django.contrib.sites', | |
| 'django.contrib.staticfiles', | |
| 'django_cas', | |
| 'django_comment_common', | |
| 'django_extensions', | |
| 'django_filters', | |
| 'django_nose', | |
| 'django_openid_auth', | |
| 'django_sites_extensions', | |
| 'djcelery', | |
| 'djpyfs', | |
| 'edx_jsme', | |
| 'edx_oauth2_provider', | |
| 'edx_proctoring', | |
| 'edx_sga', | |
| 'edxmako', | |
| 'edxval', | |
| 'enterprise', | |
| 'eventtracking.django.apps.EventTrackingConfig', | |
| 'lettuce.django', | |
| 'lms.djangoapps.verify_student', | |
| 'maintenance', | |
| 'mentoring', | |
| 'method_override', | |
| 'microsite_configuration', | |
| 'milestones', | |
| 'oauth2_provider', | |
| 'openassessment', | |
| 'openassessment.assessment', | |
| 'openassessment.fileupload', | |
| 'openassessment.workflow', | |
| 'openassessment.xblock', | |
| 'openedx.core.djangoapps.api_admin', | |
| 'openedx.core.djangoapps.bookmarks', | |
| 'openedx.core.djangoapps.catalog', | |
| 'openedx.core.djangoapps.ccxcon', | |
| 'openedx.core.djangoapps.common_views', | |
| 'openedx.core.djangoapps.content.block_structure.apps.BlockStructureConfig', | |
| 'openedx.core.djangoapps.content.course_overviews', | |
| 'openedx.core.djangoapps.content.course_structures.apps.CourseStructuresConfig', | |
| 'openedx.core.djangoapps.contentserver', | |
| 'openedx.core.djangoapps.course_groups', | |
| 'openedx.core.djangoapps.coursegraph.apps.CoursegraphConfig', | |
| 'openedx.core.djangoapps.crawlers', | |
| 'openedx.core.djangoapps.credit', | |
| 'openedx.core.djangoapps.dark_lang', | |
| 'openedx.core.djangoapps.datadog', | |
| 'openedx.core.djangoapps.embargo', | |
| 'openedx.core.djangoapps.external_auth', | |
| 'openedx.core.djangoapps.monitoring', | |
| 'openedx.core.djangoapps.self_paced', | |
| 'openedx.core.djangoapps.service_status', | |
| 'openedx.core.djangoapps.signals.apps.SignalConfig', | |
| 'openedx.core.djangoapps.site_configuration', | |
| 'openedx.core.djangoapps.theming', | |
| 'openedx.core.djangoapps.user_api', | |
| 'openedx.core.djangoapps.verified_track_content', | |
| 'openedx.core.djangoapps.video_config', | |
| 'openedx.core.djangoapps.waffle_utils', | |
| 'organizations', | |
| 'pipeline', | |
| 'problem_builder', | |
| 'provider', | |
| 'provider.oauth2', | |
| 'release_util', | |
| 'require', | |
| 'rules.apps.AutodiscoverRulesConfig', | |
| 'simple_history', | |
| 'static_replace', | |
| 'statici18n', | |
| 'student', | |
| 'submissions', | |
| 'track', | |
| 'user_tasks', | |
| 'waffle', | |
| 'webpack_loader', | |
| 'xblock_config', | |
| 'xblock_django' | |
| ]) | |
| internal_apps = set() | |
| for app in list(LMS_APPS.union(CMS_APPS)): | |
| print(app) | |
| if app.startswith('openedx') or app.startswith('lms'): | |
| internal_apps.add(app) | |
| else: | |
| for dirname in DJANGO_APP_DIRS: | |
| path = os.path.join(dirname, app) | |
| if os.path.isdir(path): | |
| internal_apps.add(app) | |
| pprint.pprint(internal_apps) | |
| external_apps = LMS_APPS.union(CMS_APPS) - internal_apps | |
| # pprint.pprint(sorted(external_apps)) | |
| # Apps common to both CMS and LMS | |
| # intersection = CMS_APPS.intersection(LMS_APPS) - external_apps | |
| # pprint.pprint(intersection) | |
| # print(len(intersection)) | |
| # Apps only in LMS | |
| lms_only = LMS_APPS - CMS_APPS - external_apps | |
| pprint.pprint(lms_only) | |
| print(len(lms_only)) | |
| # Apps only in CMS | |
| cms_only = CMS_APPS - LMS_APPS - external_apps | |
| pprint.pprint(cms_only) | |
| print(len(cms_only)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment