Skip to content

Commit 1a6e1b7

Browse files
committed
Merge branch 'main' into 618_copyright_owner
2 parents 09574ca + 6df50e1 commit 1a6e1b7

File tree

44 files changed

+264
-133
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+264
-133
lines changed

CHANGELOG.md

Lines changed: 38 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
## [Unreleased]
44

55
### Added
6+
7+
### Changed
8+
9+
* copyright owner is asked in all profiles [#629](https://github.com/NLeSC/python-template/pull/629)
10+
* license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629)
11+
12+
### Removed
13+
14+
## [0.6.0]
15+
16+
### Added
17+
618
* Keep project_setup.md for all the profiles and remove from the menu [#576](https://github.com/NLeSC/python-template/pull/576)
719
* Make contributing guidelines optional [#465](https://github.com/NLeSC/python-template/pull/465)
820
* Make linting optional [#568](https://github.com/NLeSC/python-template/pull/568)
@@ -15,10 +27,15 @@
1527
* Make SonarCloud optional [#515](https://github.com/NLeSC/python-template/pull/515)
1628
* Make citation optional [#471](https://github.com/NLeSC/python-template/pull/471)
1729
* Make online documentation optional [#476](https://github.com/NLeSC/python-template/pull/476)
30+
* Make local documentation optional [#593](https://github.com/NLeSC/python-template/pull/593)
31+
* Make local test optional [#594](https://github.com/NLeSC/python-template/pull/594)
1832

1933
### Changed
20-
* copyright owner is asked in all profiles [#629](https://github.com/NLeSC/python-template/pull/629)
21-
* license files includes year and copyright owner information [#629](https://github.com/NLeSC/python-template/pull/629)
34+
35+
* Update the user documentation (README.md) of the template [#575](https://github.com/NLeSC/python-template/pull/623)
36+
* Updated .gitignore [#622](https://github.com/NLeSC/python-template/pull/622)
37+
* add extra info for sub-menus [#628](https://github.com/NLeSC/python-template/pull/628)
38+
* skip merging CHANGELOG.md and CODE_OF_CONDUCT.md if they exist [#628](https://github.com/NLeSC/python-template/pull/628)
2239
* added value field to license options [#617](https://github.com/NLeSC/python-template/pull/617)
2340
* fix filename typo of githooks [#611](https://github.com/NLeSC/python-template/pull/609)
2441
* next_steps.md is shown as a copier message [#609](https://github.com/NLeSC/python-template/pull/609)
@@ -30,6 +47,7 @@
3047
* CHANGELOG.md is now optional ([#462](https://github.com/NLeSC/python-template/issues/462))
3148

3249
### Removed
50+
3351
* Remove the configuration of isort ([#591](https://github.com/NLeSC/python-template/pull/591)), which is no longer used since [#347](https://github.com/NLeSC/python-template/issues/347).
3452

3553
## [0.5.0]
@@ -147,7 +165,6 @@ Released on Apr 22, 2021
147165
* Drop Python 3.5 support
148166
* Removed unit tests doing the linting
149167

150-
151168
## [0.2.0]
152169

153170
Released on July 17, 2019
@@ -173,14 +190,14 @@ Released on July 17, 2019
173190
* Fix example tests that failed to run (#28)
174191
* Remove quotes from project name and project description (#27)
175192
* Update prospector configuration (#26)
176-
- Make prospector less strict
177-
- Have prospector ignore the docs directory
193+
* Make prospector less strict
194+
* Have prospector ignore the docs directory
178195
* Add `install_requires` to `setup.py` (#21)
179196
* Improved .gitignore (#22)
180197
* More detailed documentation about
181-
- Project setup
182-
- Setup instructions
183-
- NOTICE file
198+
* Project setup
199+
* Setup instructions
200+
* NOTICE file
184201

185202
### Removed
186203

@@ -193,20 +210,19 @@ Released on July 12, 2018.
193210
### Added
194211

195212
* First version of the Python project template that follows the Netherlands eScience Center software development guide, containing:
196-
- Tests,
197-
- Documentation,
198-
- Code style checking
199-
- Editorconfig
200-
- Default Travis configuration
201-
- Change log
202-
- Code of Conduct
203-
- Contributing guidelines
204-
- License
205-
- Manifest.in
206-
- README
207-
- Requirements.txt
208-
- Setup configuration
209-
213+
* Tests,
214+
* Documentation,
215+
* Code style checking
216+
* Editorconfig
217+
* Default Travis configuration
218+
* Change log
219+
* Code of Conduct
220+
* Contributing guidelines
221+
* License
222+
* Manifest.in
223+
* README
224+
* Requirements.txt
225+
* Setup configuration
210226

211227
[Unreleased]: https://github.com/NLeSC/python-template//compare/0.5.0...HEAD
212228
[0.5.0]: https://github.com/NLeSC/python-template/releases/tag/0.5.0

CITATION.cff

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ authors:
6868
family-names: Tjong Kim Sang
6969
given-names: Erik
7070
orcid: "https://orcid.org/0000-0002-8431-081X"
71+
- given-names: Abel
72+
family-names: Soares Siqueira
73+
74+
affiliation: Netherlands eScience Center
75+
orcid: "https://orcid.org/0000-0003-4451-281X"
76+
- given-names: Olga
77+
family-names: Lyashevska
78+
79+
affiliation: Netherlands eScience Center
80+
orcid: 'https://orcid.org/0000-0002-8686-8550'
81+
- given-names: Sander
82+
name-particle: van
83+
family-names: Rijn
84+
85+
affiliation: Netherlands eScience Center
86+
orcid: 'https://orcid.org/0000-0001-6159-041X'
7187
cff-version: "1.2.0"
7288
date-released: 2018-07-17
7389
doi: 10.5281/zenodo.1310751
@@ -79,4 +95,4 @@ license: Apache-2.0
7995
message: "If you use this software, please cite it using these metadata."
8096
repository-code: "https://github.com/NLeSC/python-template"
8197
title: "Netherlands eScience Center Python Template"
82-
version: "0.4.0"
98+
version: "0.6.0"

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
# Netherlands eScience Center Python Template
22

3-
Spend less time setting up and configuring your new Python packages which includes research software good practices from the start.
3+
Spend less time setting up and configuring your new Python packages by using this template. This [Copier](https://copier.readthedocs.io) template includes best practices for research software so your new package will include these practices from the start.
44

5-
Use this [Copier](https://copier.readthedocs.io) template to generate an empty Python package. Features include:
5+
You can choose from various user profiles, each offering a range of features to suit your needs.
6+
7+
## User profiles
8+
9+
The template profiles for a Python package offer varying levels of customization to cater to different user needs. Below are the profiles the template offers.
10+
11+
### Minimum
12+
13+
This profile offers the essential features to begin developing a Python package, making it ideal for first-time research software developers. Additional features can be added as needed.
14+
15+
### Recommended
16+
17+
This option provides a pre-selected set of features for research software, which users can fully customize.
18+
19+
### Let me choose
20+
21+
This fully customizable profile enables you to selectively include or exclude features in your Python package.
22+
23+
## Features
624

725
- Boilerplate unit tests and documentation,
826
- [Python static setup configuration](template/pyproject.toml.jinja),
@@ -14,7 +32,7 @@ Use this [Copier](https://copier.readthedocs.io) template to generate an empty P
1432
- [README.md](template/README.md.jinja) for package users,
1533
- [README.dev.md](template/README.dev.md.jinja) for package developer,
1634
- [project_setup.md](template/project_setup.md.jinja) with extensive documentation about project setup,
17-
- [Change log](template/%7B%25%20if%20AddChangeLog%20%25%7DCHANGELOG.md%7B%25%20endif%20%25%7D),
35+
- [Changelog](template/%7B%25%20if%20AddChangeLog%20%25%7DCHANGELOG.md%7B%25%20endif%20%25%7D),
1836
- [Code of Conduct](template/CODE_OF_CONDUCT.md.jinja),
1937
- [Contributing guidelines](template/CONTRIBUTING.md.jinja),
2038
- Continuous code quality and code coverage reporting using [Sonarcloud](https://sonarcloud.io/),

copier.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,25 @@
1515
!include copier/questions/package_details.yml
1616

1717
---
18-
# code quality
18+
# code quality features
1919
!include copier/questions/features_code_quality.yml
2020

2121
---
22-
# publish and release
22+
# publish and release features
2323
!include copier/questions/features_publish_release.yml
2424

2525
---
26-
# publish and release
26+
# publish and release features
2727
!include copier/questions/features_documentation.yml
2828

2929
---
30-
# community
30+
# community features
3131
!include copier/questions/features_community.yml
3232

33+
---
34+
# global flags
35+
!include copier/global_flags.yml
36+
3337
---
3438
# User messages
3539
!include copier/messages.yml

copier/global_flags.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
# Computed values that depend on multiple values
3+
4+
HasWorkflows:
5+
type: bool
6+
default: "{{
7+
AddGitHubActionBuild
8+
or AddGitHubActionDocumentation
9+
or AddLinkCheck
10+
or AddCFFConvert
11+
or AddCitation
12+
or AddOnlineDocumentation
13+
or AddSonarCloud
14+
or AddZenodo
15+
or AddLinting }}"
16+
when: false

copier/messages.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,19 @@ _message_after_copy: |
2222
git add --all
2323
git commit -m "first commit"
2424
git branch -M main
25-
git remote add origin {{ repository }}
25+
git remote add origin {{ repository }}.git
2626
2727
- Push the initial commit to a new repo on GitHub
2828
2929
Go to https://github.com/organizations/{{github_organization}}/repositories/new
3030
and create a new repository named `{{ package_name }}` as an empty repository, then push your commits to GitHub:
3131
3232
git push --set-upstream origin main
33-
34-
{% if AddDevDoc -%}
33+
{% if AddDevDoc %}
3534
- Project development documentation
3635
3736
The README.dev.md contains developer documentation
38-
{%- endif %}
39-
37+
{% endif %}
4038
- Project layout explained
4139
4240
For an explanation of what files are there, and what each of these do, please refer to {{ _copier_conf.dst_path }}/project_setup.md

copier/questions/essential.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Essential questions
33
package_name:
44
type: str
5-
placeholder: my_python_package
6-
help: Enter the name of the Python package.
5+
placeholder: your_python_package
6+
help: Enter the name of the Python package
77
validator: >-
88
{% if not (package_name | regex_search('^[a-z][a-z0-9\_]+$')) %}
99
Package name must start with a letter, followed one or more letters, digits or underscores all lowercase
@@ -22,10 +22,12 @@ full_name:
2222
help: Enter your full name
2323
validator: >-
2424
{% if not full_name %}
25-
Name cannot be empty
25+
Full name cannot be empty!
2626
{% endif %}
2727
license:
2828
type: str
29+
default: "Apachev2"
30+
help: "Select a license (see: https://choosealicense.com)"
2931
choices:
3032
Apache License, Version 2.0:
3133
value: Apachev2
@@ -41,12 +43,11 @@ license:
4143
value: GNULesserv3
4244
Other (add your own license):
4345
value: Other
44-
default: "Apachev2"
4546
copyright_holder:
4647
type: str
47-
placeholder: Netherlands eScience Center
48-
help: Who is the copyright holder?
48+
default: "{{ full_name }}"
49+
help: "Who is the copyright holder (default: full name)?"
4950
validator: >-
5051
{% if not copyright_holder %}
51-
This field cannot be empty
52+
This field cannot be empty as it will be used in content of the generated files.
5253
{% endif %}

copier/questions/features_code_quality.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ SelectCodeQualityFeatures:
77
type: yaml
88
default: |-
99
{% if template_profile == 'recommended' %}
10-
[SelectGitHubActions_flag, AddLinting_flag, AddSonarCloud_flag, AddEditorConfig_flag]
10+
[AddLocalTests_flag, SelectGitHubActions_flag, AddLinting_flag, AddSonarCloud_flag, AddEditorConfig_flag]
1111
{%- else -%}
1212
[]
1313
{%- endif %}
1414
help: Select code quality features
1515
multiselect: true
1616
choices:
17-
GitHub Actions:
17+
Unit tests (using pytest):
18+
value: AddLocalTests_flag
19+
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
20+
GitHub Actions (select in the next step):
1821
value: SelectGitHubActions_flag
1922
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
2023
Linting:
@@ -37,7 +40,7 @@ SelectGitHubActions:
3740
type: yaml
3841
default: |-
3942
{% if template_profile == 'recommended' %}
40-
[AddGitHubActionBuild_flag, AddGitHubActionDocumentation_flag]
43+
[AddGitHubActionBuild_flag]
4144
{%- else -%}
4245
[]
4346
{%- endif %}
@@ -47,22 +50,22 @@ SelectGitHubActions:
4750
Build:
4851
value: AddGitHubActionBuild_flag
4952
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
50-
Documentation:
51-
value: AddGitHubActionDocumentation_flag
52-
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
5353
Link checker (reports broken URLs):
5454
value: AddLinkCheck_flag
5555
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
5656

5757

5858
# computed features
59-
AddGitHubActionBuild:
59+
AddLocalTests:
6060
type: bool
61-
default: "{{ 'AddGitHubActionBuild_flag' in SelectGitHubActions }}"
61+
default: "{{
62+
'AddLocalTests_flag' in SelectCodeQualityFeatures
63+
or 'AddGitHubActionBuild_flag' in SelectGitHubActions
64+
or 'AddSonarCloud_flag' in SelectCodeQualityFeatures }}"
6265
when: false
63-
AddGitHubActionDocumentation:
66+
AddGitHubActionBuild:
6467
type: bool
65-
default: "{{ 'AddGitHubActionDocumentation_flag' in SelectGitHubActions }}"
68+
default: "{{ 'AddGitHubActionBuild_flag' in SelectGitHubActions }}"
6669
when: false
6770
AddLinkCheck:
6871
type: bool

copier/questions/features_community.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,21 @@ SelectCommunityFeatures:
2121
value: AddContributing_flag
2222
# validator: "{% if something != 'AnotherThing' %}BlaBla{% endif %}"
2323

24+
code_of_conduct_email:
25+
when: "{{ 'AddCodeConduct_flag' in SelectCommunityFeatures }}"
26+
type: str
27+
default: "{{ email }}"
28+
help: What is the email address to report code of conduct violations?
29+
validator: >-
30+
{% if not (code_of_conduct_email | regex_search('([A-Za-z0-9]+[.-_])*[A-Za-z0-9]+@[A-Za-z0-9-]+(\.[A-Z|a-z]{2,})+')) %}
31+
Please enter a valid email address
32+
{% endif %}
33+
2434
# computed features
2535
AddCodeConduct:
2636
type: bool
2737
default: "{{ 'AddCodeConduct_flag' in SelectCommunityFeatures }}"
2838
when: false
29-
3039
AddContributing:
3140
type: bool
3241
default: "{{ 'AddContributing_flag' in SelectCommunityFeatures }}"

0 commit comments

Comments
 (0)