diff --git a/{{cookiecutter.project_name}}/.github/next_steps/04_citation.md b/{{cookiecutter.project_name}}/.github/next_steps/02_citation.md similarity index 100% rename from {{cookiecutter.project_name}}/.github/next_steps/04_citation.md rename to {{cookiecutter.project_name}}/.github/next_steps/02_citation.md diff --git a/{{cookiecutter.project_name}}/.github/next_steps/02_zenodo_integration.md b/{{cookiecutter.project_name}}/.github/next_steps/02_zenodo_integration.md deleted file mode 100644 index 310f17e9..00000000 --- a/{{cookiecutter.project_name}}/.github/next_steps/02_zenodo_integration.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Next step: Zenodo integration' ---- - -Zenodo integration instructions. diff --git a/{{cookiecutter.project_name}}/.github/next_steps/04_zenodo_integration.md b/{{cookiecutter.project_name}}/.github/next_steps/04_zenodo_integration.md new file mode 100644 index 00000000..a0c81a8b --- /dev/null +++ b/{{cookiecutter.project_name}}/.github/next_steps/04_zenodo_integration.md @@ -0,0 +1,22 @@ +--- +title: 'Next step: Enable Zenodo integration' +--- + +By enabling Zenodo integration, your package will automatically get a DOI which can be used to cite your package. After enabling Zenodo integration for your GitHub repository, Zenodo will create a snapshot and archive each release you make on GitHub. Moreover, Zenodo will create a new DOI for each GitHub release of your code. + +To enable Zenodo integration: + +1. Go to http://zenodo.org and login with your GitHub account. When you are redirected to GitHub, *Authorize application* to give permission to Zenodo to access your account. +1. Go to and enable Zenodo integration of your repository by clicking on `On` toggle button. +2. Your package will get a DOI only after you make a release. Create a new release as described in [README.dev.md]({{cookiecutter.repository}}/blob/main/README.dev.md#33-github) +3. At this point you should have a DOI. To find out the DOI generated by Zenodo: + 1. Visit https://zenodo.org/deposit and click on your repository link + 2. You will find the latest DOI in the right column in Versions box in **Cite all versions?** section + 3. Copy the text of the link. For example `10.5281/zenodo.1310751` +4. Update the badge in your repository + 1. Edit README.md and replace the badge placeholder with the badge link you copied in previous step. + The badge placeholder is shown below. + + `[![DOI](https://zenodo.org/badge/DOI/.svg)](https://doi.org/)` + +For FAQ about Zenodo please visit . diff --git a/{{cookiecutter.project_name}}/.github/workflows/next_steps.yml b/{{cookiecutter.project_name}}/.github/workflows/next_steps.yml index 533eec33..fbf0877b 100644 --- a/{{cookiecutter.project_name}}/.github/workflows/next_steps.yml +++ b/{{cookiecutter.project_name}}/.github/workflows/next_steps.yml @@ -12,13 +12,14 @@ jobs: with: filename: .github/next_steps/01_sonarcloud_integration.md id: sonarcloud - - name: Create Zenodo integration issue + + - name: Create citation data issue uses: JasonEtco/create-an-issue@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - filename: .github/next_steps/02_zenodo_integration.md - id: zenodo + filename: .github/next_steps/02_citation.md + id: citation - name: Create readthedocs issue uses: JasonEtco/create-an-issue@v2 env: @@ -26,13 +27,13 @@ jobs: with: filename: .github/next_steps/03_readthedocs.md id: readthedocs - - name: Create citation data issue + - name: Create Zenodo integration issue uses: JasonEtco/create-an-issue@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - filename: .github/next_steps/04_citation.md - id: citation + filename: .github/next_steps/04_zenodo_integration.md + id: zenodo - name: Create linting issue uses: JasonEtco/create-an-issue@v2 env: diff --git a/{{cookiecutter.project_name}}/README.dev.md b/{{cookiecutter.project_name}}/README.dev.md index c6a8013b..37614c86 100644 --- a/{{cookiecutter.project_name}}/README.dev.md +++ b/{{cookiecutter.project_name}}/README.dev.md @@ -116,7 +116,7 @@ python3 -m pip install --upgrade pip setuptools python3 -m pip install --no-cache-dir . python3 -m pip install --no-cache-dir .[publishing] -# clean up any previously generated artefacts +# clean up any previously generated artefacts rm -rf {{ cookiecutter.package_name }}.egg-info rm -rf dist @@ -161,5 +161,4 @@ twine upload dist/* ### (3/3) GitHub -Don't forget to also make a release on GitHub. 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. 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.