From e8f2e5deae06f178b77103fd13ad1c6c540a3b02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Wed, 1 Jul 2026 17:03:19 +0200 Subject: [PATCH 01/11] ci: add zenodo test connection step --- .github/workflows/ci.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2199e45..3ce662c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -138,11 +138,26 @@ jobs: - name: Run GitLab integration tests if: ${{ env.GITLAB_API_TOKEN != '' }} run: uv run pytest --run-integration-gitlab -m "integration_gitlab" tests/test_gitlab_integration.py - - + + test-zenodo-connection: + name: Test Zenodo connection + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + + - name: Setup uv environment + uses: ./.github/actions/setup-uv + with: + dependency-group: dev + + - name: Verify Zenodo token before integration tests + run: uvx --from eossr eossr-check-connection-zenodo \ + --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ + --project-dir . \ + docs: name: Docs (Sphinx) runs-on: ubuntu-latest From 8546756f23faadae8e0e3427a035793e6a0ef55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Wed, 1 Jul 2026 17:04:45 +0200 Subject: [PATCH 02/11] ci: add the zenodo conversion --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ce662c..8610e53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,6 +151,9 @@ jobs: with: dependency-group: dev + - name: Convert CodeMeta to Zenodo metadata + run: uvx --from eossr eossr-codemeta2zenodo -i codemeta.json --overwrite + - name: Verify Zenodo token before integration tests run: uvx --from eossr eossr-check-connection-zenodo \ --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ From 92d907559797f127e19fe9d16371e6d45b401154 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 11:01:38 +0200 Subject: [PATCH 03/11] ci: use github action instead of eossr package --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8610e53..c78cb53 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -152,7 +152,9 @@ jobs: dependency-group: dev - name: Convert CodeMeta to Zenodo metadata - run: uvx --from eossr eossr-codemeta2zenodo -i codemeta.json --overwrite + uses: escape2020/codemeta2zenodo@v1.3.0 + with: + overwrite: true - name: Verify Zenodo token before integration tests run: uvx --from eossr eossr-check-connection-zenodo \ @@ -231,8 +233,9 @@ jobs: with: dependency-group: dev - name: Convert CodeMeta to Zenodo metadata - run: uvx --from eossr eossr-codemeta2zenodo -i codemeta.json --overwrite - + uses: escape2020/codemeta2zenodo@v1.3.0 + with: + overwrite: true - name: Upload and Publish to Zenodo via eossr run: | uvx --from eossr eossr-upload-repository \ From 87b8e0187f62580a2772a0b6f7a4eb8ea9222c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 11:10:51 +0200 Subject: [PATCH 04/11] doc: add citation.cff --- citation.cff | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 citation.cff diff --git a/citation.cff b/citation.cff new file mode 100644 index 0000000..c29617c --- /dev/null +++ b/citation.cff @@ -0,0 +1,33 @@ +# This CITATION.cff file was generated with cffinit. +# Visit https://bit.ly/cffinit to generate yours today! + +cff-version: 1.2.0 +title: sw-metadata-bot +message: >- + If you use this software, please cite it using the + metadata from this file. +type: software +authors: + - given-names: Tom + family-names: François + email: tom.francois@lapp.in2p3.fr + orcid: 'https://orcid.org/0000-0001-5226-3089' + affiliation: 'Univ. Savoie Mont-Blanc, CNRS, LAPP' +identifiers: + - type: doi + value: 10.5281/zenodo.19468976 + - type: swh + value: 'swh:1:dir:9f3d474c040158cc675e8db135767e0d2d3fba7b' +repository-code: 'https://github.com/SoftwareUnderstanding/sw-metadata-bot' +url: 'https://w3id.org/codemetasoft/' +abstract: >- + A repository to keep the code of the RSMetaCheck bot for + pushing issues with existing repository metadata +keywords: + - metadata + - codemeta + - bot + - software +license: MIT +version: 0.5.1 +date-released: '2026-07-02' \ No newline at end of file From 03e2aeac948cb8f9c40052a90cba0414329ebc85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 11:15:52 +0200 Subject: [PATCH 05/11] doc: add SH id in readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1d710ce..f313408 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # sw-metadata-bot [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19468976.svg)](https://doi.org/10.5281/zenodo.19468976) +[![SWH](https://archive.softwareheritage.org/badge/swh:1:dir:9f3d474c040158cc675e8db135767e0d2d3fba7b/)](https://archive.softwareheritage.org/swh:1:dir:9f3d474c040158cc675e8db135767e0d2d3fba7b;origin=https://github.com/SoftwareUnderstanding/sw-metadata-bot;visit=swh:1:snp:03da984544982fdf5aa1f556012b917250f1e4c3;anchor=swh:1:rev:fc64150edf2e35f045cf3858d81b00ca6e7f6e68) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Version](https://img.shields.io/badge/version-0.5.1-blue.svg)](https://github.com/SoftwareUnderstanding/sw-metadata-bot/releases) [![Python 3.11--3.12](https://img.shields.io/badge/python-3.11--3.12-blue.svg)](https://www.python.org/downloads/) From cdfe74b5d299542efa8060bfdd95d6568a20b64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 11:36:34 +0200 Subject: [PATCH 06/11] ci: use gitlab registry instead of uv build to run eossr --- .github/workflows/ci.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c78cb53..33f451b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI (uv) on: push: - branches: ["main", "master"] + branches: ["main"] pull_request: branches: ["*"] release: @@ -143,13 +143,12 @@ jobs: test-zenodo-connection: name: Test Zenodo connection runs-on: ubuntu-latest + container: + image: registry.gitlab.com/escape-ossr/eossr:v2.2.0 steps: - - uses: actions/checkout@v7 - - name: Setup uv environment - uses: ./.github/actions/setup-uv - with: - dependency-group: dev + - name: Checkout repository + uses: actions/checkout@v7 - name: Convert CodeMeta to Zenodo metadata uses: escape2020/codemeta2zenodo@v1.3.0 @@ -157,9 +156,9 @@ jobs: overwrite: true - name: Verify Zenodo token before integration tests - run: uvx --from eossr eossr-check-connection-zenodo \ + run: eossr-check-connection-zenodo \ --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ - --project-dir . \ + -p . \ @@ -217,15 +216,16 @@ jobs: run: uv build - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: dist/ + run: # need to setup a trusted publisher in Pypi (but avoid passing pypi tokens and password to Github secrets). + uv publish publish-zenodo: # name: Publish to Zenodo if: github.event_name == 'release' - needs: [lint, test] + needs: [lint, test, test-zenodo-connection] runs-on: ubuntu-latest + container: + image: registry.gitlab.com/escape-ossr/eossr:v2.2.0 steps: - uses: actions/checkout@v7 - name: Setup uv environment @@ -238,7 +238,8 @@ jobs: overwrite: true - name: Upload and Publish to Zenodo via eossr run: | - uvx --from eossr eossr-upload-repository \ + eossr-upload-repository \ --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ --input-dir . \ + --archive-name $CI_PROJECT_NAME.zip \ --record_id "${{ secrets.ZENODO_DEPOSITION_ID }}" From 91f7d8815bfdf2746bafc72c164210f0a76f5a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 11:58:38 +0200 Subject: [PATCH 07/11] ci: update format to test zenodo connection run --- .github/workflows/ci.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33f451b..421ae82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -156,9 +156,10 @@ jobs: overwrite: true - name: Verify Zenodo token before integration tests - run: eossr-check-connection-zenodo \ - --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ - -p . \ + run: | + eossr-check-connection-zenodo \ + --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ + --project-dir . From c4976c93c58795bcaaae9c3622f344caa2c2e147 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 14:20:49 +0200 Subject: [PATCH 08/11] ci: typos in arguments --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 421ae82..3fd552f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -159,7 +159,7 @@ jobs: run: | eossr-check-connection-zenodo \ --token "${{ secrets.ZENODO_ACCESS_TOKEN }}" \ - --project-dir . + --project_dir . From e0f57c21a9290b28d44f2e6d1cc96d94e282e45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 14:38:36 +0200 Subject: [PATCH 09/11] ci: remove uv staep in zenodo upload (not necessary anymore) --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3fd552f..9320170 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -229,10 +229,6 @@ jobs: image: registry.gitlab.com/escape-ossr/eossr:v2.2.0 steps: - uses: actions/checkout@v7 - - name: Setup uv environment - uses: ./.github/actions/setup-uv - with: - dependency-group: dev - name: Convert CodeMeta to Zenodo metadata uses: escape2020/codemeta2zenodo@v1.3.0 with: From 33215f4f75afa28ab2eb3c48e7b981c5d44a6800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 14:43:06 +0200 Subject: [PATCH 10/11] doc: rename citation to CITATION.cff --- citation.cff => CITATION.cff | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename citation.cff => CITATION.cff (100%) diff --git a/citation.cff b/CITATION.cff similarity index 100% rename from citation.cff rename to CITATION.cff From a9f5bc6a4ee9ef94c9985a7cc09b46113b97c824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Fran=C3=A7ois?= Date: Thu, 2 Jul 2026 14:45:53 +0200 Subject: [PATCH 11/11] dev: add CITATION.cff in update version package script --- update_version_package.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/update_version_package.sh b/update_version_package.sh index f0b6fb9..63b028a 100644 --- a/update_version_package.sh +++ b/update_version_package.sh @@ -15,6 +15,7 @@ ## Currently handles: # - codemeta.json: updates the version and dateModified fields # - README.md: updates the version badge +# - Citation.cff: updates the version field NEW_VERSION=$(uv version | cut -d' ' -f2) TODAY=$(date +%Y-%m-%d) @@ -33,6 +34,11 @@ with open('codemeta.json', 'w') as f: # Update README.md sed -i "s|badge/version-[^)]*-|badge/version-$NEW_VERSION-|g" README.md +# update the CITATION.cff file + +sed -i "s/^version: .*/version: $NEW_VERSION/" CITATION.cff +sed -i "s/^date-released: .*/date-released: $TODAY/" CITATION.cff + # update the uv.lock file uv sync