-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e6db48
commit c2df14c
Showing
7 changed files
with
137 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import logging | ||
import transaction | ||
import plone.api as api | ||
|
||
from Products.CMFCore.utils import getToolByName | ||
from emrt.necd.content.upgrades import portal_workflow as upw | ||
|
||
|
||
logger = logging.getLogger(__name__) | ||
|
||
|
||
IDX = "reply_comments_by_mse" | ||
|
||
|
||
def upgrade(_): | ||
portal = api.portal.get() | ||
rf = ["2021", "2021-projection"] | ||
rf = ["test-reviewfolder"] | ||
for folder in [portal[f] for f in rf]: | ||
for idx, obj in enumerate(folder.objectValues(), start=1): | ||
if obj.portal_type == "Observation": | ||
if idx % 1 == 0: | ||
transaction.savepoint(optimistic=True) | ||
logger.info("[%s] Reindexing %s...", idx, obj.absolute_url(1)) | ||
obj.reindexObject( | ||
idxs=[ | ||
"observation_already_replied", | ||
"observation_sent_to_msc", | ||
"observation_sent_to_mse", | ||
] | ||
) | ||
transaction.commit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,60 @@ | ||
from setuptools import setup, find_packages | ||
import os | ||
|
||
VERSION = '2.5.23' | ||
from setuptools import find_packages | ||
from setuptools import setup | ||
|
||
VERSION = "2.5.24" | ||
|
||
|
||
setup( | ||
name='emrt.necd.content', | ||
name="emrt.necd.content", | ||
version=VERSION, | ||
description="Content-types for EMRT-NECD Review Tool", | ||
long_description=( | ||
open("README.txt").read() + "\n" + | ||
open(os.path.join("docs", "HISTORY.txt")).read() | ||
open("README.txt").read() | ||
+ "\n" | ||
+ open(os.path.join("docs", "HISTORY.txt")).read() | ||
), | ||
# Get more strings from | ||
# http://pypi.python.org/pypi?%3Aaction=list_classifiers | ||
classifiers=[ | ||
"Framework :: Plone", | ||
"Programming Language :: Python", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
], | ||
keywords='', | ||
author='Mikel Larreategi', | ||
author_email='mlarreategi@codesyntax.com', | ||
url='https://github.com/eea/emrt.necd.content/', | ||
license='GPL', | ||
packages=find_packages(exclude=['ez_setup']), | ||
namespace_packages=['emrt', 'emrt.necd'], | ||
], | ||
keywords="", | ||
author="Mikel Larreategi", | ||
author_email="mlarreategi@codesyntax.com", | ||
url="https://github.com/eea/emrt.necd.content/", | ||
license="GPL", | ||
packages=find_packages(exclude=["ez_setup"]), | ||
namespace_packages=["emrt", "emrt.necd"], | ||
include_package_data=True, | ||
zip_safe=False, | ||
install_requires=[ | ||
'setuptools', | ||
'futures', | ||
'plone.app.dexterity [relations]', | ||
'plone.namedfile [blobs]', | ||
'collective.z3cform.datagridfield', | ||
'plone.api', | ||
'Products.ATVocabularyManager', | ||
'plone.app.versioningbehavior', | ||
'plone.app.workflowmanager', | ||
'plone.app.ldap', | ||
'cs.htmlmailer', | ||
'collective.deletepermission', | ||
'tablib', | ||
'python-docx==0.8.5', | ||
'zc.dict', | ||
'collective.monkeypatcher', | ||
'openpyxl', | ||
'five.pt', | ||
'simplejson', | ||
"setuptools", | ||
"futures", | ||
"plone.app.dexterity [relations]", | ||
"plone.namedfile [blobs]", | ||
"collective.z3cform.datagridfield", | ||
"plone.api", | ||
"Products.ATVocabularyManager", | ||
"plone.app.versioningbehavior", | ||
"plone.app.workflowmanager", | ||
"plone.app.ldap", | ||
"cs.htmlmailer", | ||
"collective.deletepermission", | ||
"tablib", | ||
"python-docx==0.8.5", | ||
"zc.dict", | ||
"collective.monkeypatcher", | ||
"openpyxl", | ||
"five.pt", | ||
"simplejson", | ||
], | ||
entry_points=""" | ||
# -*- Entry points: -*- | ||
[z3c.autoinclude.plugin] | ||
target = plone | ||
""", | ||
) | ||
) |