From 11bfc1ce644172fae181125a8187f14269997451 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 10 Apr 2024 17:06:39 +0200 Subject: [PATCH 1/6] install new dependency --- .gitignore | 1 + base.cfg | 8 +++++++- setup.py | 1 + src/redturtle/volto/profiles/default/metadata.xml | 1 + src/redturtle/volto/upgrades.py | 9 +++++++++ src/redturtle/volto/upgrades.zcml | 8 ++++++++ 6 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e33788dd..309426ad 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ coverage.json *.py? *.swp # dirs +__pycache__ bin/ buildout-cache/ develop-eggs/ diff --git a/base.cfg b/base.cfg index 40609a00..ea3aacb0 100644 --- a/base.cfg +++ b/base.cfg @@ -17,8 +17,11 @@ parts = omelette robot plone-helper-scripts -develop = . +develop = . +sources-dir = extras +auto-checkout = * +always-checkout = force [instance] recipe = plone.recipe.zope2instance @@ -117,3 +120,6 @@ scripts = # Don't use a released version of redturtle.volto redturtle.volto = setuptools = + +[sources] +collective.volto.sitesettings = https://github.com/collective/collective.volto.sitesettings.git pushurl=git@github.com:collective/collective.volto.sitesettings.git diff --git a/setup.py b/setup.py index 505eaa27..8591d351 100644 --- a/setup.py +++ b/setup.py @@ -62,6 +62,7 @@ "plone.volto>=4.0.0", "plone.restapi>=9.6.0", "Products.PortalTransforms>=3.2.0", + "collective.volto.sitesettings", ], extras_require={ "advancedquery": [ diff --git a/src/redturtle/volto/profiles/default/metadata.xml b/src/redturtle/volto/profiles/default/metadata.xml index a10e361f..99e29cd0 100644 --- a/src/redturtle/volto/profiles/default/metadata.xml +++ b/src/redturtle/volto/profiles/default/metadata.xml @@ -6,5 +6,6 @@ profile-plone.app.caching:with-caching-proxy profile-collective.volto.gdprcookie:default profile-kitconcept.seo:default + profile-collective.volto.sitesettings:default diff --git a/src/redturtle/volto/upgrades.py b/src/redturtle/volto/upgrades.py index 796ab3c0..97687ce0 100644 --- a/src/redturtle/volto/upgrades.py +++ b/src/redturtle/volto/upgrades.py @@ -9,7 +9,10 @@ from uuid import uuid4 from zope.schema import getFields +<<<<<<< Updated upstream +======= +>>>>>>> Stashed changes try: from plone.base.utils import get_installer except Exception: @@ -508,3 +511,9 @@ def to_4305(context): installer.uninstall_product(product_id="collective.volto.cookieconsent") if not installer.is_product_installed("collective.volto.gdprcookie"): installer.install_(product_id="collective.volto.gdprcookie") + +def to_4306(context): + portal = api.portal.get() + installer = get_installer(portal, portal.REQUEST) + if not installer.is_product_installed("collective.volto.sitesettings"): + installer.install_(product_id="collective.volto.sitesettings") diff --git a/src/redturtle/volto/upgrades.zcml b/src/redturtle/volto/upgrades.zcml index 8e8b91ec..b71bc859 100644 --- a/src/redturtle/volto/upgrades.zcml +++ b/src/redturtle/volto/upgrades.zcml @@ -232,4 +232,12 @@ destination="4305" handler=".upgrades.to_4305" /> + From a9bb8f3231dae33c4131d563d01c06feda8eba05 Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 10 Apr 2024 17:07:21 +0200 Subject: [PATCH 2/6] install new dependency --- src/redturtle/volto/testing.py | 3 +++ src/redturtle/volto/upgrades.py | 5 +---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/redturtle/volto/testing.py b/src/redturtle/volto/testing.py index b1a227fb..c7719e83 100644 --- a/src/redturtle/volto/testing.py +++ b/src/redturtle/volto/testing.py @@ -9,6 +9,7 @@ from plone.testing import z2 import collective.volto.gdprcookie +import collective.volto.sitesettings import kitconcept.seo import plone.app.caching import plone.restapi @@ -24,6 +25,7 @@ def setUpZope(self, app, configurationContext): # The z3c.autoinclude feature is disabled in the Plone fixture base # layer. self.loadZCML(package=collective.volto.gdprcookie) + self.loadZCML(package=collective.volto.sitesettings) self.loadZCML(package=plone.restapi) self.loadZCML(package=redturtle.volto) self.loadZCML(package=plone.volto) @@ -67,6 +69,7 @@ def setUpZope(self, app, configurationContext): super(RedturtleVoltoRestApiLayer, self).setUpZope(app, configurationContext) self.loadZCML(package=collective.volto.gdprcookie) + self.loadZCML(package=collective.volto.sitesettings) self.loadZCML(package=plone.restapi) self.loadZCML(package=plone.volto) self.loadZCML(package=redturtle.volto) diff --git a/src/redturtle/volto/upgrades.py b/src/redturtle/volto/upgrades.py index 97687ce0..6ffa1be5 100644 --- a/src/redturtle/volto/upgrades.py +++ b/src/redturtle/volto/upgrades.py @@ -9,10 +9,6 @@ from uuid import uuid4 from zope.schema import getFields -<<<<<<< Updated upstream - -======= ->>>>>>> Stashed changes try: from plone.base.utils import get_installer except Exception: @@ -512,6 +508,7 @@ def to_4305(context): if not installer.is_product_installed("collective.volto.gdprcookie"): installer.install_(product_id="collective.volto.gdprcookie") + def to_4306(context): portal = api.portal.get() installer = get_installer(portal, portal.REQUEST) From 59a76237486df45b0f2f7674d111c3079d4d5e4b Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 10 Apr 2024 17:12:10 +0200 Subject: [PATCH 3/6] fix version --- src/redturtle/volto/profiles/default/metadata.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/redturtle/volto/profiles/default/metadata.xml b/src/redturtle/volto/profiles/default/metadata.xml index 99e29cd0..f81f9793 100644 --- a/src/redturtle/volto/profiles/default/metadata.xml +++ b/src/redturtle/volto/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 4305 + 4306 profile-plone.volto:default profile-plone.app.caching:with-caching-proxy From 75046a71d8d94d86e490cafd22f8d92e5509a7bf Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 19 Jun 2024 14:47:38 +0200 Subject: [PATCH 4/6] code cleanup --- base.cfg | 2 +- src/redturtle/volto/upgrades.py | 1 + src/redturtle/volto/upgrades.zcml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/base.cfg b/base.cfg index ea3aacb0..488264c1 100644 --- a/base.cfg +++ b/base.cfg @@ -122,4 +122,4 @@ redturtle.volto = setuptools = [sources] -collective.volto.sitesettings = https://github.com/collective/collective.volto.sitesettings.git pushurl=git@github.com:collective/collective.volto.sitesettings.git +collective.volto.sitesettings = git https://github.com/collective/collective.volto.sitesettings.git pushurl=git@github.com:collective/collective.volto.sitesettings.git diff --git a/src/redturtle/volto/upgrades.py b/src/redturtle/volto/upgrades.py index 7edff3cd..dcf37cc6 100644 --- a/src/redturtle/volto/upgrades.py +++ b/src/redturtle/volto/upgrades.py @@ -9,6 +9,7 @@ from uuid import uuid4 from zope.schema import getFields + try: from plone.base.utils import get_installer except Exception: diff --git a/src/redturtle/volto/upgrades.zcml b/src/redturtle/volto/upgrades.zcml index b71bc859..1264a854 100644 --- a/src/redturtle/volto/upgrades.zcml +++ b/src/redturtle/volto/upgrades.zcml @@ -232,7 +232,7 @@ destination="4305" handler=".upgrades.to_4305" /> - Date: Wed, 10 Jul 2024 14:47:29 +0200 Subject: [PATCH 5/6] do not use development packages --- .gitignore | 1 + base.cfg | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c1eb2bed..9e6eb500 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ bin/ buildout-cache/ develop-eggs/ eggs/ +extras/ htmlcov/ include/ lib/ diff --git a/base.cfg b/base.cfg index 488264c1..b7676a32 100644 --- a/base.cfg +++ b/base.cfg @@ -122,4 +122,3 @@ redturtle.volto = setuptools = [sources] -collective.volto.sitesettings = git https://github.com/collective/collective.volto.sitesettings.git pushurl=git@github.com:collective/collective.volto.sitesettings.git From 3950b2e15ef744d6f546ef2d7874ab302a7a47bd Mon Sep 17 00:00:00 2001 From: Andrea Cecchi Date: Wed, 10 Jul 2024 15:25:29 +0200 Subject: [PATCH 6/6] fix docutils problem --- test_plone60.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/test_plone60.cfg b/test_plone60.cfg index d4b58c6c..ca0dc12d 100644 --- a/test_plone60.cfg +++ b/test_plone60.cfg @@ -6,6 +6,7 @@ extends = base.cfg [versions] +docutils = # Added by buildout at 2023-03-10 11:55:21.122842 Products.AdvancedQuery = 4.2.1