Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Unreleased

### Added

* Make zenodo integration optional [#520](https://github.com/NLeSC/python-template/pull/520)
Comment thread
lyashevska marked this conversation as resolved.
Outdated
* Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)
* Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476)
* Added Python 3.12 support [#356](https://github.com/NLeSC/python-template/issues/356)
Expand Down
6 changes: 6 additions & 0 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ AddPreCommit:
default: "{{ template_profile != 'minimum' }}"
help: Add pre-commit hook to check code style and format on every commit?

AddZenodo:
when: "{{ template_profile == 'ask' }}"
type: bool
default: "{{ template_profile != 'minimum' }}"
help: Add instructions about zenodo integration?
Comment thread
lyashevska marked this conversation as resolved.
Outdated

# internal fields
_subdirectory: template

Expand Down
2 changes: 1 addition & 1 deletion profiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
- .editorconfig

- publishing and release
- zenodo
- zenodo #469
Comment thread
lyashevska marked this conversation as resolved.
Outdated
- keywords
- changelog.md
- cffconvert workflow and citation file
Expand Down
8 changes: 0 additions & 8 deletions template/.github/workflows/next_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ jobs:
with:
filename: .github/next_steps/01_sonarcloud_integration.md
id: sonarcloud
- name: Create Zenodo integration issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/next_steps/04_zenodo_integration.md
id: zenodo
- name: Create linting issue
uses: JasonEtco/create-an-issue@v2
env:
Expand All @@ -33,7 +26,6 @@ jobs:
run: |
echo 'Created issues that must be completed to have fully working Python package:
* Sonarcloud integration ${{ steps.sonarcloud.outputs.url }}
* Zenodo integration ${{ steps.zenodo.outputs.url }}
* Linting fixes ${{ steps.linting.outputs.url }}'
- name: Cleanup files needed to create next steps issues
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ It is likely that your `CITATION.cff` currently doesn't pass validation. The err
- [ ] 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/).
- [ ] Add more authors if needed
- [ ] Update `date-released` using the YYYY-MM-DD format.

{% if AddZenodo -%}
- [ ] 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.
{%- endif -%}
- [ ] Verify that the `keywords` array accurately describes your project.

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

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:

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:
1. Whether your repository includes a `CITATION.cff` file.

_By including this file, authors of the software can receive credit for the work they put in._
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
on: [push]
permissions:
contents: write
issues: write
name: Create an issue for Zenodo
jobs:
next_steps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Zenodo integration issue
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/workflows/next_steps_zenodo_issue.md
id: zenodo
- name: List created issues
run: |
echo 'Created issues that must be completed to have fully working Python package:
* Sonarcloud integration ${{ steps.sonarcloud.outputs.url }}'
- name: Cleanup files needed to create next steps issues
run: |
git config --global user.name 'NLeSC Python template'
git config --global user.email 'nlesc-python-template@users.noreply.github.com'
git pull # other next step workflows may push changes before
git rm .github/workflows/next_steps_zenodo.yml
git rm .github/workflows/next_steps_zenodo_issue.md
git commit -am "Cleanup automated next steps issue generator for zenodo"
git push

2 changes: 2 additions & 0 deletions template/CONTRIBUTING.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,6 @@ For projects that also build conda packages, e.g. on conda-forge or Bioconda, so
1. Test {{ package_name }} from bioconda by manually running [Conda verify]({{ repository_url }}/actions/workflows/conda_verify.yml) workflow
-->

{% if AddZenodo -%}
Also a Zenodo entry will be made for the release with its own DOI.
{%- endif %}
6 changes: 5 additions & 1 deletion template/README.dev.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,8 @@ python -m twine upload dist/*

### (3/3) GitHub

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.
Don't forget to also make a [release on GitHub]({{repository_url}}/releases/new).

Comment thread
lyashevska marked this conversation as resolved.
Outdated
{%- if AddZenodod -%}
Comment thread
lyashevska marked this conversation as resolved.
Outdated
GitHub-Zenodo integration will also trigger Zenodo into making a snapshot of your repository and sticking a DOI on it.
{%- endif -%}
2 changes: 2 additions & 0 deletions template/README.md.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
| (1/5) code repository | [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)]({{repository_url}}) |
| (2/5) license | [![github license badge](https://img.shields.io/github/license/{{github_organization}}/{{package_name}})]({{repository_url}}) |
| (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}}/) |
{% if AddZenodo -%}
| (4/5) citation | [![DOI](https://zenodo.org/badge/DOI/<replace-with-created-DOI>.svg)](https://doi.org/<replace-with-created-DOI>) |
{%- endif -%}
Comment thread
lyashevska marked this conversation as resolved.
Outdated
| (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>) |
| 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) |
| **Other best practices** | &nbsp; |
Expand Down