Skip to content

Commit 06c4823

Browse files
committed
fix merge conflicts
2 parents 566fe84 + e2b6ce6 commit 06c4823

9 files changed

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
name: markdown-link-check
1+
name: link-check
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches:
67
- main
78
pull_request:
89
branches:
910
- main
1011
schedule:
11-
- cron: '0 0 * * 0' # every Sunday at 00:00
12+
- cron: '0 0 1 * *' # first day of every month at midnight
13+
14+
permissions:
15+
contents: read
16+
issues: write
1217

1318
jobs:
1419
linkChecker:
@@ -19,15 +24,15 @@ jobs:
1924
- name: Link Checker
2025
id: lychee
2126
uses: lycheeverse/lychee-action@v1
22-
with:
23-
# fail action if there are broken links
24-
fail: true
27+
28+
- name: Set Issue Title
29+
id: set_title
30+
run: echo "ISSUE_TITLE=Link Checker Report - $(date '+%Y-%m-%d')" >> $GITHUB_ENV
2531

2632
- name: Create Issue From File
27-
# create issues only when triggered by schedule
28-
if: github.event_name == 'schedule' && env.lychee_exit_code != 0
33+
if: env.lychee_exit_code != 0
2934
uses: peter-evans/create-issue-from-file@v5
3035
with:
31-
title: Link Checker Report
36+
title: ${{ env.ISSUE_TITLE }}
3237
content-filepath: ./lychee/out.md
3338
labels: report, automated issue

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
### Changed
1717

18+
* CHANGELOG.md is now optional ([#462](https://github.com/NLeSC/python-template/issues/462))
1819
* Moved to src/ based layout for generated packages
1920
* Moved from setup.cfg/.py to pyproject.toml [#351](https://github.com/NLeSC/python-template/issues/351)
2021
* Moved from prospector to ruff [#336](https://github.com/NLeSC/python-template/issues/336)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Use this [Copier](https://copier.readthedocs.io) template to generate an empty P
1414
- [README.md](template/README.md.jinja) for package users,
1515
- [README.dev.md](template/README.dev.md.jinja) for package developer,
1616
- [project_setup.md](template/project_setup.md.jinja) with extensive documentation about project setup,
17-
- [Change log](template/CHANGELOG.md),
17+
- [Change log](template/%7B%25%20if%20AddChangeLog%20%25%7DCHANGELOG.md%7B%25%20endif%20%25%7D),
1818
- [Code of Conduct](template/CODE_OF_CONDUCT.md.jinja),
1919
- [Contributing guidelines](template/CONTRIBUTING.md.jinja),
2020
- Continuous code quality and code coverage reporting using [Sonarcloud](https://sonarcloud.io/),

copier.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,21 @@ AddCitation:
8989
default: "{{ template_profile != 'minimum' }}"
9090
help: Citation file and cffconvert workflow which validates the citation file
9191

92+
AddChangeLog:
93+
when: "{{ template_profile == 'ask' }}"
94+
type: bool
95+
default: "{{ template_profile != 'minimum' }}"
96+
help: Add a change log to keep track of changes in the package
97+
9298
AddOnlineDocumentation:
9399
when: "{{ template_profile == 'ask' }}"
94100
type: bool
95101
default: "{{ template_profile != 'minimum' }}"
96102
help: Online documentation using Read the Docs
97103

98-
99104
# internal fields
100105
_subdirectory: template
101106

102-
103107
# user messages
104108
_message_before_copy: |
105109
Thanks for generating a project using our template.

template/CONTRIBUTING.md.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ The sections below outline the steps in each case.
3535
1. make sure the existing tests still work by running ``pytest``;
3636
1. add your own tests (if necessary);
3737
1. update or expand the documentation;
38+
{% if AddChangeLog -%}
3839
1. update the `CHANGELOG.md` file with your change;
40+
{%- endif %}
3941
1. [push](http://rogerdudler.github.io/git-guide/) your feature branch to (your fork of) the {{ package_name }} repository on GitHub;
4042
1. create the pull request, e.g. following the instructions [here](https://help.github.com/articles/creating-a-pull-request/).
4143

@@ -47,7 +49,9 @@ To create a release you need write permission on the repository.
4749

4850
{% if AddCitation -%}1. Check the author list in [`CITATION.cff`](CITATION.cff){%- endif %}
4951
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).
52+
{% if AddChangeLog -%}
5053
1. Update the `CHANGELOG.md` to include changes made
54+
{%- endif %}
5155
1. Go to the [GitHub release page]({{ repository_url }}/releases)
5256
1. Press draft a new release button
5357
1. Fill version, title and description field

template/README.dev.md.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ This section describes how to make a release in 3 parts:
133133

134134
### (1/3) Preparation
135135

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

template/project_setup.md.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ help you decide which tool to use for packaging.
8585
- The project is set up with a logging example.
8686
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/language_guides/python?id=logging)
8787

88+
{% if AddChangeLog -%}
8889
## CHANGELOG.md
8990

9091
- Document changes to your software package
9192
- [Relevant section in the guide](https://guide.esciencecenter.nl/#/best_practices/releases?id=changelogmd)
93+
{%- endif %}
9294

9395
{% if AddCitation -%}
9496
## CITATION.cff

template/pyproject.toml.jinja

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ publishing = [
7171
[project.urls]
7272
Repository = "{{ repository_url }}"
7373
Issues = "{{ repository_url }}/issues"
74+
{% if AddChangeLog -%}
7475
Changelog = "{{ repository_url }}/CHANGELOG.md"
76+
{%- endif %}
7577

7678
[tool.pytest.ini_options]
7779
testpaths = ["tests"]

template/CHANGELOG.md renamed to template/{% if AddChangeLog %}CHANGELOG.md{% endif %}

File renamed without changes.

0 commit comments

Comments
 (0)