From d5e7bc0e238412d72455bc8bc05dcc6d3f9477f7 Mon Sep 17 00:00:00 2001 From: "Meinel, Michael" Date: Fri, 2 Aug 2024 13:08:38 +0200 Subject: [PATCH 1/5] Bump version number and cleanup TOML files --- hermes.toml | 8 ++++---- pyproject.toml | 47 +++++++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 22 deletions(-) diff --git a/hermes.toml b/hermes.toml index 40712c0..d32eae8 100644 --- a/hermes.toml +++ b/hermes.toml @@ -1,12 +1,12 @@ [harvest] sources = ["toml"] -[harvest.toml] -from_branch = "develop" - [deposit] target = "invenio_rdm" [deposit.invenio_rdm] -site_url = "https://sandbox.zenodo.org" +site_url = "https://zenodo.org" access_right = "open" + +[postprocess] +execute = [ "config_record_id" ] diff --git a/pyproject.toml b/pyproject.toml index c4024c2..c5451a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,31 +4,39 @@ # # SPDX-FileContributor: Michael Meinel # SPDX-FileContributor: Michael Fritzsche -[build-system] -requires = [ "setuptools >= 70.1.1",] -build-backend = "setuptools.build_meta" [project] name = "hermes-plugin-python" -version = "0.1.8" +version = "0.2.0" readme = "README.md" description = "HERMES plugin for .toml files" -keywords = [ "publishing", "metadata", "automation",] -requires-python = ">= 3.8" -classifiers = [ "Development Status :: 2 - Pre-Alpha", "Environment :: Plugins", "Programming Language :: Python :: 3", "Operating System :: OS Independent",] -dependencies = [ "hermes>=0.8.0",] -[[project.authors]] -name = "Michael Meinel" -email = "michael.meinel@dlr.de" +license = { text = "Apache-2.0" } +authors = [ + { name = "Michael Fritzsche" }, + { name = "Michael Meinel", email = "michael.meinel@dlr.de" }, +] -[[project.authors]] -name = "Michael Fritzsche" +keywords = [ "publishing", "metadata", "automation",] +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Environment :: Plugins", + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] -[project.license] -text = "Apache-2.0" +requires-python = ">= 3.8" +dependencies = [ + "hermes>=0.8.0", +] [project.optional-dependencies] -dev = [ "pytest>=8.2.2", "pytest-cov>=3.0.0", "taskipy>=1.10.3", "flake8>=5.0.4", "reuse>=1.1.2",] +dev = [ + "pytest>=8.2.2", + "pytest-cov>=3.0.0", + "taskipy>=1.10.3", + "flake8>=5.0.4", + "reuse>=1.1.2", +] [project.urls] Repository = "https://github.com/hermes-hmc/hermes-plugin-python" @@ -37,9 +45,12 @@ Repository = "https://github.com/hermes-hmc/hermes-plugin-python" packages = [ "hermes_toml",] [project.entry-points."hermes.harvest"] -cff = "hermes.commands.harvest.cff:CffHarvestPlugin" -codemeta = "hermes.commands.harvest.codemeta:CodeMetaHarvestPlugin" toml = "hermes_toml.harvest:TomlHarvestPlugin" [tool.setuptools.package-dir] "" = "src" + +[build-system] +requires = [ "setuptools >= 70.1.1",] +build-backend = "setuptools.build_meta" + From 2aa5f306bd2ed304f4949886320b32569bcd76f4 Mon Sep 17 00:00:00 2001 From: "Meinel, Michael" Date: Fri, 2 Aug 2024 13:09:52 +0200 Subject: [PATCH 2/5] Make Git ignore IDE artifacts from PyCharm --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 819b54b..9745a90 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ src/hermes_toml/util/__pycache__/ __pycache__/ .hermes/ .coverage + +# IDE artifacts +.idea/ From e17ac0496c793f558af2d4d3c3d2c983c5a6b657 Mon Sep 17 00:00:00 2001 From: "Meinel, Michael" Date: Fri, 2 Aug 2024 13:17:22 +0200 Subject: [PATCH 3/5] Remove unneccessary step from automatic package build --- .github/workflows/python-publish.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1f1bcd9..ebbb251 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -30,14 +30,6 @@ jobs: python -m pip install --upgrade pip pip install build pip install toml - - name: Update version number - run: | - # Note: the following account information will not work on GHES - git config user.name "github-actions[bot]" - git config user.email "" - git add . - git commit -m "generated" - git push origin HEAD:main - name: Build package run: python -m build - name: Publish package From 0f42dd86e93fb51898ac2444bd478677fbbc24bb Mon Sep 17 00:00:00 2001 From: "Meinel, Michael" Date: Fri, 2 Aug 2024 13:19:57 +0200 Subject: [PATCH 4/5] Allow initial deposition at Zenodo --- .github/workflows/zenodo-sandbox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zenodo-sandbox.yml b/.github/workflows/zenodo-sandbox.yml index fc1c26d..a7b8268 100644 --- a/.github/workflows/zenodo-sandbox.yml +++ b/.github/workflows/zenodo-sandbox.yml @@ -28,4 +28,4 @@ jobs: - run: hermes harvest - run: hermes process - run: hermes curate - - run: hermes deposit -O invenio_rdm.auth_token "${{ secrets.ZENODO_SANDBOX }}" --file hermes-plugin-python.zip --file README.md + - run: hermes deposit -O invenio_rdm.auth_token "${{ secrets.ZENODO_SANDBOX }}" --file hermes-plugin-python.zip --file README.md --initial From 248006e4f4d46fcf68f5d15e46254dad561944a7 Mon Sep 17 00:00:00 2001 From: "Meinel, Michael" Date: Fri, 2 Aug 2024 13:32:08 +0200 Subject: [PATCH 5/5] Ensure follow-up releases are linked to the original record --- .github/workflows/zenodo-sandbox.yml | 2 +- hermes.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/zenodo-sandbox.yml b/.github/workflows/zenodo-sandbox.yml index a7b8268..fc1c26d 100644 --- a/.github/workflows/zenodo-sandbox.yml +++ b/.github/workflows/zenodo-sandbox.yml @@ -28,4 +28,4 @@ jobs: - run: hermes harvest - run: hermes process - run: hermes curate - - run: hermes deposit -O invenio_rdm.auth_token "${{ secrets.ZENODO_SANDBOX }}" --file hermes-plugin-python.zip --file README.md --initial + - run: hermes deposit -O invenio_rdm.auth_token "${{ secrets.ZENODO_SANDBOX }}" --file hermes-plugin-python.zip --file README.md diff --git a/hermes.toml b/hermes.toml index d32eae8..ca44160 100644 --- a/hermes.toml +++ b/hermes.toml @@ -7,6 +7,7 @@ target = "invenio_rdm" [deposit.invenio_rdm] site_url = "https://zenodo.org" access_right = "open" +record_id = "13168127" [postprocess] execute = [ "config_record_id" ]