Skip to content

Commit 43a6ccf

Browse files
committed
update jinja conditions to fix whitespace and new lines for citation text
1 parent 1b68ffb commit 43a6ccf

6 files changed

Lines changed: 11 additions & 9 deletions

File tree

template/CONTRIBUTING.md.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ In case you feel like you've made a valuable contribution, but you don't know ho
4545

4646
To create a release you need write permission on the repository.
4747

48-
{% if AddCitation %}1. Check the author list in [`CITATION.cff`](CITATION.cff){% endif %}
49-
1. Bump the version using `bump-my-version bump <major|minor|patch>`. For example, `bump-my-version bump major` will increase major version numbers everywhere it's needed (code, meta, etc.) in the repo. Alternatively the version can be manually changed in {{ package_name }}/__init__.py, pyproject.toml, {% if AddCitation %}CITATION.cff{% endif %} and docs/conf.py (and other places it was possibly added).
48+
{% if AddCitation -%}1. Check the author list in [`CITATION.cff`](CITATION.cff){%- endif %}
49+
1. Bump the version using `bump-my-version bump <major|minor|patch>`. For example, `bump-my-version bump major` will increase major version numbers everywhere it's needed (code, meta, etc.) in the repo. Alternatively the version can be manually changed in {{ package_name }}/__init__.py, pyproject.toml, {% if AddCitation %}CITATION.cff{%- endif -%} and docs/conf.py (and other places it was possibly added).
5050
1. Update the `CHANGELOG.md` to include changes made
5151
1. Go to the [GitHub release page]({{ repository_url }}/releases)
5252
1. Press draft a new release button

template/MANIFEST.in.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% if AddCitation %}include CITATION.cff{% endif %}
1+
{% if AddCitation -%}include CITATION.cff{%- endif %}
22
include LICENSE
33
include NOTICE
44
include README.md

template/README.dev.md.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ This section describes how to make a release in 3 parts:
134134
### (1/3) Preparation
135135

136136
1. Update the <CHANGELOG.md> (don't forget to update links at bottom of page)
137-
{% if AddCitation %}1. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.{% endif %}
137+
{% if AddCitation -%}1. Verify that the information in [`CITATION.cff`](CITATION.cff) is correct.{%- endif %}
138138
1. Make sure the [version has been updated](#versioning).
139139
1. Run the unit tests with `pytest -v`
140140

template/README.md.jinja

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
| Documentation | [![Documentation Status](https://readthedocs.org/projects/{{package_name}}/badge/?version=latest)](https://{{package_name}}.readthedocs.io/en/latest/?badge=latest) |
1717
| **GitHub Actions** | &nbsp; |
1818
| Build | [![build]({{repository_url}}/actions/workflows/build.yml/badge.svg)]({{repository_url}}/actions/workflows/build.yml) |
19-
{% if AddCitation %}| Citation data consistency | [![cffconvert]({{repository_url}}/actions/workflows/cffconvert.yml/badge.svg)]({{repository_url}}/actions/workflows/cffconvert.yml) |{% endif %}
19+
{% if AddCitation -%}
20+
| Citation data consistency | [![cffconvert]({{repository_url}}/actions/workflows/cffconvert.yml/badge.svg)]({{repository_url}}/actions/workflows/cffconvert.yml) |
21+
{%- endif -%}
2022
| SonarCloud | [![sonarcloud]({{repository_url}}/actions/workflows/sonarcloud.yml/badge.svg)]({{repository_url}}/actions/workflows/sonarcloud.yml) |
2123
| MarkDown link checker | [![markdown-link-check]({{repository_url}}/actions/workflows/markdown-link-check.yml/badge.svg)]({{repository_url}}/actions/workflows/markdown-link-check.yml) |
2224

template/project_setup.md.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ help you decide which tool to use for packaging.
9090
- Document changes to your software package
9191
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/releases?id=changelogmd)
9292

93-
{% if AddCitation %}
93+
{% if AddCitation -%}
9494
## CITATION.cff
9595

9696
- To allow others to cite your software, add a `CITATION.cff` file
9797
- It only makes sense to do this once there is something to cite (e.g., a software release with a DOI).
9898
- Follow the [making software citable](https://guide.esciencecenter.nl/#/citable_software/making_software_citable) section in the guide.
99-
{% endif %}
99+
{%- endif -%}
100100

101101
## CODE_OF_CONDUCT.md
102102

template/pyproject.toml.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ filename = "src/{{ package_name }}/__init__.py"
149149
[[tool.bumpversion.files]]
150150
filename = "pyproject.toml"
151151

152-
{% if AddCitation %}
152+
{% if AddCitation -%}
153153
[[tool.bumpversion.files]]
154154
filename = "CITATION.cff"
155-
{% endif %}
155+
{%- endif %}
156156

157157
[[tool.bumpversion.files]]
158158
filename = "docs/conf.py"

0 commit comments

Comments
 (0)