From 024a71fe6c53436f4219d12133d48f0580b33062 Mon Sep 17 00:00:00 2001 From: Tycho Hob Date: Tue, 16 Dec 2025 15:29:14 -0500 Subject: [PATCH] refactor!: Rename project Repo is being renamed from tutor-contrib-notificatations to tutor-contrib-platform-notifications, plugin code directory from tutornotifications to tutorplatformnotifications --- .github/workflows/integration-test.yml | 2 +- MANIFEST.in | 4 ++-- Makefile | 4 ++-- catalog-info.yaml | 6 +++--- pyproject.toml | 12 ++++++------ .../__about__.py | 0 .../__init__.py | 0 .../patches/lms-env | 0 .../patches/mfe-dockerfile-post-npm-install | 0 .../patches/mfe-env-config-runtime-definitions | 0 .../patches/mfe-lms-production-settings | 0 .../patches/openedx-common-settings | 0 .../plugin.py | 12 ++++++------ .../templates/notifications/apps/.gitignore | 0 .../templates/notifications/tasks/lms/.gitignore | 0 .../templates/notifications/tasks/lms/waffle_flags | 0 16 files changed, 20 insertions(+), 20 deletions(-) rename {tutornotifications => tutorplatformnotifications}/__about__.py (100%) rename {tutornotifications => tutorplatformnotifications}/__init__.py (100%) rename {tutornotifications => tutorplatformnotifications}/patches/lms-env (100%) rename {tutornotifications => tutorplatformnotifications}/patches/mfe-dockerfile-post-npm-install (100%) rename {tutornotifications => tutorplatformnotifications}/patches/mfe-env-config-runtime-definitions (100%) rename {tutornotifications => tutorplatformnotifications}/patches/mfe-lms-production-settings (100%) rename {tutornotifications => tutorplatformnotifications}/patches/openedx-common-settings (100%) rename {tutornotifications => tutorplatformnotifications}/plugin.py (91%) rename {tutornotifications => tutorplatformnotifications}/templates/notifications/apps/.gitignore (100%) rename {tutornotifications => tutorplatformnotifications}/templates/notifications/tasks/lms/.gitignore (100%) rename {tutornotifications => tutorplatformnotifications}/templates/notifications/tasks/lms/waffle_flags (100%) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 4626f61..5ed3bc5 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-python@v6 with: python-version: 3.12 - - name: Install tutor-contrib-notifications + - name: Install tutor-contrib-platform-notifications run: pip install -e . - name: Tutor config save run: tutor config save diff --git a/MANIFEST.in b/MANIFEST.in index d25d9c8..fdf24d4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -recursive-include tutornotifications/patches * -recursive-include tutornotifications/templates * +recursive-include tutorplatformnotifications/patches * +recursive-include tutorplatformnotifications/templates * diff --git a/Makefile b/Makefile index fbf7486..0c50e55 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ .DEFAULT_GOAL := help .PHONY: docs -SRC_DIRS = ./tutornotifications +SRC_DIRS = ./tutorplatformnotifications # Warning: These checks are not necessarily run on every PR. test: test-lint test-types test-format # Run some static checks. @@ -21,7 +21,7 @@ fix-lint: ## Fix lint errors automatically ruff check --fix ${SRC_DIRS} version: ## Print the current tutor-cairn version - @python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutornotifications", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__version__"])' + @python -c 'import io, os; about = {}; exec(io.open(os.path.join("tutorplatformnotifications", "__about__.py"), "rt", encoding="utf-8").read(), about); print(about["__version__"])' ESCAPE =  help: ## Print this help diff --git a/catalog-info.yaml b/catalog-info.yaml index 8425b24..f853735 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -4,10 +4,10 @@ apiVersion: backstage.io/v1alpha1 kind: Component metadata: - name: "tutor-contrib-notifications" + name: "tutor-contrib-platform-notifications" description: "A Tutor plugin to manage configuration and plugin slots for the Notifications tray feature." links: - - url: "https://github.com/openedx/tutor-contrib-notifications/blob/master/README.rst" + - url: "https://github.com/openedx/tutor-contrib-platform-notifications/blob/master/README.rst" title: "README" icon: "Article" annotations: @@ -18,6 +18,6 @@ metadata: openedx.org/arch-interest-groups: "" spec: # (Required) This can be a group(`group:` or a user(`user:`) - owner: group:committers-tutor-contrib-notifications + owner: group:committers-tutor-contrib-platform-notifications type: "library" lifecycle: "experimental" diff --git a/pyproject.toml b/pyproject.toml index 9ab1d54..8aa4114 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ # https://packaging.python.org/en/latest/tutorials/packaging-projects/ [project] -name = "tutor-contrib-notifications" +name = "tutor-contrib-platform-notifications" description = "A Tutor plugin to manage configuration and plugin slots for the Notifications tray feature." authors = [ { name = "Ty Hob"}, @@ -41,13 +41,13 @@ dev = [ # https://packaging.python.org/en/latest/specifications/well-known-project-urls/#well-known-labels [project.urls] -Documentation = "https://github.com/openedx/tutor-contrib-notifications#readme" -Issues = "https://github.com/openedx/tutor-contrib-notifications/issues" -Source = "https://github.com/openedx/tutor-contrib-notifications" +Documentation = "https://github.com/openedx/tutor-contrib-platform-notifications#readme" +Issues = "https://github.com/openedx/tutor-contrib-platform-notifications/issues" +Source = "https://github.com/openedx/tutor-contrib-platform-notifications" [project.entry-points."tutor.plugin.v1"] -notifications = "tutornotifications.plugin" +notifications = "tutorplatformnotifications.plugin" [tool.setuptools.dynamic] -version = {attr = "tutornotifications.__about__.__version__"} +version = {attr = "tutorplatformnotifications.__about__.__version__"} diff --git a/tutornotifications/__about__.py b/tutorplatformnotifications/__about__.py similarity index 100% rename from tutornotifications/__about__.py rename to tutorplatformnotifications/__about__.py diff --git a/tutornotifications/__init__.py b/tutorplatformnotifications/__init__.py similarity index 100% rename from tutornotifications/__init__.py rename to tutorplatformnotifications/__init__.py diff --git a/tutornotifications/patches/lms-env b/tutorplatformnotifications/patches/lms-env similarity index 100% rename from tutornotifications/patches/lms-env rename to tutorplatformnotifications/patches/lms-env diff --git a/tutornotifications/patches/mfe-dockerfile-post-npm-install b/tutorplatformnotifications/patches/mfe-dockerfile-post-npm-install similarity index 100% rename from tutornotifications/patches/mfe-dockerfile-post-npm-install rename to tutorplatformnotifications/patches/mfe-dockerfile-post-npm-install diff --git a/tutornotifications/patches/mfe-env-config-runtime-definitions b/tutorplatformnotifications/patches/mfe-env-config-runtime-definitions similarity index 100% rename from tutornotifications/patches/mfe-env-config-runtime-definitions rename to tutorplatformnotifications/patches/mfe-env-config-runtime-definitions diff --git a/tutornotifications/patches/mfe-lms-production-settings b/tutorplatformnotifications/patches/mfe-lms-production-settings similarity index 100% rename from tutornotifications/patches/mfe-lms-production-settings rename to tutorplatformnotifications/patches/mfe-lms-production-settings diff --git a/tutornotifications/patches/openedx-common-settings b/tutorplatformnotifications/patches/openedx-common-settings similarity index 100% rename from tutornotifications/patches/openedx-common-settings rename to tutorplatformnotifications/patches/openedx-common-settings diff --git a/tutornotifications/plugin.py b/tutorplatformnotifications/plugin.py similarity index 91% rename from tutornotifications/plugin.py rename to tutorplatformnotifications/plugin.py index 49fe7bb..0ca23cd 100644 --- a/tutornotifications/plugin.py +++ b/tutorplatformnotifications/plugin.py @@ -19,7 +19,7 @@ ("NOTIFICATIONS_VERSION", __version__), ("NOTIFICATIONS_ENABLE_SHOW_EMAIL_CHANNEL", True), ("NOTIFICATIONS_ENABLE_SHOW_PUSH_CHANNEL", False), - ("NOTIFICATIONS_DEFAULT_FROM_EMAIL", "{{ CONTACT_EMAIL }}") + ("NOTIFICATIONS_DEFAULT_FROM_EMAIL", "{{ CONTACT_EMAIL }}"), ] ) @@ -54,7 +54,7 @@ for service, template_path in MY_INIT_TASKS: full_path: str = str( - importlib_resources.files("tutornotifications") + importlib_resources.files("tutorplatformnotifications") / os.path.join("templates", *template_path) ) with open(full_path, encoding="utf-8") as init_task_file: @@ -71,7 +71,7 @@ hooks.Filters.ENV_TEMPLATE_ROOTS.add_items( # Root paths for template files, relative to the project root. [ - str(importlib_resources.files("tutornotifications") / "templates"), + str(importlib_resources.files("tutorplatformnotifications") / "templates"), ] ) @@ -79,7 +79,7 @@ # For each pair (source_path, destination_path): # templates at ``source_path`` (relative to your ENV_TEMPLATE_ROOTS) will be # rendered to ``source_path/destination_path`` (relative to your Tutor environment). - # For example, ``tutornotifications/templates/notifications/build`` + # For example, ``tutorplatformnotifications/templates/notifications/build`` # will be rendered to ``$(tutor config printroot)/env/plugins/notifications/build``. [ ("notifications/build", "plugins"), @@ -94,10 +94,10 @@ # this section as-is :) ######################################## -# For each file in tutornotifications/patches, +# For each file in tutorplatformnotifications/patches, # apply a patch based on the file's name and contents. for path in glob( - str(importlib_resources.files("tutornotifications") / "patches" / "*") + str(importlib_resources.files("tutorplatformnotifications") / "patches" / "*") ): with open(path, encoding="utf-8") as patch_file: hooks.Filters.ENV_PATCHES.add_item((os.path.basename(path), patch_file.read())) diff --git a/tutornotifications/templates/notifications/apps/.gitignore b/tutorplatformnotifications/templates/notifications/apps/.gitignore similarity index 100% rename from tutornotifications/templates/notifications/apps/.gitignore rename to tutorplatformnotifications/templates/notifications/apps/.gitignore diff --git a/tutornotifications/templates/notifications/tasks/lms/.gitignore b/tutorplatformnotifications/templates/notifications/tasks/lms/.gitignore similarity index 100% rename from tutornotifications/templates/notifications/tasks/lms/.gitignore rename to tutorplatformnotifications/templates/notifications/tasks/lms/.gitignore diff --git a/tutornotifications/templates/notifications/tasks/lms/waffle_flags b/tutorplatformnotifications/templates/notifications/tasks/lms/waffle_flags similarity index 100% rename from tutornotifications/templates/notifications/tasks/lms/waffle_flags rename to tutorplatformnotifications/templates/notifications/tasks/lms/waffle_flags