From 2c92c703d7af64f48e7725e45ab1b28f38815d14 Mon Sep 17 00:00:00 2001 From: David Ormsbee Date: Mon, 3 Feb 2025 10:45:29 -0500 Subject: [PATCH] feat!: remove unused email_marketing app Quoting the README: > If you are reading this and the 'Maple' Open edX release is out, you > can safely delete this whole djangoapp. It only exists to hold old > model migrations and any post-Maple installation will no longer have > any model in the database for this app. > > But for some minor historical context, this djangoapp used to hold > some integration with sailthru that we no longer needed. We've released Sumac. This is overdue. --- .github/workflows/pylint-checks.yml | 2 +- .github/workflows/unit-test-shards.json | 1 - lms/djangoapps/email_marketing/README.rst | 9 --- lms/djangoapps/email_marketing/__init__.py | 0 lms/djangoapps/email_marketing/apps.py | 13 ----- .../migrations/0001_initial.py | 28 ---------- .../migrations/0002_auto_20160623_1656.py | 56 ------------------- .../migrations/0003_auto_20160715_1145.py | 36 ------------ ...gconfiguration_welcome_email_send_delay.py | 16 ------ ..._user_registration_cookie_timeout_delay.py | 16 ------ .../migrations/0006_auto_20170711_0615.py | 16 ------ .../migrations/0007_auto_20170809_0653.py | 26 --------- .../migrations/0008_auto_20170809_0539.py | 24 -------- ...figuration_sailthru_activation_template.py | 15 ----- .../migrations/0010_auto_20180425_0800.py | 24 -------- ...0011_delete_emailmarketingconfiguration.py | 16 ------ .../email_marketing/migrations/__init__.py | 0 lms/envs/common.py | 3 - 18 files changed, 1 insertion(+), 300 deletions(-) delete mode 100644 lms/djangoapps/email_marketing/README.rst delete mode 100644 lms/djangoapps/email_marketing/__init__.py delete mode 100644 lms/djangoapps/email_marketing/apps.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0001_initial.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py delete mode 100644 lms/djangoapps/email_marketing/migrations/0011_delete_emailmarketingconfiguration.py delete mode 100644 lms/djangoapps/email_marketing/migrations/__init__.py diff --git a/.github/workflows/pylint-checks.yml b/.github/workflows/pylint-checks.yml index 1afa032b6a..abece08a59 100644 --- a/.github/workflows/pylint-checks.yml +++ b/.github/workflows/pylint-checks.yml @@ -16,7 +16,7 @@ jobs: - module-name: lms-1 path: "lms/djangoapps/badges/ lms/djangoapps/branding/ lms/djangoapps/bulk_email/ lms/djangoapps/bulk_enroll/ lms/djangoapps/bulk_user_retirement/ lms/djangoapps/ccx/ lms/djangoapps/certificates/ lms/djangoapps/commerce/ lms/djangoapps/course_api/ lms/djangoapps/course_blocks/ lms/djangoapps/course_home_api/ lms/djangoapps/course_wiki/ lms/djangoapps/coursewarehistoryextended/ lms/djangoapps/debug/ lms/djangoapps/courseware/ lms/djangoapps/course_goals/ lms/djangoapps/rss_proxy/" - module-name: lms-2 - path: "lms/djangoapps/gating/ lms/djangoapps/grades/ lms/djangoapps/instructor/ lms/djangoapps/instructor_analytics/ lms/djangoapps/discussion/ lms/djangoapps/edxnotes/ lms/djangoapps/email_marketing/ lms/djangoapps/experiments/ lms/djangoapps/instructor_task/ lms/djangoapps/learner_dashboard/ lms/djangoapps/learner_home/ lms/djangoapps/lms_initialization/ lms/djangoapps/lms_xblock/ lms/djangoapps/lti_provider/ lms/djangoapps/mailing/ lms/djangoapps/mobile_api/ lms/djangoapps/monitoring/ lms/djangoapps/ora_staff_grader/ lms/djangoapps/program_enrollments/ lms/djangoapps/rss_proxy lms/djangoapps/static_template_view/ lms/djangoapps/staticbook/ lms/djangoapps/support/ lms/djangoapps/survey/ lms/djangoapps/teams/ lms/djangoapps/tests/ lms/djangoapps/user_tours/ lms/djangoapps/verify_student/ lms/djangoapps/mfe_config_api/ lms/envs/ lms/lib/ lms/tests.py" + path: "lms/djangoapps/gating/ lms/djangoapps/grades/ lms/djangoapps/instructor/ lms/djangoapps/instructor_analytics/ lms/djangoapps/discussion/ lms/djangoapps/edxnotes/ lms/djangoapps/experiments/ lms/djangoapps/instructor_task/ lms/djangoapps/learner_dashboard/ lms/djangoapps/learner_home/ lms/djangoapps/lms_initialization/ lms/djangoapps/lms_xblock/ lms/djangoapps/lti_provider/ lms/djangoapps/mailing/ lms/djangoapps/mobile_api/ lms/djangoapps/monitoring/ lms/djangoapps/ora_staff_grader/ lms/djangoapps/program_enrollments/ lms/djangoapps/rss_proxy lms/djangoapps/static_template_view/ lms/djangoapps/staticbook/ lms/djangoapps/support/ lms/djangoapps/survey/ lms/djangoapps/teams/ lms/djangoapps/tests/ lms/djangoapps/user_tours/ lms/djangoapps/verify_student/ lms/djangoapps/mfe_config_api/ lms/envs/ lms/lib/ lms/tests.py" - module-name: openedx-1 path: "openedx/core/types/ openedx/core/djangoapps/ace_common/ openedx/core/djangoapps/agreements/ openedx/core/djangoapps/api_admin/ openedx/core/djangoapps/auth_exchange/ openedx/core/djangoapps/bookmarks/ openedx/core/djangoapps/cache_toolbox/ openedx/core/djangoapps/catalog/ openedx/core/djangoapps/ccxcon/ openedx/core/djangoapps/commerce/ openedx/core/djangoapps/common_initialization/ openedx/core/djangoapps/common_views/ openedx/core/djangoapps/config_model_utils/ openedx/core/djangoapps/content/ openedx/core/djangoapps/content_libraries/ openedx/core/djangoapps/content_staging/ openedx/core/djangoapps/contentserver/ openedx/core/djangoapps/cookie_metadata/ openedx/core/djangoapps/cors_csrf/ openedx/core/djangoapps/course_apps/ openedx/core/djangoapps/course_date_signals/ openedx/core/djangoapps/course_groups/ openedx/core/djangoapps/courseware_api/ openedx/core/djangoapps/crawlers/ openedx/core/djangoapps/credentials/ openedx/core/djangoapps/credit/ openedx/core/djangoapps/dark_lang/ openedx/core/djangoapps/debug/ openedx/core/djangoapps/discussions/ openedx/core/djangoapps/django_comment_common/ openedx/core/djangoapps/embargo/ openedx/core/djangoapps/enrollments/ openedx/core/djangoapps/external_user_ids/ openedx/core/djangoapps/zendesk_proxy/ openedx/core/djangolib/ openedx/core/lib/ openedx/core/tests/ openedx/core/djangoapps/course_live/" - module-name: openedx-2 diff --git a/.github/workflows/unit-test-shards.json b/.github/workflows/unit-test-shards.json index 4709930493..0acc1ebdc8 100644 --- a/.github/workflows/unit-test-shards.json +++ b/.github/workflows/unit-test-shards.json @@ -34,7 +34,6 @@ "paths": [ "lms/djangoapps/discussion/", "lms/djangoapps/edxnotes/", - "lms/djangoapps/email_marketing/", "lms/djangoapps/experiments/" ] }, diff --git a/lms/djangoapps/email_marketing/README.rst b/lms/djangoapps/email_marketing/README.rst deleted file mode 100644 index 5cd66a3816..0000000000 --- a/lms/djangoapps/email_marketing/README.rst +++ /dev/null @@ -1,9 +0,0 @@ -Email Marketing -=============== - -If you are reading this and the 'Maple' Open edX release is out, you can safely delete -this whole djangoapp. It only exists to hold old model migrations and any post-Maple -installation will no longer have any model in the database for this app. - -But for some minor historical context, this djangoapp used to hold some integration -with sailthru that we no longer needed. diff --git a/lms/djangoapps/email_marketing/__init__.py b/lms/djangoapps/email_marketing/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lms/djangoapps/email_marketing/apps.py b/lms/djangoapps/email_marketing/apps.py deleted file mode 100644 index bf78636d49..0000000000 --- a/lms/djangoapps/email_marketing/apps.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Configuration for the email_marketing Django application. -""" - -from django.apps import AppConfig - - -class EmailMarketingConfig(AppConfig): - """ - Configuration class for the email_marketing Django application. - """ - name = 'lms.djangoapps.email_marketing' - verbose_name = "Email Marketing" diff --git a/lms/djangoapps/email_marketing/migrations/0001_initial.py b/lms/djangoapps/email_marketing/migrations/0001_initial.py deleted file mode 100644 index 0264296e47..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0001_initial.py +++ /dev/null @@ -1,28 +0,0 @@ -import django.db.models.deletion -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ] - - operations = [ - migrations.CreateModel( - name='EmailMarketingConfiguration', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('change_date', models.DateTimeField(auto_now_add=True, verbose_name='Change date')), - ('enabled', models.BooleanField(default=False, verbose_name='Enabled')), - ('sailthru_key', models.CharField(help_text='API key for accessing Sailthru. ', max_length=32)), - ('sailthru_secret', models.CharField(help_text='API secret for accessing Sailthru. ', max_length=32)), - ('sailthru_new_user_list', models.CharField(help_text='Sailthru list name to add new users to. ', max_length=48)), - ('sailthru_retry_interval', models.IntegerField(default=3600, help_text='Sailthru connection retry interval (secs).')), - ('sailthru_max_retries', models.IntegerField(default=24, help_text='Sailthru maximum retries.')), - ('sailthru_activation_template', models.CharField(help_text='Sailthru template to use on activation send. ', max_length=20)), - ('changed_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, editable=False, to=settings.AUTH_USER_MODEL, null=True, verbose_name='Changed by')), - ], - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py b/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py deleted file mode 100644 index 049b6b3a29..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0002_auto_20160623_1656.py +++ /dev/null @@ -1,56 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_abandoned_cart_delay', - field=models.IntegerField(default=60, help_text='Sailthru minutes to wait before sending abandoned cart message.'), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_abandoned_cart_template', - field=models.CharField(help_text='Sailthru template to use on abandoned cart reminder. ', max_length=20, blank=True), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_content_cache_age', - field=models.IntegerField(default=3600, help_text='Number of seconds to cache course content retrieved from Sailthru.'), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_enroll_cost', - field=models.IntegerField(default=100, help_text='Cost in cents to report to Sailthru for enrolls.'), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_enroll_template', - field=models.CharField(help_text='Sailthru send template to use on enrolling for audit. ', max_length=20, blank=True), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_get_tags_from_sailthru', - field=models.BooleanField(default=True, help_text='Use the Sailthru content API to fetch course tags.'), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_purchase_template', - field=models.CharField(help_text='Sailthru send template to use on purchasing a course seat. ', max_length=20, blank=True), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_upgrade_template', - field=models.CharField(help_text='Sailthru send template to use on upgrading a course. ', max_length=20, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_activation_template', - field=models.CharField(help_text='Sailthru template to use on activation send. ', max_length=20, blank=True), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py b/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py deleted file mode 100644 index f0840a4d4c..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0003_auto_20160715_1145.py +++ /dev/null @@ -1,36 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0002_auto_20160623_1656'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_lms_url_override', - field=models.CharField(help_text='Optional lms url scheme + host used to construct urls for content library, e.g. https://courses.edx.org.', max_length=80, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_abandoned_cart_delay', - field=models.IntegerField(default=60, help_text='Sailthru minutes to wait before sending abandoned cart message. Deprecated.'), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_abandoned_cart_template', - field=models.CharField(help_text='Sailthru template to use on abandoned cart reminder. Deprecated.', max_length=20, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_purchase_template', - field=models.CharField(help_text='Sailthru send template to use on purchasing a course seat. Deprecated ', max_length=20, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_upgrade_template', - field=models.CharField(help_text='Sailthru send template to use on upgrading a course. Deprecated ', max_length=20, blank=True), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py b/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py deleted file mode 100644 index d6cc8334fc..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0004_emailmarketingconfiguration_welcome_email_send_delay.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0003_auto_20160715_1145'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='welcome_email_send_delay', - field=models.IntegerField(default=600, help_text='Number of seconds to delay the sending of User Welcome email after user has been activated'), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py b/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py deleted file mode 100644 index bd71d3a3e5..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0004_emailmarketingconfiguration_welcome_email_send_delay'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='user_registration_cookie_timeout_delay', - field=models.FloatField(default=1.5, help_text='The number of seconds to delay/timeout wait to get cookie values from sailthru.'), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py b/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py deleted file mode 100644 index 56c4a06d43..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0006_auto_20170711_0615.py +++ /dev/null @@ -1,16 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0005_emailmarketingconfiguration_user_registration_cookie_timeout_delay'), - ] - - operations = [ - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='user_registration_cookie_timeout_delay', - field=models.FloatField(default=3.0, help_text='The number of seconds to delay/timeout wait to get cookie values from sailthru.'), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py b/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py deleted file mode 100644 index f0e08c0576..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0007_auto_20170809_0653.py +++ /dev/null @@ -1,26 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0006_auto_20170711_0615'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_welcome_template', - field=models.CharField(help_text='Sailthru template to use on welcome send.', max_length=20, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='sailthru_activation_template', - field=models.CharField(help_text='DEPRECATED: use sailthru_welcome_template instead.', max_length=20, blank=True), - ), - migrations.AlterField( - model_name='emailmarketingconfiguration', - name='welcome_email_send_delay', - field=models.IntegerField(default=600, help_text='Number of seconds to delay the sending of User Welcome email after user has been created'), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py b/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py deleted file mode 100644 index cf30a0db28..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0008_auto_20170809_0539.py +++ /dev/null @@ -1,24 +0,0 @@ -from django.db import migrations, models - - -def migrate_data_forwards(apps, schema_editor): - EmailMarketingConfiguration = apps.get_model('email_marketing', 'EmailMarketingConfiguration') - EmailMarketingConfiguration.objects.all().update( - sailthru_welcome_template=models.F('sailthru_activation_template') - ) - - -def migrate_data_backwards(apps, schema_editor): - # Just copying old field's value to new one in forward migration, so nothing needed here. - pass - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0007_auto_20170809_0653'), - ] - - operations = [ - migrations.RunPython(migrate_data_forwards, migrate_data_backwards) - ] diff --git a/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py b/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py deleted file mode 100644 index 9408cf4c17..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0009_remove_emailmarketingconfiguration_sailthru_activation_template.py +++ /dev/null @@ -1,15 +0,0 @@ -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0008_auto_20170809_0539'), - ] - - operations = [ - migrations.RemoveField( - model_name='emailmarketingconfiguration', - name='sailthru_activation_template', - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py b/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py deleted file mode 100644 index 64dca9977e..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0010_auto_20180425_0800.py +++ /dev/null @@ -1,24 +0,0 @@ -# Generated by Django 1.11.12 on 2018-04-25 12:00 - - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0009_remove_emailmarketingconfiguration_sailthru_activation_template'), - ] - - operations = [ - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_verification_failed_template', - field=models.CharField(blank=True, help_text='Sailthru send template to use on failed ID verification.', max_length=20), - ), - migrations.AddField( - model_name='emailmarketingconfiguration', - name='sailthru_verification_passed_template', - field=models.CharField(blank=True, help_text='Sailthru send template to use on passed ID verification.', max_length=20), - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/0011_delete_emailmarketingconfiguration.py b/lms/djangoapps/email_marketing/migrations/0011_delete_emailmarketingconfiguration.py deleted file mode 100644 index f892feff09..0000000000 --- a/lms/djangoapps/email_marketing/migrations/0011_delete_emailmarketingconfiguration.py +++ /dev/null @@ -1,16 +0,0 @@ -# Generated by Django 2.2.20 on 2021-05-03 20:17 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('email_marketing', '0010_auto_20180425_0800'), - ] - - operations = [ - migrations.DeleteModel( - name='EmailMarketingConfiguration', - ), - ] diff --git a/lms/djangoapps/email_marketing/migrations/__init__.py b/lms/djangoapps/email_marketing/migrations/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/lms/envs/common.py b/lms/envs/common.py index d08d0ea0f1..c7710bbcb2 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3275,9 +3275,6 @@ INSTALLED_APPS = [ # Enables default site and redirects 'django_sites_extensions', - # Email marketing integration - 'lms.djangoapps.email_marketing.apps.EmailMarketingConfig', - # additional release utilities to ease automation 'release_util',