From cc3ff52affa3f9ebff48c76803e2414e5e04cbf5 Mon Sep 17 00:00:00 2001 From: EEA Jenkins <2368628+eea-jenkins@users.noreply.github.com> Date: Mon, 14 Jun 2021 20:40:50 +0300 Subject: [PATCH 1/7] Back to devel --- docs/HISTORY.txt | 3 +++ eea/progressbar/version.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 2454921..8eb1159 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,6 +1,9 @@ Changelog ========= +5.2-dev0 - (unreleased) +--------------------------- + 5.1 - (2021-06-14) --------------------------- * Feature: read fields and behaviors from dexterity content diff --git a/eea/progressbar/version.txt b/eea/progressbar/version.txt index a75b92f..be765ce 100644 --- a/eea/progressbar/version.txt +++ b/eea/progressbar/version.txt @@ -1 +1 @@ -5.1 +5.2-dev0 From 2c27316f477147da410933c15a3a85fe5a159a68 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 11 Mar 2022 16:25:37 +0200 Subject: [PATCH 2/7] Move workflow.progress.xml generic profile export / import to eea.progress.workflow - refs #145772 --- docs/HISTORY.txt | 4 +- eea/progressbar/api/configure.zcml | 4 - eea/progressbar/exportimport/__init__.py | 49 -------- eea/progressbar/exportimport/configure.zcml | 22 ---- eea/progressbar/exportimport/progress.py | 120 -------------------- eea/progressbar/profiles.zcml | 15 --- eea/progressbar/version.txt | 2 +- 7 files changed, 4 insertions(+), 212 deletions(-) delete mode 100644 eea/progressbar/exportimport/progress.py diff --git a/docs/HISTORY.txt b/docs/HISTORY.txt index 8eb1159..85fceb8 100644 --- a/docs/HISTORY.txt +++ b/docs/HISTORY.txt @@ -1,8 +1,10 @@ Changelog ========= -5.2-dev0 - (unreleased) +6.0 - (2022-03-11) --------------------------- +* Change: Move workflow.progress.xml generic profile export / import to eea.progress.workflow + [avoinea refs #145772] 5.1 - (2021-06-14) --------------------------- diff --git a/eea/progressbar/api/configure.zcml b/eea/progressbar/api/configure.zcml index 6e08f80..6c8609c 100644 --- a/eea/progressbar/api/configure.zcml +++ b/eea/progressbar/api/configure.zcml @@ -3,10 +3,6 @@ xmlns:zcml="http://namespaces.zope.org/zcml" i18n_domain="eea"> - - - - diff --git a/eea/progressbar/exportimport/__init__.py b/eea/progressbar/exportimport/__init__.py index 366fe03..7bef375 100644 --- a/eea/progressbar/exportimport/__init__.py +++ b/eea/progressbar/exportimport/__init__.py @@ -4,55 +4,6 @@ from zope.component import queryMultiAdapter from Products.CMFCore.utils import getToolByName from Products.GenericSetup.interfaces import IBody -from eea.progressbar.config import PROGRESSFILE -# -# Workflow progress -# -def importWorkflowProgress(context): - """Import settings.""" - logger = context.getLogger('eea.progressbar') - - body = context.readDataFile(PROGRESSFILE) - if body is None: - logger.info("Nothing to import") - return - - site = context.getSite() - tool = getToolByName(site, 'portal_workflow', None) - if not tool: - logger.info('portal_workflows tool missing') - return - - importer = queryMultiAdapter((tool, context), IBody, name=PROGRESSFILE) - if importer is None: - logger.warning("Import adapter missing.") - return - - # set filename on importer so that syntax errors can be reported properly - subdir = getattr(context, '_profile_path', '') - importer.filename = os.path.join(subdir, PROGRESSFILE) - - importer.body = body - logger.info("Imported.") - -def exportWorkflowProgress(context): - """Export settings.""" - logger = context.getLogger('eea.progressbar') - site = context.getSite() - tool = getToolByName(site, 'portal_workflow') - - if tool is None: - logger.info("Nothing to export") - return - - exporter = queryMultiAdapter((tool, context), IBody, name=PROGRESSFILE) - if exporter is None: - logger.warning("Export adapter missing.") - return - - context.writeDataFile(PROGRESSFILE, - exporter.body, exporter.mime_type) - logger.info("Exported.") # # Progress Tool # diff --git a/eea/progressbar/exportimport/configure.zcml b/eea/progressbar/exportimport/configure.zcml index d86b70e..89fadd5 100644 --- a/eea/progressbar/exportimport/configure.zcml +++ b/eea/progressbar/exportimport/configure.zcml @@ -2,28 +2,6 @@ xmlns="http://namespaces.zope.org/zope" i18n_domain="eea"> - - - - - - - - - - - - - Date: Fri, 11 Mar 2022 16:36:05 +0200 Subject: [PATCH 3/7] [JENKINS] - Fix tests --- eea/progressbar/docs/exportimport.txt | 2 +- eea/progressbar/interfaces.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/eea/progressbar/docs/exportimport.txt b/eea/progressbar/docs/exportimport.txt index f10abe2..90d9f62 100644 --- a/eea/progressbar/docs/exportimport.txt +++ b/eea/progressbar/docs/exportimport.txt @@ -22,7 +22,7 @@ Workflow Exporter / Importer >>> exporter = importer = queryMultiAdapter((wftool, DummySetupEnviron()), ... IBody, name=u'workflows.progress.xml') >>> exporter - + By default there is no progress defined for workflow states diff --git a/eea/progressbar/interfaces.py b/eea/progressbar/interfaces.py index 61a3888..80ecd5c 100644 --- a/eea/progressbar/interfaces.py +++ b/eea/progressbar/interfaces.py @@ -21,14 +21,10 @@ # Storage from eea.progressbar.storage.interfaces import IStorage + # # Marker interfaces # -class IWorkflowTool(Interface): - """ Marker interface for portal_workflow - """ - - class ICollection(IPloneCollection): """ Marker interface for plone.app.collection """ From 150a4a840d2fd03e05ce29d0fbff633284ffa25e Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 11 Mar 2022 17:08:53 +0200 Subject: [PATCH 4/7] Fix dependnecy version --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index c90bf47..4dd800d 100644 --- a/setup.py +++ b/setup.py @@ -40,9 +40,8 @@ 'setuptools', 'eea.icons', 'eea.jquery > 7.6', - # -*- Extra requirements: -*-, 'eea.progress.workflow', - 'eea.progress.editing' + 'eea.progress.editing >= 3.0' ], entry_points=""" # -*- Entry points: -*- From 51efc5efabe5e92fc2a1348704660745beee5c82 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 11 Mar 2022 17:25:36 +0200 Subject: [PATCH 5/7] Revert "Fix dependnecy version" This reverts commit 150a4a840d2fd03e05ce29d0fbff633284ffa25e. --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4dd800d..c90bf47 100644 --- a/setup.py +++ b/setup.py @@ -40,8 +40,9 @@ 'setuptools', 'eea.icons', 'eea.jquery > 7.6', + # -*- Extra requirements: -*-, 'eea.progress.workflow', - 'eea.progress.editing >= 3.0' + 'eea.progress.editing' ], entry_points=""" # -*- Entry points: -*- From 7a505deaf5d86094c352845892cd52c75a6d186a Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 11 Mar 2022 17:28:05 +0200 Subject: [PATCH 6/7] [JENKINS] - Moved Workflow progress to eea.progress.workflow --- eea/progressbar/docs/exportimport.txt | 124 -------------------------- 1 file changed, 124 deletions(-) diff --git a/eea/progressbar/docs/exportimport.txt b/eea/progressbar/docs/exportimport.txt index 90d9f62..1bf6365 100644 --- a/eea/progressbar/docs/exportimport.txt +++ b/eea/progressbar/docs/exportimport.txt @@ -12,130 +12,6 @@ XML Adapters to be used within GenericSetup profiles >>> from Products.CMFCore.utils import getToolByName >>> from eea.progressbar.interfaces import IProgressBarLayer -Workflow Exporter / Importer -============================ - -:: - - >>> portal = layer['portal'] - >>> wftool = getToolByName(portal, 'portal_workflow') - >>> exporter = importer = queryMultiAdapter((wftool, DummySetupEnviron()), - ... IBody, name=u'workflows.progress.xml') - >>> exporter - - - -By default there is no progress defined for workflow states - -:: - - >>> print exporter.body - - ... - - - - ... - -Let's set some progress - -:: - - >>> importer.body = ''' - ... - ... - ... - ... 70 - ... - ... - ... ''' - - >>> print exporter.body - - ... - - - 70 - - - ... - -Override --------- -In order to prevent accidentally imports that can mess up manual customizations, -you have to add *override* attribute within property line. So if you change -progress value within the xml file, nothing should happen until -you add the override attribute. - -:: - - >>> importer.body = ''' - ... - ... - ... - ... 35 - ... - ... - ... ''' - - >>> print exporter.body - - ... - - - 70 - - - ... - -Now, let's add the override attribute. This should be used only for upgrade -steps profiles. Don't use it within the default profile, unless you know -what you're doing - -:: - - >>> importer.body = ''' - ... - ... - ... - ... 35 - ... - ... - ... ''' - - >>> print exporter.body - - ... - - - 35 - - - ... - -Remove ------- -You can also remove the progress attribute - -:: - - >>> importer.body = ''' - ... - ... - ... - ... - ... - ... - ... ''' - - >>> print exporter.body - - ... - - - - ... - Progress Bar Settings including editing progress ================================================ From 59f85c8ced8c4ca6bc8c21e8926d3e54f7c9f5e4 Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Fri, 11 Mar 2022 17:32:39 +0200 Subject: [PATCH 7/7] [JENKINS] - Missing portal --- eea/progressbar/docs/exportimport.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eea/progressbar/docs/exportimport.txt b/eea/progressbar/docs/exportimport.txt index 1bf6365..16368f2 100644 --- a/eea/progressbar/docs/exportimport.txt +++ b/eea/progressbar/docs/exportimport.txt @@ -11,7 +11,7 @@ XML Adapters to be used within GenericSetup profiles >>> from Products.GenericSetup.testing import DummySetupEnviron >>> from Products.CMFCore.utils import getToolByName >>> from eea.progressbar.interfaces import IProgressBarLayer - + >>> portal = layer['portal'] Progress Bar Settings including editing progress ================================================