Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sumac #11

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Python Semantic Release
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.12

- name: Install dependencies
run: |
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "tutor-contrib-mfe-extensions"
dynamic = ["version"]
description = "mfe_extensions plugin for Tutor"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
license = { file = "LICENSE" }
authors = [
{ name = "Moisés González" }
Expand All @@ -18,15 +18,14 @@ classifiers = [
"License :: OSI Approved :: GNU Affero General Public License v3",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"tutor>=18.0.0",
"tutor-mfe>=18.0.0",
"tutor>=19.0.0",
"tutor-mfe>=19.0.0",
]

[project.optional-dependencies]
Expand Down
4 changes: 4 additions & 0 deletions tutormfe_extensions/patches/caddyfile-cms
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ reverse_proxy /api/mfe_config/v1* lms:8000 {
header_up Host {{ LMS_HOST }}
}
{%- for app_name in iter_mfes_per_service("cms") %}
{%- if app_name == "authoring" %}
@authoring path_regexp authoring /course-authoring/(.*)
redir @authoring /authoring/{re.authoring.1} permanent
{%- endif %}
@mfe_{{ app_name }} {
path /{{ app_name }} /{{ app_name }}/*
}
Expand Down
4 changes: 2 additions & 2 deletions tutormfe_extensions/patches/openedx-cms-production-settings
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{%- if MFE_EXTENSIONS_BY_PATH %}
{%- if get_mfe("course-authoring") %}
COURSE_AUTHORING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}/course-authoring"
{%- if get_mfe("authoring") %}
COURSE_AUTHORING_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ CMS_HOST }}/authoring"
Henrrypg marked this conversation as resolved.
Show resolved Hide resolved
{%- endif %}
{%- endif %}
4 changes: 2 additions & 2 deletions tutormfe_extensions/patches/openedx-lms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ MFE_CONFIG["ACCOUNT_PROFILE_URL"] = "{% if ENABLE_HTTPS %}https{% else %}http{%
COMMUNICATIONS_MICROFRONTEND_URL = "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/communications"
{% endif %}

{% if get_mfe("course-authoring") %}
MFE_CONFIG["COURSE_AUTHORING_MICROFRONTEND_URL"] = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ LMS_HOST }}/course-authoring"
{% if get_mfe("authoring") %}
MFE_CONFIG["COURSE_AUTHORING_MICROFRONTEND_URL"] = "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ LMS_HOST }}/authoring"
{% endif %}

CORS_ORIGIN_WHITELIST.append("{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ CMS_HOST }}")
Expand Down
2 changes: 1 addition & 1 deletion tutormfe_extensions/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def iter_mfes_per_service(service: str = "") -> Iterable[str]:

"""
active_mfes = MFE_APPS.apply({})
cms_mfes = {"course-authoring"}
cms_mfes = {"authoring"}
lms_mfes = set(CORE_MFE_APPS) - cms_mfes

for mfe in active_mfes:
Expand Down
Loading