diff --git a/CHANGES.rst b/CHANGES.rst index a22b259..d1b0534 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -10,6 +10,12 @@ Changes ======= + +Version 3.0.0 (release 2024-12-10) + +- fix: tests, compatibility with sqlalchemy>=2 +- setup: bump major dependencies + Version 2.3.0 (released 2024-12-10) - zip: move fullscreen.js to fix the zip previewer diff --git a/invenio_previewer/__init__.py b/invenio_previewer/__init__.py index 692f71d..4598499 100644 --- a/invenio_previewer/__init__.py +++ b/invenio_previewer/__init__.py @@ -319,6 +319,6 @@ from .ext import InvenioPreviewer from .proxies import current_previewer -__version__ = "2.3.0" +__version__ = "3.0.0" __all__ = ("__version__", "current_previewer", "InvenioPreviewer") diff --git a/run-tests.sh b/run-tests.sh index f43b34f..ec7a85b 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -4,12 +4,24 @@ # This file is part of Invenio. # Copyright (C) 2016-2020 CERN. # Copyright (C) 2020 Northwestern University. -# Copyright (C) 2022 Graz University of Technology. +# Copyright (C) 2022-2024 Graz University of Technology. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. + +# Quit on errors +set -o errexit +# Quit on unbound symbols +set -o nounset +# Always bring down docker services +function cleanup() { + eval "$(docker-services-cli down --env)" +} +trap cleanup EXIT + python -m check_manifest python -m setup extract_messages --output-file /dev/null python -m sphinx.cmd.build -qnNW docs docs/_build/html +eval "$(docker-services-cli up --db ${DB:-postgresql} --env)" python -m pytest diff --git a/setup.cfg b/setup.cfg index 687d77e..3d1a56d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,12 +29,12 @@ python_requires = >=3.7 zip_safe = False install_requires = charset_normalizer>=3.3.2 - invenio-assets>=1.2.7,<4.0.0 - invenio-base>=1.2.10,<2.0.0 - invenio-formatter>=1.1.3,<3.0.0 - invenio-i18n>=1.3.1,<3.0.0 - invenio-pidstore>=1.2.3,<2.0.0 - invenio-records-ui>=1.2.0,<2.0.0 + invenio-assets>=4.0.0,<5.0.0 + invenio-base>=2.0.0,<3.0.0 + invenio-formatter>=3.0.0,<4.0.0 + invenio-i18n>=3.0.0,<4.0.0 + invenio-pidstore>=2.0.0,<3.0.0 + invenio-records-ui>=2.0.0,<3.0.0 mistune>=0.8.1 nbconvert>=7,<8 nbformat>=5.1,<6.0 @@ -42,14 +42,14 @@ install_requires = [options.extras_require] tests = - pytest-black>=0.3.0 - pytest-invenio>=1.4.5,<3.0.0 - invenio-app>=1.0.0,<2.0.0 + pytest-black-ng>=0.4.0 + pytest-invenio>=3.0.0,<4.0.0 + invenio-app>=2.0.0,<3.0.0 invenio-config>=1.0.3 - invenio-db[versioning]>=1.0.14,<2.0.0 - invenio-files-rest>=1.3.2,<3.0.0 + invenio-db[postgresql,versioning]>=2.0.0,<3.0.0 + invenio-files-rest>=3.0.0,<4.0.0 invenio-records-files>=1.2.1 - invenio-theme>=1.3.20,<4.0.0 + invenio-theme>=4.0.0,<5.0.0 mock>=1.3.0 sphinx>=4.5 # Kept for backwards compatibility diff --git a/tests/conftest.py b/tests/conftest.py index e67abf3..f4f4734 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,7 @@ # # This file is part of Invenio. # Copyright (C) 2016-2019 CERN. +# Copyright (C) 2024 Graz University of Technology. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. @@ -141,7 +142,6 @@ def location(db): tmppath = tempfile.mkdtemp() loc = Location(name="testloc", uri=tmppath, default=True) db.session.add(loc) - db.session.commit() yield loc shutil.rmtree(tmppath) @@ -158,7 +158,6 @@ def record(db, location): }, id_=rec_uuid, ) - db.session.commit() return record @@ -180,7 +179,6 @@ def record_with_file(db, record, location): ) ) record.commit() - db.session.commit() return record, testfile