diff --git a/.github/workflows/pylint-checks.yml b/.github/workflows/pylint-checks.yml index 50f4bf6fcc..94a1110cff 100644 --- a/.github/workflows/pylint-checks.yml +++ b/.github/workflows/pylint-checks.yml @@ -20,7 +20,7 @@ jobs: - module-name: openedx-1 path: "--django-settings-module=lms.envs.test 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/demographics/ 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 - path: "--django-settings-module=lms.envs.test openedx/core/djangoapps/geoinfo/ openedx/core/djangoapps/header_control/ openedx/core/djangoapps/heartbeat/ openedx/core/djangoapps/lang_pref/ openedx/core/djangoapps/models/ openedx/core/djangoapps/monkey_patch/ openedx/core/djangoapps/oauth_dispatch/ openedx/core/djangoapps/olx_rest_api/ openedx/core/djangoapps/password_policy/ openedx/core/djangoapps/plugin_api/ openedx/core/djangoapps/plugins/ openedx/core/djangoapps/profile_images/ openedx/core/djangoapps/programs/ openedx/core/djangoapps/safe_sessions/ openedx/core/djangoapps/schedules/ openedx/core/djangoapps/service_status/ openedx/core/djangoapps/session_inactivity_timeout/ openedx/core/djangoapps/signals/ openedx/core/djangoapps/site_configuration/ openedx/core/djangoapps/system_wide_roles/ openedx/core/djangoapps/theming/ openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/core/djangoapps/util/ openedx/core/djangoapps/verified_track_content/ openedx/core/djangoapps/video_config/ openedx/core/djangoapps/video_pipeline/ openedx/core/djangoapps/waffle_utils/ openedx/core/djangoapps/xblock/ openedx/core/djangoapps/xmodule_django/ openedx/core/tests/ openedx/features/ openedx/testing/ openedx/tests/ openedx/core/djangoapps/learner_pathway/ openedx/core/djangoapps/notifications/ openedx/core/djangoapps/staticfiles/" + path: "--django-settings-module=lms.envs.test openedx/core/djangoapps/geoinfo/ openedx/core/djangoapps/header_control/ openedx/core/djangoapps/heartbeat/ openedx/core/djangoapps/lang_pref/ openedx/core/djangoapps/models/ openedx/core/djangoapps/monkey_patch/ openedx/core/djangoapps/oauth_dispatch/ openedx/core/djangoapps/olx_rest_api/ openedx/core/djangoapps/password_policy/ openedx/core/djangoapps/plugin_api/ openedx/core/djangoapps/plugins/ openedx/core/djangoapps/profile_images/ openedx/core/djangoapps/programs/ openedx/core/djangoapps/safe_sessions/ openedx/core/djangoapps/schedules/ openedx/core/djangoapps/service_status/ openedx/core/djangoapps/session_inactivity_timeout/ openedx/core/djangoapps/signals/ openedx/core/djangoapps/site_configuration/ openedx/core/djangoapps/system_wide_roles/ openedx/core/djangoapps/theming/ openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/core/djangoapps/util/ openedx/core/djangoapps/verified_track_content/ openedx/core/djangoapps/video_config/ openedx/core/djangoapps/video_pipeline/ openedx/core/djangoapps/waffle_utils/ openedx/core/djangoapps/xblock/ openedx/core/djangoapps/xmodule_django/ openedx/core/tests/ openedx/features/ openedx/testing/ openedx/tests/ openedx/core/djangoapps/learner_pathway/ openedx/core/djangoapps/notifications/ openedx/core/djangoapps/staticfiles/ openedx/core/djangoapps/content_tagging/" - module-name: common path: "--django-settings-module=lms.envs.test common" - module-name: cms diff --git a/.github/workflows/unit-test-shards.json b/.github/workflows/unit-test-shards.json index fffb216bc6..50e54ea224 100644 --- a/.github/workflows/unit-test-shards.json +++ b/.github/workflows/unit-test-shards.json @@ -200,6 +200,7 @@ "openedx-4": { "settings": "cms.envs.test", "paths": [ + "openedx/core/djangoapps/content_tagging/", "openedx/core/djangoapps/geoinfo/", "openedx/core/djangoapps/header_control/", "openedx/core/djangoapps/heartbeat/", diff --git a/cms/envs/common.py b/cms/envs/common.py index ba8d2d26f2..2021d372bc 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -1752,7 +1752,7 @@ INSTALLED_APPS = [ # Tagging 'openedx_tagging.core.tagging.apps.TaggingConfig', - 'openedx.features.content_tagging', + 'openedx.core.djangoapps.content_tagging', 'openedx.features.course_duration_limits', 'openedx.features.content_type_gating', diff --git a/cms/urls.py b/cms/urls.py index 540d3cc8db..a949c086ea 100644 --- a/cms/urls.py +++ b/cms/urls.py @@ -339,7 +339,7 @@ urlpatterns += [ # Content tagging urlpatterns += [ - path('api/content_tagging/', include(('openedx.features.content_tagging.urls'))), + path('api/content_tagging/', include(('openedx.core.djangoapps.content_tagging.urls'))), ] # studio-content-api specific API docs (using drf-spectacular and openapi-v3) diff --git a/lms/envs/common.py b/lms/envs/common.py index 4f9d9d17f4..130c485fea 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -3230,7 +3230,7 @@ INSTALLED_APPS = [ # Tagging 'openedx_tagging.core.tagging.apps.TaggingConfig', - 'openedx.features.content_tagging', + 'openedx.core.djangoapps.content_tagging', # Features 'openedx.features.calendar_sync', diff --git a/openedx/features/content_tagging/__init__.py b/openedx/core/djangoapps/content_tagging/__init__.py similarity index 100% rename from openedx/features/content_tagging/__init__.py rename to openedx/core/djangoapps/content_tagging/__init__.py diff --git a/openedx/features/content_tagging/admin.py b/openedx/core/djangoapps/content_tagging/admin.py similarity index 100% rename from openedx/features/content_tagging/admin.py rename to openedx/core/djangoapps/content_tagging/admin.py diff --git a/openedx/features/content_tagging/api.py b/openedx/core/djangoapps/content_tagging/api.py similarity index 100% rename from openedx/features/content_tagging/api.py rename to openedx/core/djangoapps/content_tagging/api.py diff --git a/openedx/features/content_tagging/apps.py b/openedx/core/djangoapps/content_tagging/apps.py similarity index 86% rename from openedx/features/content_tagging/apps.py rename to openedx/core/djangoapps/content_tagging/apps.py index 29952b7bc3..de52da3678 100644 --- a/openedx/features/content_tagging/apps.py +++ b/openedx/core/djangoapps/content_tagging/apps.py @@ -9,7 +9,7 @@ class ContentTaggingConfig(AppConfig): """App config for the content tagging feature""" default_auto_field = "django.db.models.BigAutoField" - name = "openedx.features.content_tagging" + name = "openedx.core.djangoapps.content_tagging" def ready(self): # Connect signal handlers diff --git a/openedx/features/content_tagging/handlers.py b/openedx/core/djangoapps/content_tagging/handlers.py similarity index 100% rename from openedx/features/content_tagging/handlers.py rename to openedx/core/djangoapps/content_tagging/handlers.py diff --git a/openedx/features/content_tagging/migrations/0001_initial.py b/openedx/core/djangoapps/content_tagging/migrations/0001_initial.py similarity index 100% rename from openedx/features/content_tagging/migrations/0001_initial.py rename to openedx/core/djangoapps/content_tagging/migrations/0001_initial.py diff --git a/openedx/features/content_tagging/migrations/0002_system_defined_taxonomies.py b/openedx/core/djangoapps/content_tagging/migrations/0002_system_defined_taxonomies.py similarity index 74% rename from openedx/features/content_tagging/migrations/0002_system_defined_taxonomies.py rename to openedx/core/djangoapps/content_tagging/migrations/0002_system_defined_taxonomies.py index c743a70ce2..78b0baa949 100644 --- a/openedx/features/content_tagging/migrations/0002_system_defined_taxonomies.py +++ b/openedx/core/djangoapps/content_tagging/migrations/0002_system_defined_taxonomies.py @@ -1,7 +1,7 @@ # Generated by Django 3.2.20 on 2023-07-31 21:07 from django.db import migrations -import openedx.features.content_tagging.models.base +import openedx.core.djangoapps.content_tagging.models.base class Migration(migrations.Migration): @@ -21,7 +21,7 @@ class Migration(migrations.Migration): 'indexes': [], 'constraints': [], }, - bases=(openedx.features.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.usersystemdefinedtaxonomy'), + bases=(openedx.core.djangoapps.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.usersystemdefinedtaxonomy'), ), migrations.CreateModel( name='ContentLanguageTaxonomy', @@ -32,7 +32,7 @@ class Migration(migrations.Migration): 'indexes': [], 'constraints': [], }, - bases=(openedx.features.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.languagetaxonomy'), + bases=(openedx.core.djangoapps.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.languagetaxonomy'), ), migrations.CreateModel( name='ContentOrganizationTaxonomy', @@ -43,7 +43,7 @@ class Migration(migrations.Migration): 'indexes': [], 'constraints': [], }, - bases=(openedx.features.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.modelsystemdefinedtaxonomy'), + bases=(openedx.core.djangoapps.content_tagging.models.base.ContentTaxonomyMixin, 'oel_tagging.modelsystemdefinedtaxonomy'), ), migrations.CreateModel( name='OrganizationModelObjectTag', diff --git a/openedx/features/content_tagging/migrations/0003_system_defined_fixture.py b/openedx/core/djangoapps/content_tagging/migrations/0003_system_defined_fixture.py similarity index 100% rename from openedx/features/content_tagging/migrations/0003_system_defined_fixture.py rename to openedx/core/djangoapps/content_tagging/migrations/0003_system_defined_fixture.py diff --git a/openedx/features/content_tagging/migrations/0004_system_defined_org.py b/openedx/core/djangoapps/content_tagging/migrations/0004_system_defined_org.py similarity index 100% rename from openedx/features/content_tagging/migrations/0004_system_defined_org.py rename to openedx/core/djangoapps/content_tagging/migrations/0004_system_defined_org.py diff --git a/openedx/features/content_tagging/migrations/0005_auto_20230830_1517.py b/openedx/core/djangoapps/content_tagging/migrations/0005_auto_20230830_1517.py similarity index 100% rename from openedx/features/content_tagging/migrations/0005_auto_20230830_1517.py rename to openedx/core/djangoapps/content_tagging/migrations/0005_auto_20230830_1517.py diff --git a/openedx/features/content_tagging/migrations/__init__.py b/openedx/core/djangoapps/content_tagging/migrations/__init__.py similarity index 100% rename from openedx/features/content_tagging/migrations/__init__.py rename to openedx/core/djangoapps/content_tagging/migrations/__init__.py diff --git a/openedx/features/content_tagging/models/__init__.py b/openedx/core/djangoapps/content_tagging/models/__init__.py similarity index 100% rename from openedx/features/content_tagging/models/__init__.py rename to openedx/core/djangoapps/content_tagging/models/__init__.py diff --git a/openedx/features/content_tagging/models/base.py b/openedx/core/djangoapps/content_tagging/models/base.py similarity index 100% rename from openedx/features/content_tagging/models/base.py rename to openedx/core/djangoapps/content_tagging/models/base.py diff --git a/openedx/features/content_tagging/models/system_defined.py b/openedx/core/djangoapps/content_tagging/models/system_defined.py similarity index 100% rename from openedx/features/content_tagging/models/system_defined.py rename to openedx/core/djangoapps/content_tagging/models/system_defined.py diff --git a/openedx/features/content_tagging/rest_api/__init__.py b/openedx/core/djangoapps/content_tagging/rest_api/__init__.py similarity index 100% rename from openedx/features/content_tagging/rest_api/__init__.py rename to openedx/core/djangoapps/content_tagging/rest_api/__init__.py diff --git a/openedx/features/content_tagging/rest_api/urls.py b/openedx/core/djangoapps/content_tagging/rest_api/urls.py similarity index 100% rename from openedx/features/content_tagging/rest_api/urls.py rename to openedx/core/djangoapps/content_tagging/rest_api/urls.py diff --git a/openedx/features/content_tagging/rest_api/v1/__init__.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/__init__.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/__init__.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/__init__.py diff --git a/openedx/features/content_tagging/rest_api/v1/filters.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/filters.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/filters.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/filters.py diff --git a/openedx/features/content_tagging/rest_api/v1/serializers.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/serializers.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/serializers.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/serializers.py diff --git a/openedx/features/content_tagging/rest_api/v1/tests/__init__.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/__init__.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/tests/__init__.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/tests/__init__.py diff --git a/openedx/features/content_tagging/rest_api/v1/tests/test_views.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py similarity index 99% rename from openedx/features/content_tagging/rest_api/v1/tests/test_views.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py index f2ce3c4064..f816436e2c 100644 --- a/openedx/features/content_tagging/rest_api/v1/tests/test_views.py +++ b/openedx/core/djangoapps/content_tagging/rest_api/v1/tests/test_views.py @@ -17,8 +17,8 @@ from rest_framework.test import APITestCase from common.djangoapps.student.auth import add_users, update_org_role from common.djangoapps.student.roles import CourseStaffRole, OrgContentCreatorRole +from openedx.core.djangoapps.content_tagging.models import TaxonomyOrg from openedx.core.djangolib.testing.utils import skip_unless_cms -from openedx.features.content_tagging.models import TaxonomyOrg User = get_user_model() diff --git a/openedx/features/content_tagging/rest_api/v1/urls.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/urls.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/urls.py diff --git a/openedx/features/content_tagging/rest_api/v1/views.py b/openedx/core/djangoapps/content_tagging/rest_api/v1/views.py similarity index 100% rename from openedx/features/content_tagging/rest_api/v1/views.py rename to openedx/core/djangoapps/content_tagging/rest_api/v1/views.py diff --git a/openedx/features/content_tagging/rules.py b/openedx/core/djangoapps/content_tagging/rules.py similarity index 100% rename from openedx/features/content_tagging/rules.py rename to openedx/core/djangoapps/content_tagging/rules.py diff --git a/openedx/features/content_tagging/tasks.py b/openedx/core/djangoapps/content_tagging/tasks.py similarity index 100% rename from openedx/features/content_tagging/tasks.py rename to openedx/core/djangoapps/content_tagging/tasks.py diff --git a/openedx/features/content_tagging/tests/__init__.py b/openedx/core/djangoapps/content_tagging/tests/__init__.py similarity index 100% rename from openedx/features/content_tagging/tests/__init__.py rename to openedx/core/djangoapps/content_tagging/tests/__init__.py diff --git a/openedx/features/content_tagging/tests/test_api.py b/openedx/core/djangoapps/content_tagging/tests/test_api.py similarity index 100% rename from openedx/features/content_tagging/tests/test_api.py rename to openedx/core/djangoapps/content_tagging/tests/test_api.py diff --git a/openedx/features/content_tagging/tests/test_models.py b/openedx/core/djangoapps/content_tagging/tests/test_models.py similarity index 100% rename from openedx/features/content_tagging/tests/test_models.py rename to openedx/core/djangoapps/content_tagging/tests/test_models.py diff --git a/openedx/features/content_tagging/tests/test_rules.py b/openedx/core/djangoapps/content_tagging/tests/test_rules.py similarity index 100% rename from openedx/features/content_tagging/tests/test_rules.py rename to openedx/core/djangoapps/content_tagging/tests/test_rules.py diff --git a/openedx/features/content_tagging/tests/test_tasks.py b/openedx/core/djangoapps/content_tagging/tests/test_tasks.py similarity index 96% rename from openedx/features/content_tagging/tests/test_tasks.py rename to openedx/core/djangoapps/content_tagging/tests/test_tasks.py index 47bf864951..c1c45e9449 100644 --- a/openedx/features/content_tagging/tests/test_tasks.py +++ b/openedx/core/djangoapps/content_tagging/tests/test_tasks.py @@ -13,7 +13,7 @@ from organizations.models import Organization from common.djangoapps.student.tests.factories import UserFactory from openedx.core.djangolib.testing.utils import skip_unless_cms -from xmodule.modulestore.tests.django_utils import TEST_DATA_MIXED_MODULESTORE, ModuleStoreTestCase +from xmodule.modulestore.tests.django_utils import TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase from .. import api from ..models import ContentLanguageTaxonomy, TaxonomyOrg @@ -29,7 +29,7 @@ class TestAutoTagging(ModuleStoreTestCase): Test if the Course and XBlock tags are automatically created """ - MODULESTORE = TEST_DATA_MIXED_MODULESTORE + MODULESTORE = TEST_DATA_SPLIT_MODULESTORE def _check_tag(self, object_id: str, taxonomy_id: int, value: str | None): """ @@ -69,7 +69,7 @@ class TestAutoTagging(ModuleStoreTestCase): self.user_id = self.user.id self.orgA = Organization.objects.create(name="Organization A", short_name="orgA") - self.patcher = patch("openedx.features.content_tagging.tasks.modulestore", return_value=self.store) + self.patcher = patch("openedx.core.djangoapps.content_tagging.tasks.modulestore", return_value=self.store) self.addCleanup(self.patcher.stop) self.patcher.start() diff --git a/openedx/features/content_tagging/toggles.py b/openedx/core/djangoapps/content_tagging/toggles.py similarity index 100% rename from openedx/features/content_tagging/toggles.py rename to openedx/core/djangoapps/content_tagging/toggles.py diff --git a/openedx/features/content_tagging/urls.py b/openedx/core/djangoapps/content_tagging/urls.py similarity index 100% rename from openedx/features/content_tagging/urls.py rename to openedx/core/djangoapps/content_tagging/urls.py