From 4b2f5d216c43a9ba5d448748071ec12222f83fe5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Katja=20Su=CC=88ss?= Date: Sun, 6 Oct 2024 21:13:20 +0200 Subject: [PATCH] Fix refactoring --- .github/workflows/meta.yml | 4 +- src/training/votable/configure.zcml | 42 +++---------------- src/training/votable/dependencies.zcml | 6 +++ src/training/votable/profiles.zcml | 32 ++++++++++++++ src/training/votable/setuphandlers.py | 25 ----------- .../votable/setuphandlers/__init__.py | 11 +++++ src/training/votable/upgrades/__init__.py | 0 src/training/votable/upgrades/configure.zcml | 19 +++++++++ 8 files changed, 75 insertions(+), 64 deletions(-) create mode 100644 src/training/votable/dependencies.zcml create mode 100644 src/training/votable/profiles.zcml delete mode 100644 src/training/votable/setuphandlers.py create mode 100644 src/training/votable/setuphandlers/__init__.py create mode 100644 src/training/votable/upgrades/__init__.py create mode 100644 src/training/votable/upgrades/configure.zcml diff --git a/.github/workflows/meta.yml b/.github/workflows/meta.yml index 96a81a4..751819d 100644 --- a/.github/workflows/meta.yml +++ b/.github/workflows/meta.yml @@ -33,8 +33,8 @@ jobs: py-versions: '["3.12", "3.11", "3.10"]' coverage: uses: plone/meta/.github/workflows/coverage.yml@main - dependencies: - uses: plone/meta/.github/workflows/dependencies.yml@main + # dependencies: + # uses: plone/meta/.github/workflows/dependencies.yml@main release_ready: uses: plone/meta/.github/workflows/release_ready.yml@main diff --git a/src/training/votable/configure.zcml b/src/training/votable/configure.zcml index b04caef..77cda6e 100644 --- a/src/training/votable/configure.zcml +++ b/src/training/votable/configure.zcml @@ -1,51 +1,19 @@ - - - - - - - - - - - - - + + + diff --git a/src/training/votable/dependencies.zcml b/src/training/votable/dependencies.zcml new file mode 100644 index 0000000..b7ee4eb --- /dev/null +++ b/src/training/votable/dependencies.zcml @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/training/votable/profiles.zcml b/src/training/votable/profiles.zcml new file mode 100644 index 0000000..bb658e2 --- /dev/null +++ b/src/training/votable/profiles.zcml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + diff --git a/src/training/votable/setuphandlers.py b/src/training/votable/setuphandlers.py deleted file mode 100644 index 974b665..0000000 --- a/src/training/votable/setuphandlers.py +++ /dev/null @@ -1,25 +0,0 @@ -from Products.CMFPlone.interfaces import INonInstallable -from zope.interface import implementer - - -@implementer(INonInstallable) -class HiddenProfiles: - def getNonInstallableProfiles(self): - """Hide uninstall profile from site-creation and quickinstaller.""" - return [ - "training.votable:uninstall", - ] - - def getNonInstallableProducts(self): - """Hide the upgrades package from site-creation and quickinstaller.""" - return ["training.votable.upgrades"] - - -def post_install(context): - """Post install script""" - # Do something at the end of the installation of this package. - - -def uninstall(context): - """Uninstall script""" - # Do something at the end of the uninstallation of this package. diff --git a/src/training/votable/setuphandlers/__init__.py b/src/training/votable/setuphandlers/__init__.py new file mode 100644 index 0000000..b70a454 --- /dev/null +++ b/src/training/votable/setuphandlers/__init__.py @@ -0,0 +1,11 @@ +from Products.CMFPlone.interfaces import INonInstallable +from zope.interface import implementer + + +@implementer(INonInstallable) +class HiddenProfiles: + def getNonInstallableProfiles(self): + """Hide uninstall profile from site-creation and quickinstaller.""" + return [ + "training.votable:uninstall", + ] diff --git a/src/training/votable/upgrades/__init__.py b/src/training/votable/upgrades/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/training/votable/upgrades/configure.zcml b/src/training/votable/upgrades/configure.zcml new file mode 100644 index 0000000..a3b6b7c --- /dev/null +++ b/src/training/votable/upgrades/configure.zcml @@ -0,0 +1,19 @@ + + + + +