diff --git a/docs/changelog.rst b/docs/changelog.rst index a3cad14..103d87e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -1,6 +1,9 @@ Changelog ========= +1.5.0 (unreleased) +------------------ + 1.4.0 (2023-01-10) ------------------ diff --git a/setup.py b/setup.py index a476204..6ddfee3 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages -version = "1.4.0" +version = "1.5.0" with open("README.rst", "r") as fh: long_description = fh.read() @@ -36,7 +36,7 @@ include_package_data=True, zip_safe=False, install_requires=[ - "senaite.lims>=2.5.0", + "senaite.lims>=2.6.0", ], extras_require={ "test": [ diff --git a/src/senaite/patient/profiles/default/metadata.xml b/src/senaite/patient/profiles/default/metadata.xml index d669797..c85d7a1 100644 --- a/src/senaite/patient/profiles/default/metadata.xml +++ b/src/senaite/patient/profiles/default/metadata.xml @@ -1,6 +1,6 @@ - 1416 + 1500 profile-senaite.lims:default diff --git a/src/senaite/patient/upgrade/configure.zcml b/src/senaite/patient/upgrade/configure.zcml index 7c7e3e2..156c6da 100644 --- a/src/senaite/patient/upgrade/configure.zcml +++ b/src/senaite/patient/upgrade/configure.zcml @@ -3,14 +3,10 @@ xmlns:genericsetup="http://namespaces.zope.org/genericsetup" i18n_domain="senaite.patient"> - + + - + + + diff --git a/src/senaite/patient/upgrade/v01_05_000.py b/src/senaite/patient/upgrade/v01_05_000.py new file mode 100644 index 0000000..a719638 --- /dev/null +++ b/src/senaite/patient/upgrade/v01_05_000.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +# +# This file is part of SENAITE.PATIENT. +# +# SENAITE.PATIENT is free software: you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation, version 2. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 51 +# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# +# Copyright 2020-2024 by it's authors. +# Some rights reserved, see README and LICENSE. + +from senaite.core.upgrade import upgradestep +from senaite.core.upgrade.utils import UpgradeUtils +from senaite.patient import logger +from senaite.patient.config import PRODUCT_NAME + +version = "1.5.0" +profile = "profile-{0}:default".format(PRODUCT_NAME) + + +@upgradestep(PRODUCT_NAME, version) +def upgrade(tool): + portal = tool.aq_inner.aq_parent + setup = portal.portal_setup # noqa + ut = UpgradeUtils(portal) + ver_from = ut.getInstalledVersion(PRODUCT_NAME) + + if ut.isOlderVersion(PRODUCT_NAME, version): + logger.info("Skipping upgrade of {0}: {1} > {2}".format( + PRODUCT_NAME, ver_from, version)) + return True + + logger.info("Upgrading {0}: {1} -> {2}".format(PRODUCT_NAME, ver_from, + version)) + + # -------- ADD YOUR STUFF BELOW -------- + + logger.info("{0} upgraded to version {1}".format(PRODUCT_NAME, version)) + return True diff --git a/src/senaite/patient/upgrade/v01_05_000.zcml b/src/senaite/patient/upgrade/v01_05_000.zcml new file mode 100644 index 0000000..e8eae53 --- /dev/null +++ b/src/senaite/patient/upgrade/v01_05_000.zcml @@ -0,0 +1,12 @@ + + + + +