Skip to content

Commit d985d60

Browse files
author
Overhang.IO
committed
Merge remote-tracking branch 'origin/master' into nightly
2 parents d45e4aa + fbf84be commit d985d60

7 files changed

+19
-20
lines changed

.github/workflows/auto-add-to-project.yml

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
name: Auto Add Issues and Pull Requests to Project
1+
name: Auto Add Issues to Project
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
74
issues:
85
types:
96
- opened

.gitlab-ci.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
variables:
22
TUTOR_PLUGIN: mfe
3-
TUTOR_IMAGES: mfe authn-dev account-dev communications-dev course-authoring-dev discussions-dev gradebook-dev learning-dev ora-grading-dev profile-dev
3+
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
44
TUTOR_PYPI_PACKAGE: tutor-mfe
5-
OPENEDX_RELEASE: palm
65
GITHUB_REPO: overhangio/tutor-mfe
76

87
include:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [Bugfix] Make plugin compatible with Python 3.12 by removing dependency on `pkg_resources`. (by @regisb)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[Bugfix] Make sure course-authoring mfe is present in MFE_APPS before applying cms-development-settings. (by @Danyal-Faheem)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-[Bugfix] Added the learner-dashboard-dev image to the gitlab ci. (by @Danyal-Faheem)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# MFE-specific settings
2+
{% if get_mfe("course-authoring") %}
23
COURSE_AUTHORING_MICROFRONTEND_URL = "http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}/course-authoring"
34
CORS_ORIGIN_WHITELIST.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}")
45
LOGIN_REDIRECT_WHITELIST.append("{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}")
56
CSRF_TRUSTED_ORIGINS.append("http://{{ MFE_HOST }}:{{ get_mfe('course-authoring')["port"] }}")
7+
{% endif %}

tutormfe/plugin.py

+12-14
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
import typing as t
66
from glob import glob
77

8-
import pkg_resources
8+
import importlib_resources
99
from tutor import fmt
10-
from tutor.__about__ import __version_suffix__
1110
from tutor import hooks as tutor_hooks
11+
from tutor.__about__ import __version_suffix__
1212
from tutor.hooks import priorities
1313
from tutor.types import Config, get_typed
1414

@@ -168,11 +168,14 @@ def _mounted_mfe_image_management() -> None:
168168
# init script
169169
with open(
170170
os.path.join(
171-
pkg_resources.resource_filename("tutormfe", "templates"),
172-
"mfe",
173-
"tasks",
174-
"lms",
175-
"init",
171+
str(
172+
importlib_resources.files("tutormfe")
173+
/ "templates"
174+
/ "mfe"
175+
/ "tasks"
176+
/ "lms"
177+
/ "init"
178+
)
176179
),
177180
encoding="utf-8",
178181
) as task_file:
@@ -248,7 +251,7 @@ def _build_3rd_party_dev_mfes_on_launch(
248251
# Boilerplate code
249252
# Add the "templates" folder as a template root
250253
tutor_hooks.Filters.ENV_TEMPLATE_ROOTS.add_item(
251-
pkg_resources.resource_filename("tutormfe", "templates")
254+
str(importlib_resources.files("tutormfe") / "templates")
252255
)
253256
# Render the "build" and "apps" folders
254257
tutor_hooks.Filters.ENV_TEMPLATE_TARGETS.add_items(
@@ -258,12 +261,7 @@ def _build_3rd_party_dev_mfes_on_launch(
258261
],
259262
)
260263
# Load patches from files
261-
for path in glob(
262-
os.path.join(
263-
pkg_resources.resource_filename("tutormfe", "patches"),
264-
"*",
265-
)
266-
):
264+
for path in glob(str(importlib_resources.files("tutormfe") / "patches" / "*")):
267265
with open(path, encoding="utf-8") as patch_file:
268266
# Here we force tutor-mfe lms patches to be loaded first, thus ensuring when operators override
269267
# MFE_CONFIG and/or MFE_CONFIG_OVERRIDES, their patches will be loaded after this plugin's

0 commit comments

Comments
 (0)