Skip to content

Commit a9fee9f

Browse files
committed
Include version attribute, and encourage more environment information in bug report.
1 parent 9849b8f commit a9fee9f

4 files changed

Lines changed: 14 additions & 3 deletions

File tree

python-project-template/.github/ISSUE_TEMPLATE/1-bug_report.md renamed to python-project-template/.github/ISSUE_TEMPLATE/1-bug_report.md.jinja

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ assignees: ''
99
**Bug report**
1010

1111

12+
**Environment Information**
13+
14+
1215
**Before submitting**
1316
Please check the following:
1417

15-
- [ ] I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
18+
- [ ] I have described the situation in which the bug arose, including what code was executed, and any applicable data others will need to reproduce the problem.
19+
- [ ] I have included information about my environment, including the version of this package (e.g. `{{package_name}}.__version__`)
1620
- [ ] I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
1721
- [ ] If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

python-project-template/src/{{package_name}}/__init__.py.jinja

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{%- if create_example_module -%}
1+
from ._version import __version__
2+
{% if create_example_module -%}
23
from .example_module import greetings, meaning
34

45
__all__ = ["greetings", "meaning"]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {{package_name}}
2+
3+
4+
def test_version():
5+
"""Check to see that we can get the package version"""
6+
assert {{package_name}}.__version__ is not None

tests/test_package_creation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def test_use_black_and_no_example_modules(copie):
161161

162162
assert successfully_created_project(result)
163163
assert directory_structure_is_correct(result)
164-
assert pylint_runs_successfully(result)
164+
assert not pylint_runs_successfully(result)
165165
assert contains_required_files(result)
166166

167167
# make sure that the files that were not requested were not created

0 commit comments

Comments
 (0)