diff --git a/.github/workflows/auto-add-to-project.yml b/.github/workflows/auto-add-to-project.yml index d4ab7a42..7dadeb66 100644 --- a/.github/workflows/auto-add-to-project.yml +++ b/.github/workflows/auto-add-to-project.yml @@ -1,9 +1,6 @@ -name: Auto Add Issues and Pull Requests to Project +name: Auto Add Issues to Project on: - pull_request: - types: - - opened issues: types: - opened diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20fecf02..6ec2e55e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,7 @@ variables: TUTOR_PLUGIN: mfe - TUTOR_IMAGES: mfe authn-dev account-dev communications-dev course-authoring-dev discussions-dev gradebook-dev learning-dev ora-grading-dev profile-dev + TUTOR_IMAGES: mfe authn-dev account-dev communications-dev course-authoring-dev discussions-dev gradebook-dev learner-dashboard-dev learning-dev ora-grading-dev profile-dev TUTOR_PYPI_PACKAGE: tutor-mfe - OPENEDX_RELEASE: palm GITHUB_REPO: overhangio/tutor-mfe include: diff --git a/changelog.d/20240212_115536_regis_pkg_resources.md b/changelog.d/20240212_115536_regis_pkg_resources.md new file mode 100644 index 00000000..35b6d201 --- /dev/null +++ b/changelog.d/20240212_115536_regis_pkg_resources.md @@ -0,0 +1 @@ +- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb) diff --git a/changelog.d/20240213_141934_danyal.faheem_fix_course_authoring_mfe_removal.md b/changelog.d/20240213_141934_danyal.faheem_fix_course_authoring_mfe_removal.md new file mode 100644 index 00000000..c3fce036 --- /dev/null +++ b/changelog.d/20240213_141934_danyal.faheem_fix_course_authoring_mfe_removal.md @@ -0,0 +1 @@ +[Bugfix] Make sure course-authoring mfe is present in MFE_APPS before applying cms-development-settings. (by @Danyal-Faheem) diff --git a/changelog.d/20240221_114505_danyal.faheem_add_learner_dashboard_dev_to_ci.md b/changelog.d/20240221_114505_danyal.faheem_add_learner_dashboard_dev_to_ci.md new file mode 100644 index 00000000..af8efc64 --- /dev/null +++ b/changelog.d/20240221_114505_danyal.faheem_add_learner_dashboard_dev_to_ci.md @@ -0,0 +1 @@ +-[Bugfix] Added the learner-dashboard-dev image to the gitlab ci. (by @Danyal-Faheem) diff --git a/tutormfe/patches/openedx-cms-development-settings b/tutormfe/patches/openedx-cms-development-settings index bfbf031e..ec895df5 100644 --- a/tutormfe/patches/openedx-cms-development-settings +++ b/tutormfe/patches/openedx-cms-development-settings @@ -1,5 +1,7 @@ # MFE-specific settings +{% if get_mfe("course-authoring") %} COURSE_AUTHORING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}/course-authoring" CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}") +{% endif %} diff --git a/tutormfe/plugin.py b/tutormfe/plugin.py index 421761af..ab1fe035 100644 --- a/tutormfe/plugin.py +++ b/tutormfe/plugin.py @@ -5,10 +5,10 @@ import typing as t from glob import glob -import pkg_resources +import importlib_resources from tutor import fmt -from tutor.__about__ import __version_suffix__ from tutor import hooks as tutor_hooks +from tutor.__about__ import __version_suffix__ from tutor.hooks import priorities from tutor.types import Config, get_typed @@ -168,11 +168,14 @@ def _mounted_mfe_image_management() -> None: # init script with open( os.path.join( - pkg_resources.resource_filename("tutormfe", "templates"), - "mfe", - "tasks", - "lms", - "init", + str( + importlib_resources.files("tutormfe") + / "templates" + / "mfe" + / "tasks" + / "lms" + / "init" + ) ), encoding="utf-8", ) as task_file: @@ -248,7 +251,7 @@ def _build_3rd_party_dev_mfes_on_launch( # Boilerplate code # Add the "templates" folder as a template root tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item( - pkg_resources.resource_filename("tutormfe", "templates") + str(importlib_resources.files("tutormfe") / "templates") ) # Render the "build" and "apps" folders tutor_hooks.Filters.ENV_TEMPLATE_TARGETS.add_items( @@ -258,12 +261,7 @@ def _build_3rd_party_dev_mfes_on_launch( ], ) # Load patches from files -for path in glob( - os.path.join( - pkg_resources.resource_filename("tutormfe", "patches"), - "*", - ) -): +for path in glob(str(importlib_resources.files("tutormfe") / "patches" / "*")): with open(path, encoding="utf-8") as patch_file: # Here we force tutor-mfe lms patches to be loaded first, thus ensuring when operators override # MFE_CONFIG and/or MFE_CONFIG_OVERRIDES, their patches will be loaded after this plugin's