Skip to content

Commit f2357fd

Browse files
committed
Merge branch 'develop'
2 parents b2033c9 + 8fe3dc4 commit f2357fd

75 files changed

Lines changed: 4493 additions & 1044 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-FileCopyrightText: 2024 Helmholtz-Zentrum Dresden-Rossendorf
2+
# SPDX-License-Identifier: CC-BY-SA-4.0
3+
# SPDX-FileContributor: David Pape
4+
5+
name: "Add Plugin to Marketplace"
6+
description: "I want to add a plugin to the Hermes plugin marketplace."
7+
title: "[New Plugin]: "
8+
labels: ["documentation"]
9+
10+
body:
11+
- type: markdown
12+
attributes:
13+
value: |
14+
Thank you for building a plugin for Hermes and sharing it with the community!
15+
16+
The [Hermes plugin marketplace](https://hermes.software-metadata.pub#plugins) is a curated list of plugins on our website that allows you to share plugins that you developed, and others to find them.
17+
18+
Via this issue template, you can send us the required information to add your plugin to the marketplace. Alternatively, you may file a pull request, adding the plugin to [`plugins.json`](https://github.com/softwarepub/hermes/tree/develop/docs/source/plugins.json) yourself.
19+
20+
- id: "name"
21+
type: "input"
22+
attributes:
23+
label: "Name"
24+
description: "The name of the plugin"
25+
placeholder: "Foobar Harvesting and Quux Deposit Plugin"
26+
validations:
27+
required: true
28+
29+
- id: "author"
30+
type: "input"
31+
attributes:
32+
label: "Author"
33+
description: "The author of the plugin, usually a team or organization"
34+
placeholder: "Team Quux at Fizzbuzz Institute"
35+
36+
- id: "description"
37+
type: "textarea"
38+
attributes:
39+
label: "Description"
40+
description: "A short description of your plugin"
41+
placeholder: "Plugin for harvesting foobar files and uploading deposits to quux repo."
42+
43+
- id: "steps"
44+
type: "dropdown"
45+
attributes:
46+
label: "Steps"
47+
description: "Steps of the Hermes workflow targeted by your plugin"
48+
multiple: true
49+
options: ["harvest", "process", "curate", "deposit", "postprocess"]
50+
51+
- id: "harvested-files"
52+
type: "input"
53+
attributes:
54+
label: "Harvested files"
55+
description: "The types of files your plugin harvests (if it is a harvest plugin)"
56+
placeholder: "foobar, foobar.yml, foobar.json"
57+
58+
- id: "repository-url"
59+
type: "input"
60+
attributes:
61+
label: "Repository"
62+
description: "The link to the repository where users can find and inspect the source code of your plugin"
63+
placeholder: "https://git.example.com/quux/hermes-plugin-quux"
64+
65+
- id: "pypi-url"
66+
type: "input"
67+
attributes:
68+
label: "PyPI URL"
69+
description: "The link to your project on PyPI"
70+
placeholder: "https://pypi.org/project/hermes-plugin-quux/"
71+
72+
- id: "comments"
73+
type: "textarea"
74+
attributes:
75+
label: "Comments"
76+
description: "Any additional comments you would like to add"

.github/workflows/cffconvert.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Check out a copy of the repository
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121

2222
- name: Check whether the citation metadata from CITATION.cff is valid
2323
uses: citation-file-format/cffconvert-github-action@2.0.0

.github/workflows/check-licenses.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
test:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- name: REUSE Compliance Check
18-
uses: fsfe/reuse-action@v1
18+
uses: fsfe/reuse-action@v5

.github/workflows/hermes-zenodo-sandbox.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# SPDX-FileCopyrightText: 2023 German Aerospace Center (DLR), Helmholtz-Zentrum Drseden-Rossendorf, Forschungszentrum Jülich
2+
#
3+
# SPDX-License-Identifier: CC0-1.0
4+
5+
# SPDX-FileContributor: Stephan Druskat
6+
7+
name: Software publication on Zenodo
8+
9+
on:
10+
push:
11+
tags:
12+
- "*"
13+
14+
# NOTE: Do not delete the trigger on closed pull requests, the HERMES workflow needs this.
15+
pull_request:
16+
types:
17+
- closed
18+
19+
jobs:
20+
hermes-prepare:
21+
name: Prepare Metadata for Curation
22+
runs-on: ubuntu-latest
23+
# This condition becomes much easier when we only react to push events on the release branch.
24+
# We still need to exclude the merge commit push of the post processing PR
25+
26+
# ADAPT
27+
# Depending on the event you react to in the 'on:' section above, you will need to adapt this
28+
# to react on the specific events.
29+
# NOTE: You will probably still need to keep the exclusion check for commit messages provided by the workflow ('hermes/'/'hermes/post').
30+
if: >
31+
github.event_name == 'push' && ! (
32+
startsWith(github.ref_name, 'hermes/') ||
33+
contains(github.event.head_commit.message, 'hermes/post')
34+
)
35+
36+
permissions:
37+
contents: write # Allow creation of new branches
38+
pull-requests: write # Postprocessing should be able to create a pull request with changes
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
- uses: actions/setup-python@v5
43+
with:
44+
python-version: '3.10'
45+
- run: pip install hermes hermes-plugin-python
46+
- run: hermes harvest
47+
- run: hermes process
48+
- run: hermes curate
49+
50+
- run: |
51+
# Cache current branch for PR close job
52+
git branch --show-current > .hermes/curate/target_branch
53+
54+
# Shorten the SHA for the PR title
55+
SHORT_SHA=$(echo "$GITHUB_SHA" | cut -c -8)
56+
echo "SHORT_SHA=$SHORT_SHA" >> "$GITHUB_ENV"
57+
58+
# Create a curation branch
59+
git switch -c "hermes/curate-$SHORT_SHA"
60+
git push origin "hermes/curate-$SHORT_SHA"
61+
62+
# Explicitly add to-be-curated metadata (which is ignored via .gitignore!)
63+
git add -f .hermes/curate
64+
- uses: peter-evans/create-pull-request@v7
65+
with:
66+
base: hermes/curate-${{ env.SHORT_SHA }}
67+
branch: hermes/curate-result-${{ env.SHORT_SHA }}
68+
title: Metadata Curation for Commit ${{ env.SHORT_SHA }}
69+
body: |
70+
Please carefully review the attached metadata.
71+
If you are satisfied with the result, you may merge this PR, which will trigger publication.
72+
(Any temporary branches will be cleaned up.)
73+
delete-branch: true
74+
75+
hermes-curate:
76+
name: Publish Software with Curated Metadata
77+
if: github.event.pull_request.merged == true && startsWith( github.base_ref , 'hermes/curate-')
78+
79+
runs-on: ubuntu-latest
80+
permissions:
81+
contents: write # Allow creation of new branches
82+
pull-requests: write # Postprocessing should be able to create a pull request with changes
83+
84+
steps:
85+
- uses: actions/checkout@v4
86+
- uses: actions/setup-python@v5
87+
with:
88+
python-version: '3.10'
89+
- run: pip install hermes
90+
91+
# ADAPT
92+
# If you want to publish artifacts (e.g., a zipped snapshot of your repository),
93+
# you can prepare this here.
94+
- run: git archive --format zip HEAD src > hermes.zip
95+
96+
# Run the HERMES deposition and postprocessing steps.
97+
# ADAPT
98+
# 1. You need to have an authentication token for your target publication platform
99+
# as a GitHub secret in your repository (in this example, this is called ZENODO_SANDBOX).
100+
# 2. Adapt the files you want to deposit. In the example, showcase.zip and README.md are deposited alongside the metadata.
101+
# 3. Check if you want to run with '--initial', as this may potentially create a completely new record (collection),
102+
# rather than a new version of the same collection!
103+
- run: hermes deposit --initial -O invenio_rdm.auth_token ${{ secrets.ZENODO }} --file hermes.zip --file README.md
104+
105+
# ADAPT
106+
# Remove this command if you don't want to do any postprocessing
107+
- run: hermes postprocess
108+
109+
# ADAPT
110+
# If you don't want to run postprocessing, remove this complete section (next '-run' and 'uses: peter-evans/...' bullets).
111+
#
112+
# Note 1: We change the base branch here for the PR. This flow runs so far within the "curated-metadata-*" branch,
113+
# but now we want to add the changes done by deposit and post processing to the branch that was initially
114+
# meant to be published using HERMES.
115+
# Note 2: The create-pull-request action will NOT inherit the commits we did in the previous job. It will only look at the
116+
# changes within this local workspace we did *now*.
117+
- run: echo "TARGET_BRANCH=$(cat .hermes/curate/target_branch)" >> "$GITHUB_ENV"
118+
- uses: peter-evans/create-pull-request@v7
119+
with:
120+
branch: hermes/post-${{ github.run_id }}
121+
base: ${{ env.TARGET_BRANCH }}
122+
title: Review hermes post-processing results
123+
body: |
124+
This is an automated pull request created by HERMES post-processing.
125+
126+
Please carefully review the changes and finally merge them into your
127+
128+
# Delete all the curation branches
129+
- run: |
130+
for BRANCH in $(git ls-remote origin 'refs/heads/hermes/curate-*' | cut -f2 | cut -d'/' -f'3-'); do
131+
git push origin --delete "$BRANCH"
132+
done
133+
# TODO: if: failure() --- delete the curation branches when the deposition failed
134+
135+
136+
hermes-cleanup:
137+
name: Cleanup aborted curation branches
138+
if: github.event.pull_request.merged == false && startsWith( github.base_ref , 'hermes/curate-')
139+
140+
runs-on: ubuntu-latest
141+
permissions:
142+
contents: write # Allow creation of new branches
143+
pull-requests: write # Postprocessing should be able to create a pull request with changes
144+
145+
steps:
146+
- uses: actions/checkout@v4
147+
# Delete all the curation branches
148+
- run: |
149+
for BRANCH in $(git ls-remote origin 'refs/heads/hermes/curate-*' | cut -f2 | cut -d'/' -f'3-'); do
150+
git push origin --delete "$BRANCH"
151+
done

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424
- name: Set up Python
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v5
2626
with:
2727
python-version: "3.10"
2828
- name: Install pypa/build
@@ -34,7 +34,7 @@ jobs:
3434
- name: Build a binary wheel and a source tarball
3535
run: python3 -m build
3636
- name: Store the distribution packages
37-
uses: actions/upload-artifact@v3
37+
uses: actions/upload-artifact@v4
3838
with:
3939
name: python-package-distributions
4040
path: dist/
@@ -54,7 +54,7 @@ jobs:
5454

5555
steps:
5656
- name: Download all the dists
57-
uses: actions/download-artifact@v3
57+
uses: actions/download-artifact@v4
5858
with:
5959
name: python-package-distributions
6060
path: dist/

.github/workflows/tests.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,22 @@ jobs:
1818
python-version: ["3.10"] # Ignore Python < 3.10, they are unsupported
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Install dependencies
2727
run: |
28-
python -m pip install --upgrade pip
29-
pip install flake8 pytest
30-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
python -m pip install --upgrade pip poetry
29+
poetry install
3130
- name: Lint with flake8
3231
run: |
3332
# stop the build if there are Python syntax errors or undefined names
34-
flake8 ./test/ ./src/ --count --select=E9,F63,F7,F82 --show-source --statistics
33+
poetry run flake8 ./test/ ./src/ --count --select=E9,F63,F7,F82 --show-source --statistics
3534
# Stop build on errors
36-
flake8 ./test/ ./src/ --count --statistics
35+
poetry run flake8 ./test/ ./src/ --count --statistics
3736
- name: Test with pytest
3837
run: |
39-
pip install -e .
40-
pip install requests-mock
41-
pytest ./test/
38+
poetry install
39+
poetry run pytest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ dist/
2323

2424
# HERMES workflow specifics
2525
.hermes/
26+
hermes.log

CITATION.cff

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ title: hermes
1414
message: >-
1515
If you use this software, please cite it using the
1616
metadata from this file.
17-
version: "0.8.0"
17+
version: 0.9.0
1818
license: "Apache-2.0"
19-
abstract: "Implementation of the HERMES workflow for FAIR software publication."
19+
abstract: "Tool to automate software publication. Not stable yet."
2020
type: software
2121
authors:
2222
- given-names: Michael
@@ -29,15 +29,10 @@ authors:
2929
email: stephan.druskat@dlr.de
3030
affiliation: German Aerospace Center (DLR)
3131
orcid: 'https://orcid.org/0000-0003-4925-7248'
32-
- given-names: Jeffrey
33-
family-names: Kelling
34-
email: j.kelling@hzdr.de
35-
affiliation: Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
36-
orcid: 'https://orcid.org/0000-0003-1761-2591'
3732
- given-names: Oliver
3833
family-names: Bertuch
3934
email: o.bertuch@fz-juelich.de
40-
affiliation: Forschungszentrum Jülich GmbH (FZJ)
35+
affiliation: Forschungszentrum Jülich
4136
orcid: 'https://orcid.org/0000-0002-2702-3419'
4237
- given-names: Oliver
4338
family-names: Knodel
@@ -49,3 +44,17 @@ authors:
4944
email: d.pape@hzdr.de
5045
affiliation: Helmholtz-Zentrum Dresden-Rossendorf (HZDR)
5146
orcid: 'https://orcid.org/0000-0002-3145-9880'
47+
- given-names: Kernchen
48+
family-names: Sophie
49+
email: sophie.kernchen@dlr.de
50+
affiliation: German Aerospace Center (DLR)
51+
orcid: 'https://orcid.org/0009-0005-4430-6743'
52+
- given-names: Nitai
53+
family-names: Heeb
54+
email: n.heeb@fz-juelich.de
55+
affiliation: Forschungszentrum Jülich
56+
orcid: 'https://orcid.org/0009-0001-8382-4923'
57+
identifiers:
58+
- type: doi
59+
value: 10.5281/zenodo.13221384
60+
description: Version 0.8.1b1

0 commit comments

Comments
 (0)