Skip to content

Commit

Permalink
Bumped versions and added upgrade hanlder for 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonski committed Oct 4, 2022
1 parent 400f0dc commit f622058
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 13 deletions.
6 changes: 6 additions & 0 deletions docs/Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2.4.0 (unreleased)
------------------

- no changes yet


2.3.0 (2022-10-04)
------------------

Expand Down
16 changes: 8 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup, find_packages

version = "2.3.0"
version = "2.4.0"

with open("docs/About.rst", "r") as fh:
long_description = fh.read()
Expand Down Expand Up @@ -40,13 +40,13 @@
include_package_data=True,
zip_safe=False,
install_requires=[
"Plone==5.2.9",
"senaite.core==2.3.0",
"senaite.app.listing==2.3.0",
"senaite.app.spotlight==2.3.0",
"senaite.app.supermodel==2.3.0",
"senaite.impress==2.3.0",
"senaite.jsonapi==2.3.0",
"Plone>=5.2.9",
"senaite.core>=2.3.0",
"senaite.app.listing>=2.3.0",
"senaite.app.spotlight>=2.3.0",
"senaite.app.supermodel>=2.3.0",
"senaite.impress>=2.3.0",
"senaite.jsonapi>=2.3.0",
"setuptools",
],
extras_require={
Expand Down
2 changes: 1 addition & 1 deletion src/senaite/lims/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<metadata>
<version>2300</version>
<version>2400</version>
<dependencies>
<dependency>profile-senaite.lims:default</dependency>
<dependency>profile-senaite.impress:default</dependency>
Expand Down
8 changes: 8 additions & 0 deletions src/senaite/lims/upgrades/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="senaite.lims">

<genericsetup:upgradeStep
title="Upgrade SENAITE LIMS"
description="Version 2.4.0"
source="2300"
destination="2400"
handler="senaite.lims.upgrades.handlers.to_2400"
profile="senaite.lims:default" />

<genericsetup:upgradeStep
title="Upgrade SENAITE LIMS"
description="Version 2.3.0"
Expand Down
16 changes: 12 additions & 4 deletions src/senaite/lims/upgrades/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,23 @@
PROFILE_ID = "profile-senaite.lims:default"


def to_2400(portal_setup):
"""Update to version 2.4.0
:param portal_setup: The portal_setup tool
"""
logger.info("Run all import steps from SENAITE LIMS ...")
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa
portal_setup.runAllImportStepsFromProfile(PROFILE_ID)
logger.info("Run all import steps from SENAITE LIMS [DONE]")


def to_2300(portal_setup):
"""Update to version 2.3.0
:param portal_setup: The portal_setup tool
"""

logger.info("Run all import steps from SENAITE LIMS ...")
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa
Expand All @@ -41,7 +52,6 @@ def to_2200(portal_setup):
:param portal_setup: The portal_setup tool
"""

logger.info("Run all import steps from SENAITE LIMS ...")
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa
Expand All @@ -54,7 +64,6 @@ def to_2100(portal_setup):
:param portal_setup: The portal_setup tool
"""

logger.info("Run all import steps from SENAITE LIMS ...")
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa
Expand All @@ -67,7 +76,6 @@ def to_latest(portal_setup):
:param portal_setup: The portal_setup tool
"""

logger.info("Run all import steps from SENAITE LIMS ...")
context = portal_setup._getImportContext(PROFILE_ID)
portal = context.getSite() # noqa
Expand Down

0 comments on commit f622058

Please sign in to comment.