Skip to content

Commit 45da156

Browse files
committed
Replaced fixed reference_section parameters with general additional_section parameters
1 parent 66b977b commit 45da156

File tree

4 files changed

+17
-11
lines changed

4 files changed

+17
-11
lines changed

copier.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,20 @@ project_installation_instructions:
2424
type: str
2525
help: "A short description of how to install the package. It will be added to the README.md of this project"
2626

27-
add_reference_section:
27+
add_additional_section:
2828
type: bool
29-
help: "Do you want to add a reference section to the README.md?"
29+
help: "Do you want to add an additional section to the README.md?"
3030
default: false
3131

32-
reference_section_description:
33-
when: "{{ add_reference_section }}"
32+
additional_section_heading:
33+
when: "{{ add_additional_section }}"
3434
type: str
35-
help: "Enter the references for the reference section."
35+
help: "Enter the heading for the additional section."
36+
37+
additional_section_description:
38+
when: "{{ add_additional_section }}"
39+
type: str
40+
help: "Enter the description for the additional section."
3641

3742
git_username:
3843
type: str

template/README.md.jinja

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ If the installation fails, please check out the [help section](https://pyfar-gal
2929

3030
Check out the [contributing guidelines](https://{{ project_slug }}.readthedocs.io/en/stable/contributing.html) if you want to become part of pyfar.
3131

32-
{% if add_reference_section == true -%}
33-
## References
32+
{% if add_additional_section == true -%}
33+
## {{ additional_section_heading }}
3434

35-
{{ reference_section_description }}
35+
{{ additional_section_description }}
3636

3737
{%- endif %}

tests/conftest.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ def copier_project_defaults():
66
"project_slug": "my_project",
77
"project_long_description": "my_project_description",
88
"project_getting_started": "This is how to get started.",
9-
"add_reference_section": "Y",
9+
"add_additional_section": "Y",
1010
"project_installation_instructions": "Installation instructions.",
11-
"reference_section_description": "Reference section description.",
11+
"additional_section_heading": "Additional Section",
12+
"additional_section_description": "Additional section description.",
1213
"git_username": "pyfar",
1314
"minimum_python_version": "3.11",
1415
"license": "MIT",

tests/test_copier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_generated_file_exists(default_project, file_name):
4949
"https://my_project.readthedocs.io/en/stable/contributing.html",
5050
"\nThis is how to get started.\n",
5151
"\nInstallation instructions.\n",
52-
"\n\n## References\n\nReference section description.",
52+
"\n\n## Additional Section\n\nAdditional section description.",
5353
])
5454
def test_content_readme(default_project, desired):
5555
content = default_project.project_dir.joinpath("README.md").read_text()

0 commit comments

Comments
 (0)