Skip to content
Merged
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/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
recursive-include tutornotifications/patches *
recursive-include tutornotifications/templates *
recursive-include tutorplatformnotifications/patches *
recursive-include tutorplatformnotifications/templates *
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions catalog-info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -18,6 +18,6 @@ metadata:
openedx.org/arch-interest-groups: ""
spec:
# (Required) This can be a group(`group:<group_name>` or a user(`user:<github_username>`)
owner: group:committers-tutor-contrib-notifications
owner: group:committers-tutor-contrib-platform-notifications
type: "library"
lifecycle: "experimental"
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down Expand Up @@ -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__"}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"),
]
)

Expand Down Expand Up @@ -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:
Expand All @@ -71,15 +71,15 @@
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"),
]
)

hooks.Filters.ENV_TEMPLATE_TARGETS.add_items(
# 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"),
Expand All @@ -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()))
Expand Down