Skip to content

Commit afcf5b9

Browse files
committed
Remove author file generation and related references
1 parent bdc71e0 commit afcf5b9

File tree

7 files changed

+2
-80
lines changed

7 files changed

+2
-80
lines changed

cookiecutter.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"project_short_description": "Python Boilerplate contains all the boilerplate you need to create a Python package.",
88
"pypi_username": "{{ cookiecutter.github_username }}",
99
"version": "0.1.0",
10-
"create_author_file": "y",
1110
"__gh_slug": "{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}"
1211
}

docs/prompts.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,3 @@ The following appear in various parts of your generated project:
1414
- **project_short_description**: A 1-sentence description of what your Python package does.
1515
- **pypi_username**: Your Python Package Index account username.
1616
- **version**: The starting version number of the package.
17-
18-
## Options
19-
20-
The following package configuration options set up different features for your project:
21-
22-
- **create_author_file**: Whether to create an authors file

hooks/post_gen_project.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
import pathlib
33

44
if __name__ == "__main__":
5-
if "{{ cookiecutter.create_author_file }}" != "y":
6-
pathlib.Path("AUTHORS.md").unlink()
7-
pathlib.Path("docs", "authors.md").unlink()
5+
print("Your Python package project has been created successfully!")

tests/test_bake_project.py

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -105,24 +105,6 @@ def test_bake_with_apostrophe_and_run_tests(cookies):
105105
run_inside_dir("pytest", str(result.project)) == 0
106106

107107

108-
def test_bake_without_author_file(cookies):
109-
with bake_in_temp_dir(cookies, extra_context={"create_author_file": "n"}) as result:
110-
found_toplevel_files = [f.basename for f in result.project.listdir()]
111-
assert "AUTHORS.md" not in found_toplevel_files
112-
doc_files = [f.basename for f in result.project.join("docs").listdir()]
113-
assert "authors.md" not in doc_files
114-
115-
# Assert there are no spaces in the toc tree
116-
docs_index_path = result.project.join("docs/index.md")
117-
with open(str(docs_index_path)) as index_file:
118-
assert "contributing\n history" in index_file.read()
119-
120-
# Check that
121-
manifest_path = result.project.join("MANIFEST.in")
122-
with open(str(manifest_path)) as manifest_file:
123-
assert "AUTHORS.md" not in manifest_file.read()
124-
125-
126108
def test_make_help(cookies):
127109
with bake_in_temp_dir(cookies) as result:
128110
# The supplied Makefile does not support win32
@@ -131,42 +113,6 @@ def test_make_help(cookies):
131113
assert b"check code coverage quickly with the default Python" in output
132114

133115

134-
def test_bake_selecting_license(cookies):
135-
license_strings = {
136-
"MIT license": "MIT ",
137-
"BSD license": "Redistributions of source code must retain the "
138-
+ "above copyright notice, this",
139-
"ISC license": "ISC License",
140-
"Apache Software License 2.0": "Licensed under the Apache License, Version 2.0",
141-
"GNU General Public License v3": "GNU GENERAL PUBLIC LICENSE",
142-
"GNU Affero General Public License": "GNU AFFERO GENERAL PUBLIC LICENSE",
143-
}
144-
for license, target_string in license_strings.items():
145-
with bake_in_temp_dir(
146-
) as result:
147-
assert target_string in result.project.join("LICENSE").read()
148-
assert license in result.project.join("pyproject.toml").read()
149-
150-
151-
def test_bake_not_open_source(cookies):
152-
with bake_in_temp_dir(
153-
) as result:
154-
found_toplevel_files = [f.basename for f in result.project.listdir()]
155-
assert "pyproject.toml" in found_toplevel_files
156-
assert "LICENSE" not in found_toplevel_files
157-
assert "License" not in result.project.join("README.md").read()
158-
159-
160-
def test_using_pytest(cookies):
161-
with bake_in_temp_dir(cookies, extra_context={"use_pytest": "y"}) as result:
162-
assert result.project.isdir()
163-
test_file_path = result.project.join("tests/test_python_boilerplate.py")
164-
lines = test_file_path.readlines()
165-
assert "import pytest" in "".join(lines)
166-
# Test the new pytest target
167-
run_inside_dir("pytest", str(result.project)) == 0
168-
169-
170116
# def test_project_with_hyphen_in_module_name(cookies):
171117
# result = cookies.bake(
172118
# extra_context={'project_name': 'something-with-a-dash'}

{{cookiecutter.project_slug}}/AUTHORS.md

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
{% if cookiecutter.create_author_file == 'y' -%}
2-
include AUTHORS.md
3-
{% endif -%}
41
include CONTRIBUTING.md
52
include HISTORY.md
63
include LICENSE
@@ -10,4 +7,4 @@ recursive-include tests *
107
recursive-exclude * __pycache__
118
recursive-exclude * *.py[co]
129

13-
recursive-include docs *.md Makefile make.bat *.jpg *.png *.gif
10+
recursive-include docs *.md Makefile *.jpg *.png *.gif

{{cookiecutter.project_slug}}/docs/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
- [Usage](usage.md)
88
- [Modules](modules.md)
99
- [Contributing](contributing.md)
10-
{% if cookiecutter.create_author_file == 'y' -%}
11-
- [Authors](authors.md)
12-
{% endif -%}
1310
- [History](history.md)
1411

1512
## Indices and tables

0 commit comments

Comments
 (0)