From 83446ceeb55b6fbcc3efc5a6451b1c7eb33de6a4 Mon Sep 17 00:00:00 2001 From: enitu Date: Wed, 19 Mar 2025 15:51:23 +0100 Subject: [PATCH 01/12] test action Signed-off-by: enitu --- .github/workflows/docker.yml | 27 +++++++++++++++++ .github/workflows/update-uv-lock.yml | 43 ++++++++++++++++++++++++++++ .gitignore | 2 +- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/update-uv-lock.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1bb3bc5..696e468 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,6 +24,33 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Install uv package + run: | + pip install uv + + - name: Install invenio-override + run: | + mkdir .venv + uv venv .venv + source .venv/bin/activate + uv pip install git+https://github.com/sharedRDM/invenio-override@fix-menu-distance + uv lock + deactivate + rm -rf .venv + + - name: Commit and push updated uv.lock + run: | + git add uv.lock + git commit -m "Update uv.lock due to package update" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Convert repository name to lowercase run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV diff --git a/.github/workflows/update-uv-lock.yml b/.github/workflows/update-uv-lock.yml new file mode 100644 index 0000000..3010b1b --- /dev/null +++ b/.github/workflows/update-uv-lock.yml @@ -0,0 +1,43 @@ +name: Update uv.lock + +on: + push: + branches: + - cd-uv-lock + +jobs: + update-uv-lock: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: ${{ github.ref }} + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.12' + + - name: Install uv package + run: | + pip install uv + + - name: Install invenio-override + run: | + mkdir .venv + uv venv .venv + source .venv/bin/activate + uv pip install git+https://github.com/sharedRDM/invenio-override@fix-menu-distance + uv lock + deactivate + rm -rf .venv + + - name: Commit and push updated uv.lock + run: | + git add uv.lock + git commit -m "Update uv.lock due to package update" + git push + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index d97764a..48286f1 100644 --- a/.gitignore +++ b/.gitignore @@ -72,4 +72,4 @@ data/default/* data/.minio.sys # Celery -celerybeat-schedule.db +celerybeat-schedule* From a12548297664304d329dd53cb035f35f0571b949 Mon Sep 17 00:00:00 2001 From: enitu Date: Wed, 19 Mar 2025 15:56:16 +0100 Subject: [PATCH 02/12] fix commit Signed-off-by: enitu --- .github/workflows/docker.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 696e468..f624690 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -44,13 +44,8 @@ jobs: rm -rf .venv - name: Commit and push updated uv.lock - run: | - git add uv.lock - git commit -m "Update uv.lock due to package update" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + uses: stefanzweifel/git-auto-commit-action@v5 + - name: Convert repository name to lowercase run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV From 1d44656ef63f3ce8ec1e875a1c3c6fe03f95a365 Mon Sep 17 00:00:00 2001 From: enitu Date: Wed, 19 Mar 2025 16:00:35 +0100 Subject: [PATCH 03/12] fix commit Signed-off-by: enitu --- .github/workflows/update-uv-lock.yml | 43 ---------------------------- 1 file changed, 43 deletions(-) delete mode 100644 .github/workflows/update-uv-lock.yml diff --git a/.github/workflows/update-uv-lock.yml b/.github/workflows/update-uv-lock.yml deleted file mode 100644 index 3010b1b..0000000 --- a/.github/workflows/update-uv-lock.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Update uv.lock - -on: - push: - branches: - - cd-uv-lock - -jobs: - update-uv-lock: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - with: - ref: ${{ github.ref }} - - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.12' - - - name: Install uv package - run: | - pip install uv - - - name: Install invenio-override - run: | - mkdir .venv - uv venv .venv - source .venv/bin/activate - uv pip install git+https://github.com/sharedRDM/invenio-override@fix-menu-distance - uv lock - deactivate - rm -rf .venv - - - name: Commit and push updated uv.lock - run: | - git add uv.lock - git commit -m "Update uv.lock due to package update" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From be4aec55a95bb24cbd23c6da0f139feceb38c4b7 Mon Sep 17 00:00:00 2001 From: enitu Date: Wed, 19 Mar 2025 16:08:26 +0100 Subject: [PATCH 04/12] fix commit Signed-off-by: enitu --- .github/workflows/docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f624690..359a221 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,7 +17,7 @@ jobs: build-and-push-mug: runs-on: ubuntu-20.04 permissions: - contents: read + contents: write packages: write steps: @@ -45,7 +45,7 @@ jobs: - name: Commit and push updated uv.lock uses: stefanzweifel/git-auto-commit-action@v5 - + - name: Convert repository name to lowercase run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV From fe9fbe85ca03fc5c838951ef7d1566865328ac7a Mon Sep 17 00:00:00 2001 From: edivalentinitu <201568957+edivalentinitu@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:09:34 +0000 Subject: [PATCH 05/12] Apply automatic changes --- uv.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/uv.lock b/uv.lock index 194c10d..b0989d4 100644 --- a/uv.lock +++ b/uv.lock @@ -1,4 +1,5 @@ version = 1 +revision = 1 requires-python = ">=3.12" [[package]] @@ -340,7 +341,7 @@ name = "click" version = "8.1.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } wheels = [ @@ -1211,7 +1212,6 @@ sdist = { url = "https://files.pythonhosted.org/packages/cd/55/09840b5789d7bda97 [[package]] name = "instance" -version = "0.0.0" source = { virtual = "." } dependencies = [ { name = "invenio-app-rdm", extra = ["opensearch2"] }, @@ -2663,7 +2663,7 @@ version = "1.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, { name = "ghp-import" }, { name = "jinja2" }, { name = "markdown" }, @@ -3746,7 +3746,7 @@ name = "tqdm" version = "4.67.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "platform_system == 'Windows'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737 } wheels = [ @@ -3875,7 +3875,7 @@ name = "tzlocal" version = "5.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "tzdata", marker = "platform_system == 'Windows'" }, + { name = "tzdata", marker = "sys_platform == 'win32'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd", size = 30761 } wheels = [ From 2defa7d97daa79e83ffd85a9ff4b411a36855ba8 Mon Sep 17 00:00:00 2001 From: enitu Date: Wed, 19 Mar 2025 16:12:36 +0100 Subject: [PATCH 06/12] test with changed toml Signed-off-by: enitu --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 53e70ba..5e0e90c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ py-modules = [] [tool.uv.sources] -invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "main" } +invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "fix-menu-distance" } #invenio-override = { path = "/Users/lpandath/Documents/work/rdm/invenio/invenio-instances/invenio-version-9/invenio-override", editable=true } #invenio-cli = { git = "https://github.com/utnapischtim/invenio-cli", branch = "move-to-uv-instead-of-pip" } #invenio-theme-tugraz = { git = "https://github.com/tu-graz-library/invenio-theme-tugraz", branch = "master" } \ No newline at end of file From 48a3e5195329cb2e224bf61afdd31121ad6def5b Mon Sep 17 00:00:00 2001 From: edivalentinitu <201568957+edivalentinitu@users.noreply.github.com> Date: Wed, 19 Mar 2025 15:15:20 +0000 Subject: [PATCH 07/12] Apply automatic changes --- uv.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uv.lock b/uv.lock index b0989d4..1f5bf0b 100644 --- a/uv.lock +++ b/uv.lock @@ -1226,7 +1226,7 @@ dependencies = [ requires-dist = [ { name = "invenio-app-rdm", extras = ["opensearch2"], specifier = "~=12.0.0" }, { name = "invenio-logging", extras = ["sentry-sdk"], specifier = "~=2.0" }, - { name = "invenio-override", git = "https://github.com/sharedRDM/invenio-override?branch=main" }, + { name = "invenio-override", git = "https://github.com/sharedRDM/invenio-override?branch=fix-menu-distance" }, { name = "uwsgi", specifier = ">=2.0" }, { name = "uwsgi-tools", specifier = ">=1.1.1" }, { name = "uwsgitop", specifier = ">=0.11" }, @@ -1767,7 +1767,7 @@ wheels = [ [[package]] name = "invenio-override" version = "0.0.4" -source = { git = "https://github.com/sharedRDM/invenio-override?branch=main#c1757f85ce7a8b1582a49e0cd16c65a59a93b832" } +source = { git = "https://github.com/sharedRDM/invenio-override?branch=fix-menu-distance#aa5bbf0ae1539acb8684e0c266e5ed22955070ca" } dependencies = [ { name = "invenio-app-rdm", extra = ["opensearch2"] }, { name = "invenio-assets" }, From eace34c960e8afc2cccc8a9a436fe3e86cd9e8ed Mon Sep 17 00:00:00 2001 From: enitu Date: Thu, 20 Mar 2025 09:12:25 +0100 Subject: [PATCH 08/12] install main branch from invenio-override Signed-off-by: enitu --- .github/workflows/docker.yml | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 359a221..3672ade 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,7 +38,7 @@ jobs: mkdir .venv uv venv .venv source .venv/bin/activate - uv pip install git+https://github.com/sharedRDM/invenio-override@fix-menu-distance + uv pip install git+https://github.com/sharedRDM/invenio-override@main uv lock deactivate rm -rf .venv diff --git a/pyproject.toml b/pyproject.toml index 5e0e90c..53e70ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ py-modules = [] [tool.uv.sources] -invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "fix-menu-distance" } +invenio-override = { git = "https://github.com/sharedRDM/invenio-override", branch = "main" } #invenio-override = { path = "/Users/lpandath/Documents/work/rdm/invenio/invenio-instances/invenio-version-9/invenio-override", editable=true } #invenio-cli = { git = "https://github.com/utnapischtim/invenio-cli", branch = "move-to-uv-instead-of-pip" } #invenio-theme-tugraz = { git = "https://github.com/tu-graz-library/invenio-theme-tugraz", branch = "master" } \ No newline at end of file From 372ec101a549f8167c153be01710349a314adaeb Mon Sep 17 00:00:00 2001 From: edivalentinitu <201568957+edivalentinitu@users.noreply.github.com> Date: Thu, 20 Mar 2025 08:15:28 +0000 Subject: [PATCH 09/12] Apply automatic changes --- uv.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uv.lock b/uv.lock index 1f5bf0b..5c00826 100644 --- a/uv.lock +++ b/uv.lock @@ -1226,7 +1226,7 @@ dependencies = [ requires-dist = [ { name = "invenio-app-rdm", extras = ["opensearch2"], specifier = "~=12.0.0" }, { name = "invenio-logging", extras = ["sentry-sdk"], specifier = "~=2.0" }, - { name = "invenio-override", git = "https://github.com/sharedRDM/invenio-override?branch=fix-menu-distance" }, + { name = "invenio-override", git = "https://github.com/sharedRDM/invenio-override?branch=main" }, { name = "uwsgi", specifier = ">=2.0" }, { name = "uwsgi-tools", specifier = ">=1.1.1" }, { name = "uwsgitop", specifier = ">=0.11" }, @@ -1767,7 +1767,7 @@ wheels = [ [[package]] name = "invenio-override" version = "0.0.4" -source = { git = "https://github.com/sharedRDM/invenio-override?branch=fix-menu-distance#aa5bbf0ae1539acb8684e0c266e5ed22955070ca" } +source = { git = "https://github.com/sharedRDM/invenio-override?branch=main#09568d0ca49366eeaca2b43927575a35afc364f2" } dependencies = [ { name = "invenio-app-rdm", extra = ["opensearch2"] }, { name = "invenio-assets" }, From e0f4f9dd82620eaa70d38e44be1363b8cb854758 Mon Sep 17 00:00:00 2001 From: enitu Date: Thu, 20 Mar 2025 09:35:17 +0100 Subject: [PATCH 10/12] remove commit step Signed-off-by: enitu --- .github/workflows/docker.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3672ade..c1ca969 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -43,9 +43,6 @@ jobs: deactivate rm -rf .venv - - name: Commit and push updated uv.lock - uses: stefanzweifel/git-auto-commit-action@v5 - - name: Convert repository name to lowercase run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV From d587ca91846df2b5465c25048a804aaa32b2e476 Mon Sep 17 00:00:00 2001 From: enitu Date: Thu, 20 Mar 2025 09:38:08 +0100 Subject: [PATCH 11/12] revert uv lock Signed-off-by: enitu --- uv.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uv.lock b/uv.lock index 5c00826..194c10d 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,4 @@ version = 1 -revision = 1 requires-python = ">=3.12" [[package]] @@ -341,7 +340,7 @@ name = "click" version = "8.1.8" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "colorama", marker = "platform_system == 'Windows'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 } wheels = [ @@ -1212,6 +1211,7 @@ sdist = { url = "https://files.pythonhosted.org/packages/cd/55/09840b5789d7bda97 [[package]] name = "instance" +version = "0.0.0" source = { virtual = "." } dependencies = [ { name = "invenio-app-rdm", extra = ["opensearch2"] }, @@ -1767,7 +1767,7 @@ wheels = [ [[package]] name = "invenio-override" version = "0.0.4" -source = { git = "https://github.com/sharedRDM/invenio-override?branch=main#09568d0ca49366eeaca2b43927575a35afc364f2" } +source = { git = "https://github.com/sharedRDM/invenio-override?branch=main#c1757f85ce7a8b1582a49e0cd16c65a59a93b832" } dependencies = [ { name = "invenio-app-rdm", extra = ["opensearch2"] }, { name = "invenio-assets" }, @@ -2663,7 +2663,7 @@ version = "1.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, - { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "colorama", marker = "platform_system == 'Windows'" }, { name = "ghp-import" }, { name = "jinja2" }, { name = "markdown" }, @@ -3746,7 +3746,7 @@ name = "tqdm" version = "4.67.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "colorama", marker = "platform_system == 'Windows'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737 } wheels = [ @@ -3875,7 +3875,7 @@ name = "tzlocal" version = "5.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "tzdata", marker = "sys_platform == 'win32'" }, + { name = "tzdata", marker = "platform_system == 'Windows'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/8b/2e/c14812d3d4d9cd1773c6be938f89e5735a1f11a9f184ac3639b93cef35d5/tzlocal-5.3.1.tar.gz", hash = "sha256:cceffc7edecefea1f595541dbd6e990cb1ea3d19bf01b2809f362a03dd7921fd", size = 30761 } wheels = [ From da6017d238e9b13c2b8af53cdd4fbeeb418a35ae Mon Sep 17 00:00:00 2001 From: enitu Date: Thu, 20 Mar 2025 09:40:53 +0100 Subject: [PATCH 12/12] convert write to read contents permissions Signed-off-by: enitu --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c1ca969..b14f45b 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -17,7 +17,7 @@ jobs: build-and-push-mug: runs-on: ubuntu-20.04 permissions: - contents: write + contents: read packages: write steps: