From 9825754df0d2a43996a6bfd57717594dee6b88f7 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Sat, 30 Nov 2024 20:45:18 +0100 Subject: [PATCH 1/3] setup: pin dependencies --- setup.cfg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/setup.cfg b/setup.cfg index aa3751f..c83c062 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ # This file is part of Invenio. # Copyright (C) 2015-2022 CERN. # Copyright (C) 2021 TU Wien. -# Copyright (C) 2022-2023 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. @@ -28,15 +28,15 @@ packages = find: python_requires = >=3.7 zip_safe = False install_requires = - invenio-accounts>=5.0.0 + invenio-accounts>=5.0.0,<6.0.0 invenio-i18n>=2.0.0,<3.0.0 [options.extras_require] tests = pytest-black-ng>=0.4.0 - pytest-invenio>=1.4.7 - invenio-db[mysql,postgresql,versioning]>=1.0.14 - invenio-app>=1.4.0 + pytest-invenio>=1.4.7,<3.0.0 + invenio-db[mysql,postgresql,versioning]>=1.0.14,<2.0.0 + invenio-app>=1.4.0,<2.0.0 sphinx>=4.5 admin = # empty for backward compatibility From 36848df9f463fe617e92ce63b73e917f974d77e7 Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Sat, 30 Nov 2024 20:47:21 +0100 Subject: [PATCH 2/3] setup: change to reusable workflows --- .github/workflows/pypi-publish.yml | 13 ++++++++ .github/workflows/pypi-release.yml | 33 -------------------- .github/workflows/tests.yml | 48 ++---------------------------- 3 files changed, 15 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/pypi-publish.yml delete mode 100644 .github/workflows/pypi-release.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..68d519f --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,13 @@ +name: Publish + +on: + push: + tags: + - v* + +jobs: + Publish: + uses: inveniosoftware/workflows/.github/workflows/pypi-publish.yml@master + secrets: inherit + with: + babel-compile-catalog: true diff --git a/.github/workflows/pypi-release.yml b/.github/workflows/pypi-release.yml deleted file mode 100644 index 6f16cea..0000000 --- a/.github/workflows/pypi-release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Publish - -on: - push: - tags: - - v* - -jobs: - Publish: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel babel - - name: Build package - # Remove `compile_catalog` if the package has no translations. - run: | - python setup.py compile_catalog sdist bdist_wheel - - name: Publish on PyPI - uses: pypa/gh-action-pypi-publish@v1.3.1 - with: - user: __token__ - # The token is provided by the inveniosoftware organization - password: ${{ secrets.pypi_token }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bef1dbd..c2ec5ba 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ # # This file is part of Invenio. # Copyright (C) 2020 CERN. -# 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. @@ -26,48 +26,4 @@ on: jobs: Tests: - runs-on: ubuntu-20.04 - strategy: - matrix: - python-version: [3.8, 3.9] - requirements-level: [pypi] - db-service: [postgresql12, postgresql13, postgresql14, mysql8] - - env: - DB: ${{ matrix.DB }} - EXTRAS: "tests" - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Generate dependencies - run: | - pip install wheel requirements-builder - requirements-builder -e "$EXTRAS" ${{ matrix.requirements-file }} --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt - - - name: Cache pip - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }} - - - name: Install dependencies - run: | - pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt -c constraints-${{matrix.requirements-level}}.txt - pip install .[$EXTRAS] - pip freeze - docker --version - docker-compose --version - - - name: Run translations test - run: ./run-i18n-tests.sh - - - name: Run tests - run: | - ./run-tests.sh + uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master From 0ff8c4499c50d88a0eceb3e51fd8901b541466af Mon Sep 17 00:00:00 2001 From: Christoph Ladurner Date: Sat, 30 Nov 2024 20:48:56 +0100 Subject: [PATCH 3/3] release: v3.0.1 --- CHANGES.rst | 8 ++++++++ invenio_userprofiles/__init__.py | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8d4f924..0a46231 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,7 @@ .. This file is part of Invenio. Copyright (C) 2015-2023 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. @@ -8,6 +9,13 @@ Changes ======= +Version 3.0.1 (release 2024-11-30) + +- setup: change to reusable workflows +- setup: pin dependencies +- i18n:push translations +- tests: check existing username case-insensitive + Version 3.0.0 (released 2024-03-22) - breaking change: remove breadcrumbs usage diff --git a/invenio_userprofiles/__init__.py b/invenio_userprofiles/__init__.py index 823c17d..12ebbbd 100644 --- a/invenio_userprofiles/__init__.py +++ b/invenio_userprofiles/__init__.py @@ -2,6 +2,7 @@ # # This file is part of Invenio. # Copyright (C) 2015-2018 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. @@ -30,7 +31,7 @@ from .ext import InvenioUserProfiles from .models import UserProfile, UserProfileProxy -__version__ = "3.0.0" +__version__ = "3.0.1" __all__ = ( "__version__",