-
Notifications
You must be signed in to change notification settings - Fork 0
Add Issue templates #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
h-chmeruk
wants to merge
5
commits into
main
Choose a base branch
from
add-issue-template
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
c2c3f7d
Added drafts for the Issue templates
h-chmeruk 3030500
Added GitHub Issue templates, adjusted test functions
h-chmeruk cf8ba94
Deleted the Issue templates from the wrong directory
h-chmeruk f927f39
Applied changes from the review by @ahms5, abjusted test functions
h-chmeruk f64da66
Add new lines at the end of the files
h-chmeruk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Bug report | ||
| description: Report a problem to help improve this project | ||
| title: "[BUG] <Please write a comprehensive title after the '[BUG]' prefix>" | ||
| labels: [bug] | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Is there an existing issue for this? | ||
| description: Please search to see if an issue already exists for the bug you encountered. | ||
| options: | ||
| - label: I looked for [similar existing issues](https://github.com/{{ git_username }}/{{ project_slug }}/issues). | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Problem description | ||
| description: | | ||
| A concise description of what you're experiencing. | ||
| Please explain: | ||
| * **what** you tried to achieve, | ||
| * **how** you went about it (referring to the code sample), and | ||
| * **why** the current behavior is a problem, and what output you expected instead. | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Code sample | ||
| description: > | ||
| Create a [minimal, complete, verifiable example](https://stackoverflow.com/help/mcve). | ||
| Please, paste your code between the ``` backticks below or link to a [gist](https://gist.github.com/). | ||
| value: | | ||
| Code run: | ||
| ```python | ||
| ``` | ||
| Traceback: | ||
| ```text | ||
| ``` | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Anything else? | ||
| description: | | ||
| Links? References? Anything that will give us more context about the issue you are encountering! | ||
| Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. | ||
| validations: | ||
| required: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| name: Question | ||
| description: Ask a question | ||
| title: "[Question] <Please write a comprehensive title after the '[Question]' prefix>" | ||
| labels: [question] | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Checklist | ||
| description: > | ||
| To help keep this issue tracker clean and focused, please make sure that you have | ||
| tried **all** of the following resources before submitting your question. | ||
| options: | ||
| - label: I searched the [documentation](https://{{ project_slug }}.readthedocs.io). | ||
| required: true | ||
| - label: I looked through existing [discussion topics](https://github.com/{{ git_username }}/{{ project_slug }}/discussions). | ||
| required: true | ||
| - label: I looked for [similar issues](https://github.com/{{ git_username }}/{{ project_slug }}/issues). | ||
| required: true | ||
| - label: I looked up my question/problem in a search engine. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Question | ||
| description: Please ask your question. | ||
| validations: | ||
| required: true | ||
49 changes: 49 additions & 0 deletions
49
template/.github/ISSUE_TEMPLATE/03-feature-request.yml.jinja
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| name: Feature request | ||
| description: Suggest an idea for this project | ||
| title: "[ENH] <Please write a comprehensive title after the '[ENH]' prefix>" | ||
| labels: [enhancement] | ||
| body: | ||
| - type: checkboxes | ||
| attributes: | ||
| label: Checklist | ||
| description: > | ||
| Please make sure you check all these items before submitting your feature request. | ||
| options: | ||
| - label: There are [no similar issues or pull requests](https://github.com/{{ git_username }}/{{ project_slug }}/issues) for this yet. | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Problem | ||
| description: > | ||
| A clear and concise description of what you are trying to achieve. | ||
| placeholder: > | ||
| "I want to be able to [...], but I can't because [...]". | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Solution | ||
| description: > | ||
| A clear and concise description of what you would want to happen. | ||
| For API changes, try to provide a code snippet of what you would like the new API to look like. | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Alternatives | ||
| description: > | ||
| Please describe any alternative solutions or features you've considered to solve | ||
| your problem and why they didn't help. | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| attributes: | ||
| label: Anything else? | ||
| description: > | ||
| Provide any additional context, screenshots, tracebacks, etc. about the feature here. | ||
| validations: | ||
| required: false |
21 changes: 21 additions & 0 deletions
21
template/.github/ISSUE_TEMPLATE/04-documentation.yml.jinja
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Documentation | ||
| description: Report an issue related to the {{ project_slug }} documentation. | ||
| title: "[DOC] <Please write a comprehensive title after the '[DOC]' prefix>" | ||
| labels: [documentation] | ||
|
|
||
| body: | ||
| - type: textarea | ||
| attributes: | ||
| label: "Issue with current documentation:" | ||
| description: > | ||
| Please make sure to leave a reference to the document/code you're | ||
| referring to. You can also check the development version of the | ||
| documentation and see if this issue has already been addressed at | ||
| https://{{ project_slug }}.readthedocs.io/en/develop/. | ||
| - type: textarea | ||
| attributes: | ||
| label: "Idea or request for content:" | ||
| description: > | ||
| Please describe as clearly as possible what topics you think are missing | ||
| from the current documentation. Make sure to check the Examples | ||
| https://pyfar-gallery.readthedocs.io/en/latest/examples |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,10 @@ def test_project_folder(default_project): | |
| "pyproject.toml", | ||
| "my_project/__init__.py", | ||
| "my_project/my_project.py", | ||
| ".github/ISSUE_TEMPLATE/01-bug-report.yml", | ||
| ".github/ISSUE_TEMPLATE/02-question.yml", | ||
| ".github/ISSUE_TEMPLATE/03-feature-request.yml", | ||
| ".github/ISSUE_TEMPLATE/04-documentation.yml", | ||
| ]) | ||
| def test_generated_file_exists(default_project, file_name): | ||
| assert default_project.project_dir.joinpath(file_name).exists() | ||
|
|
@@ -110,3 +114,21 @@ def test_content_project_slug_init(default_project, desired): | |
| content = default_project.project_dir.joinpath('my_project').joinpath( | ||
| "__init__.py").read_text() | ||
| assert desired in content, f"{desired!r} is not in content" | ||
|
|
||
|
|
||
| @pytest.mark.parametrize("file_name", [ | ||
| ".github/ISSUE_TEMPLATE/01-bug-report.yml", | ||
| ".github/ISSUE_TEMPLATE/02-question.yml", | ||
| ".github/ISSUE_TEMPLATE/03-feature-request.yml", | ||
| ]) | ||
| def test_content_github_issue_template(default_project, file_name): | ||
| content = default_project.project_dir.joinpath(file_name).read_text() | ||
| desired = 'https://github.com/pyfar/my_project/issues' | ||
| assert desired in content, f"{desired!r} is not in content" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function replaces the previous functions |
||
|
|
||
|
|
||
| def test_content_github_04_documentation(default_project): | ||
| content = default_project.project_dir.joinpath( | ||
| ".github/ISSUE_TEMPLATE/04-documentation.yml").read_text() | ||
| desired = 'https://my_project.readthedocs.io/en/develop/.' | ||
| assert desired in content, f"{desired!r} is not in content" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont use discussions right now, so I would remove this point.