Skip to content

Commit a38a6e8

Browse files
committed
Merge branch 'main' into 464-codeconduct
2 parents e852fa2 + ee76bec commit a38a6e8

10 files changed

Lines changed: 50 additions & 13 deletions

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
* Make Code of Conduct optional [#464](https://github.com/NLeSC/python-template/pull/530)
8+
* Make zenodo next step instructions optional [#520](https://github.com/NLeSC/python-template/pull/520)
89
* Make SonarCloud optional [#515](https://github.com/NLeSC/python-template/pull/515)
910
* Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)
1011
* Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476)

copier.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ AddCodeConduct:
114114
default: "{{ template_profile != 'minimum' }}"
115115
help: Add code of conduct?
116116

117+
AddZenodo:
118+
when: "{{ template_profile == 'ask' }}"
119+
type: bool
120+
default: "{{ template_profile != 'minimum' }}"
121+
help: Create a GitHub issue on how to enable Zenodo integration?
122+
117123
AddSonarCloud:
118124
when: "{{ template_profile == 'ask' }}"
119125
type: bool

profiles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
- .editorconfig
3030

3131
- publishing and release
32-
- zenodo
32+
- zenodo #520
3333
- keywords
3434
- changelog.md
3535
- cffconvert workflow and citation file

template/.github/workflows/next_steps.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- name: Create Zenodo integration issue
12-
uses: JasonEtco/create-an-issue@v2
13-
env:
14-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15-
with:
16-
filename: .github/next_steps/04_zenodo_integration.md
17-
id: zenodo
1811
- name: Create linting issue
1912
uses: JasonEtco/create-an-issue@v2
2013
env:
@@ -25,7 +18,6 @@ jobs:
2518
- name: List created issues
2619
run: |
2720
echo 'Created issues that must be completed to have fully working Python package:
28-
* Zenodo integration ${{ steps.zenodo.outputs.url }}
2921
* Linting fixes ${{ steps.linting.outputs.url }}'
3022
- name: Cleanup files needed to create next steps issues
3123
run: |

template/.github/workflows/{% if AddCitation %}next_steps_citation_issue.md{% endif %}.jinja

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ It is likely that your `CITATION.cff` currently doesn't pass validation. The err
88
- [ ] Update the value of the `orcid` key. If you do not have an orcid yet, you can get one here [https://orcid.org/](https://orcid.org/).
99
- [ ] Add more authors if needed
1010
- [ ] Update `date-released` using the YYYY-MM-DD format.
11+
12+
{% if AddZenodo -%}
1113
- [ ] Update the `doi` key with the conceptDOI for your repository (see [https://help.zenodo.org](https://help.zenodo.org/) for more information on what a conceptDOI is). If your project doesn't have a DOI yet, you can use the string `10.0000/FIXME` to pass validation.
14+
{%- endif -%}
1215
- [ ] Verify that the `keywords` array accurately describes your project.
1316

1417
Afterwards, the `cffconvert` GitHub Action should be green.
1518

16-
To make sure services like [Zenodo](https://zenodo.org) and the [Research Software Directory](https://research-software-directory.org/) can keep your citation data up to date, the [`cffconvert`]({{repository_url}}/actions/workflows/cffconvert.yml) GitHub Action checks the following:
17-
19+
To make sure services like {% if AddZenodo -%} [Zenodo](https://zenodo.org) and {%- endif -%} the [Research Software Directory](https://research-software-directory.org/) can keep your citation data up to date, the [`cffconvert`]({{repository_url}}/actions/workflows/cffconvert.yml) GitHub Action checks the following:
1820
1. Whether your repository includes a `CITATION.cff` file.
1921

2022
_By including this file, authors of the software can receive credit for the work they put in._
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
on: [push]
2+
permissions:
3+
contents: write
4+
issues: write
5+
name: Create an issue for Zenodo
6+
jobs:
7+
next_steps:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Create Zenodo integration issue
12+
uses: JasonEtco/create-an-issue@v2
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15+
with:
16+
filename: .github/workflows/next_steps_zenodo_issue.md
17+
id: zenodo
18+
- name: List created issues
19+
run: |
20+
echo 'Created issues that must be completed to have fully working Python package:
21+
* Sonarcloud integration ${{ steps.sonarcloud.outputs.url }}'
22+
- name: Cleanup files needed to create next steps issues
23+
run: |
24+
git config --global user.name 'NLeSC Python template'
25+
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
26+
git pull # other next step workflows may push changes before
27+
git rm .github/workflows/next_steps_zenodo.yml
28+
git rm .github/workflows/next_steps_zenodo_issue.md
29+
git commit -am "Cleanup automated next steps issue generator for zenodo"
30+
git push
31+

template/.github/next_steps/04_zenodo_integration.md.jinja renamed to template/.github/workflows/{% if AddZenodo %}next_steps_zenodo_issue.md{% endif %}.jinja

File renamed without changes.

template/CONTRIBUTING.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,6 @@ For projects that also build conda packages, e.g. on conda-forge or Bioconda, so
6969
1. Test {{ package_name }} from bioconda by manually running [Conda verify]({{ repository_url }}/actions/workflows/conda_verify.yml) workflow
7070
-->
7171

72+
{% if AddZenodo -%}
7273
Also a Zenodo entry will be made for the release with its own DOI.
74+
{%- endif %}

template/README.dev.md.jinja

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,7 @@ python -m twine upload dist/*
195195

196196
### (3/3) GitHub
197197

198-
Don't forget to also make a [release on GitHub]({{repository_url}}/releases/new). If your repository uses the GitHub-Zenodo integration this will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
198+
Don't forget to also make a [release on GitHub]({{repository_url}}/releases/new).
199+
{%- if AddZenodo -%}
200+
GitHub-Zenodo integration will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
201+
{%- endif -%}

template/README.md.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| (1/5) code repository | [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)]({{repository_url}}) |
88
| (2/5) license | [![github license badge](https://img.shields.io/github/license/{{github_organization}}/{{package_name}})]({{repository_url}}) |
99
| (3/5) community registry | [![RSD](https://img.shields.io/badge/rsd-{{package_name}}-00a3e3.svg)](https://www.research-software.nl/software/{{package_name}}) [![workflow pypi badge](https://img.shields.io/pypi/v/{{package_name}}.svg?colorB=blue)](https://pypi.python.org/project/{{package_name}}/) |
10-
| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/<replace-with-created-DOI>.svg)](https://doi.org/<replace-with-created-DOI>) |
10+
| (4/5) citation | {% if AddZenodo -%} [![DOI](https://zenodo.org/badge/DOI/<replace-with-created-DOI>.svg)](https://doi.org/<replace-with-created-DOI>){%- endif -%} |
1111
| (5/5) checklist | [![workflow cii badge](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>/badge)](https://bestpractices.coreinfrastructure.org/projects/<replace-with-created-project-identifier>) |
1212
| howfairis | [![fair-software badge](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu) |
1313
| **Other best practices** | &nbsp; |

0 commit comments

Comments
 (0)