From 86cc0f2b696dab77547f2052194c379706da9330 Mon Sep 17 00:00:00 2001 From: John Davis Date: Thu, 17 Nov 2022 12:51:58 -0500 Subject: [PATCH] Move custom templates into the config package --- lib/galaxy/{util/custom_templates => config}/template.py | 0 lib/galaxy/managers/users.py | 2 +- packages/config/setup.cfg | 1 + packages/util/setup.cfg | 1 - test/unit/app/managers/test_UserManager.py | 3 --- test/unit/{util => config}/test_custom_templates.py | 2 +- 6 files changed, 3 insertions(+), 6 deletions(-) rename lib/galaxy/{util/custom_templates => config}/template.py (100%) rename test/unit/{util => config}/test_custom_templates.py (96%) diff --git a/lib/galaxy/util/custom_templates/template.py b/lib/galaxy/config/template.py similarity index 100% rename from lib/galaxy/util/custom_templates/template.py rename to lib/galaxy/config/template.py diff --git a/lib/galaxy/managers/users.py b/lib/galaxy/managers/users.py index dee5d9f505a..4b644f742c5 100644 --- a/lib/galaxy/managers/users.py +++ b/lib/galaxy/managers/users.py @@ -24,6 +24,7 @@ from galaxy import ( schema, util, ) +from galaxy.config import template from galaxy.managers import ( base, deletable, @@ -38,7 +39,6 @@ from galaxy.structured_app import ( BasicSharedApp, MinimalManagerApp, ) -from galaxy.util.custom_templates import template from galaxy.util.hash_util import new_secure_hash_v2 from galaxy.web import url_for diff --git a/packages/config/setup.cfg b/packages/config/setup.cfg index fcae838acdf..9405aff43c4 100644 --- a/packages/config/setup.cfg +++ b/packages/config/setup.cfg @@ -33,6 +33,7 @@ include_package_data = True install_requires = galaxy-util boltons + jinja2 pykwalify PyYAML packages = find: diff --git a/packages/util/setup.cfg b/packages/util/setup.cfg index 8f35f1c8d13..440d7c66f3a 100644 --- a/packages/util/setup.cfg +++ b/packages/util/setup.cfg @@ -35,7 +35,6 @@ install_requires = boltons docutils importlib_resources - jinja2 MarkupSafe packaging pycryptodome diff --git a/test/unit/app/managers/test_UserManager.py b/test/unit/app/managers/test_UserManager.py index 33452c80a1d..d78a75b2709 100644 --- a/test/unit/app/managers/test_UserManager.py +++ b/test/unit/app/managers/test_UserManager.py @@ -217,9 +217,6 @@ class TestUserManager(BaseTestCase): == ignore_email_capitalization_user ) - def test_register_user_activation(self): - pass - # ============================================================================= class TestUserSerializer(BaseTestCase): diff --git a/test/unit/util/test_custom_templates.py b/test/unit/config/test_custom_templates.py similarity index 96% rename from test/unit/util/test_custom_templates.py rename to test/unit/config/test_custom_templates.py index 45578b024e6..d22dcf4eb3c 100644 --- a/test/unit/util/test_custom_templates.py +++ b/test/unit/config/test_custom_templates.py @@ -1,6 +1,6 @@ """Test custom template configuration and rendering.""" -from galaxy.util.custom_templates import template +from galaxy.config import template TEMPLATE_RELPATH = "mail/activation-email.html" CONTEXT = {"name": "Jane Doe"}