diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index a79e5a368..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,80 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: "[BUG]" -labels: bug -assignees: '' - ---- - -### Describe the bug - -Write here a clear and concise description of what the bug is. - -### To Reproduce - -Steps to reproduce the behavior with a minimum self-contained file. - -Replace each part with your own scenario: - -* Create a file `main.py` with: - -```Python -import typer - -app = typer.Typer() - - -@app.command() -def hello(name: str): - typer.echo(f"Hello {name}") - - -if __name__ == "__main__": - app() -``` - -* Call it with: - -```bash -python main.py Camila -``` - -* It outputs: - -``` -Hello Camila -``` - -* But I expected it to output: - -``` -Hello World -``` - -### Expected behavior - -Add a clear and concise description of what you expected to happen. - -### Screenshots - -If applicable, add screenshots to help explain your problem. - -### Environment - -* OS: [e.g. Linux / Windows / macOS] -* Typer Version [e.g. 0.3.0], get it with: - -```bash -python -c "import typer; print(typer.__version__)" -``` - -* Python version, get it with: - -```bash -python --version -``` - -### Additional context - -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 000000000..55749398f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +blank_issues_enabled: false +contact_links: + - name: Security Contact + about: Please report security vulnerabilities to security@tiangolo.com diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 000000000..2b7f2d3c0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,179 @@ +name: Feature Request +description: Suggest an idea or ask for a feature that you would like to have in Typer +labels: [enhancement] +body: + - type: markdown + attributes: + value: | + Thanks for your interest in Typer! 🚀 + + Please follow these instructions, fill every question, and do every step. 🙏 + + I'm asking this because answering questions and solving problems in GitHub issues is what consumes most of the time. + + I end up not being able to add new features, fix bugs, review pull requests, etc. as fast as I wish because I have to spend too much time handling issues. + + All that, on top of all the incredible help provided by a bunch of community members that give a lot of their time to come here and help others. + + If more Typer users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅). + + By asking questions in a structured way (following this) it will be much easier to help you. + + And there's a high chance that you will find the solution along the way and you won't even have to submit it and wait for an answer. 😎 + + As there are too many issues with questions, I'll have to close the incomplete ones. That will allow me (and others) to focus on helping people like you that follow the whole process and help us help you. 🤓 + - type: checkboxes + id: checks + attributes: + label: First Check + description: Please confirm and check all the following options. + options: + - label: I added a very descriptive title to this issue. + required: true + - label: I used the GitHub search to find a similar issue and didn't find it. + required: true + - label: I searched the Typer documentation, with the integrated search. + required: true + - label: I already searched in Google "How to X in Typer" and didn't find any information. + required: true + - label: I already read and followed all the tutorial in the docs and didn't find an answer. + required: true + - label: I already checked if it is not related to Typer but to [Click](https://github.com/pallets/click). + required: true + - type: checkboxes + id: help + attributes: + label: Commit to Help + description: | + After submitting this, I commit to one of: + + * Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there. + * I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future. + * Implement a Pull Request for a confirmed bug. + + options: + - label: I commit to help with one of those options 👆 + required: true + - type: textarea + id: example + attributes: + label: Example Code + description: | + Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case. + + If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you. + + placeholder: | + import typer + + + def main(name: str): + typer.echo(f"Hello {name}") + + + if __name__ == "__main__": + typer.run(main) + render: python + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: | + What is your feature request? + + Write a short description telling me what you are trying to solve and what you are currently doing. + placeholder: | + * Create a Typer CLI that says "Hello". + * Run it on the command line without a name. + * I would like it to use Privacy-Aware Artificial Intelligence based on Block Chain and predict my name without me typing it. + validations: + required: true + - type: textarea + id: wanted-solution + attributes: + label: Wanted Solution + description: | + Tell me what's the solution you would like. + placeholder: | + I would like it to say my name without me having to type it. + validations: + required: true + - type: textarea + id: wanted-code + attributes: + label: Wanted Code + description: Show me an example of how you would want the code to look like. + placeholder: | + import typer + + + def main(name: str): + typer.guess_name(f"Hello {name}") + + + if __name__ == "__main__": + typer.run(main) + render: python + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Alternatives + description: | + Tell me about alternatives you've considered. + placeholder: | + To hardcode my name, so that if I don't type it it will be the default. + - type: dropdown + id: os + attributes: + label: Operating System + description: What operating system are you on? + multiple: true + options: + - Linux + - Windows + - macOS + - Other + validations: + required: true + - type: textarea + id: os-details + attributes: + label: Operating System Details + description: You can add more details about your operating system here, in particular if you chose "Other". + - type: input + id: typer-version + attributes: + label: Typer Version + description: | + What Typer version are you using? + + You can find the Typer version with: + + ```bash + python -c "import typer; print(typer.__version__)" + ``` + validations: + required: true + - type: input + id: python-version + attributes: + label: Python Version + description: | + What Python version are you using? + + You can find the Python version with: + + ```bash + python --version + ``` + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any additional context information or screenshots you think are useful. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 15b94028e..000000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: "[FEATURE]" -labels: enhancement -assignees: '' - ---- - -### Is your feature request related to a problem - -Is your feature request related to a problem? - -Add a clear and concise description of what the problem is. Ex. I want to be able to [...] but I can't because [...] - -### The solution you would like - -Add a clear and concise description of what you want to happen. - -### Describe alternatives you've considered - -Add a clear and concise description of any alternative solutions or features you've considered. - -### Additional context - -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index b11fc415b..000000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -name: Question -about: Ask a question -title: "[QUESTION]" -labels: question -assignees: '' - ---- - -### First check - -* [ ] I used the GitHub search to find a similar issue and didn't find it. -* [ ] I searched the Typer documentation, with the integrated search. -* [ ] I already searched in Google "How to X in Typer" and didn't find any information. -* [ ] I already searched in Google "How to X in Click" and didn't find any information. - -### Description - -How can I [...]? - -Is it possible to [...]? - -### Additional context - -Add any other context or screenshots about the feature request here. diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 000000000..e947e0931 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,145 @@ +name: Question or Problem +description: Ask a question or ask about a problem +labels: [question] +body: + - type: markdown + attributes: + value: | + Thanks for your interest in Typer! 🚀 + + Please follow these instructions, fill every question, and do every step. 🙏 + + I'm asking this because answering questions and solving problems in GitHub issues is what consumes most of the time. + + I end up not being able to add new features, fix bugs, review pull requests, etc. as fast as I wish because I have to spend too much time handling issues. + + All that, on top of all the incredible help provided by a bunch of community members that give a lot of their time to come here and help others. + + If more Typer users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅). + + By asking questions in a structured way (following this) it will be much easier to help you. + + And there's a high chance that you will find the solution along the way and you won't even have to submit it and wait for an answer. 😎 + + As there are too many issues with questions, I'll have to close the incomplete ones. That will allow me (and others) to focus on helping people like you that follow the whole process and help us help you. 🤓 + - type: checkboxes + id: checks + attributes: + label: First Check + description: Please confirm and check all the following options. + options: + - label: I added a very descriptive title to this issue. + required: true + - label: I used the GitHub search to find a similar issue and didn't find it. + required: true + - label: I searched the Typer documentation, with the integrated search. + required: true + - label: I already searched in Google "How to X in Typer" and didn't find any information. + required: true + - label: I already read and followed all the tutorial in the docs and didn't find an answer. + required: true + - label: I already checked if it is not related to Typer but to [Click](https://github.com/pallets/click). + required: true + - type: checkboxes + id: help + attributes: + label: Commit to Help + description: | + After submitting this, I commit to one of: + + * Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there. + * I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future. + * Implement a Pull Request for a confirmed bug. + + options: + - label: I commit to help with one of those options 👆 + required: true + - type: textarea + id: example + attributes: + label: Example Code + description: | + Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case. + + If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you. + + placeholder: | + import typer + + + def main(name: str): + typer.echo(f"Hello {name}") + + + if __name__ == "__main__": + typer.run(main) + render: python + validations: + required: true + - type: textarea + id: description + attributes: + label: Description + description: | + What is the problem, question, or error? + + Write a short description telling me what you are doing, what you expect to happen, and what is currently happening. + placeholder: | + * Create a small Typer script. + * Open a Terminal with Ninja-Turtle-Shell. + * Trigger autocompletion hitting TAB. + * I don't see any completion in the terminal using Ninja-Turtle-Shell. + * I expected to see autocompletion there. + validations: + required: true + - type: dropdown + id: os + attributes: + label: Operating System + description: What operating system are you on? + multiple: true + options: + - Linux + - Windows + - macOS + - Other + validations: + required: true + - type: textarea + id: os-details + attributes: + label: Operating System Details + description: You can add more details about your operating system here, in particular if you chose "Other". + - type: input + id: typer-version + attributes: + label: Typer Version + description: | + What Typer version are you using? + + You can find the Typer version with: + + ```bash + python -c "import typer; print(typer.__version__)" + ``` + validations: + required: true + - type: input + id: python-version + attributes: + label: Python Version + description: | + What Python version are you using? + + You can find the Python version with: + + ```bash + python --version + ``` + validations: + required: true + - type: textarea + id: context + attributes: + label: Additional Context + description: Add any additional context information or screenshots you think are useful. diff --git a/docs/release-notes.md b/docs/release-notes.md index 97b22f4f9..ce125b293 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -4,6 +4,7 @@ * 👷 Update docs CI name. PR [#320](https://github.com/tiangolo/typer/pull/320) by [@tiangolo](https://github.com/tiangolo). * 🔧 Add sponsors docs and badge. PR [#319](https://github.com/tiangolo/typer/pull/319) by [@tiangolo](https://github.com/tiangolo). * ✨ Add support for Click 8 while keeping compatibility with Click 7. PR [#317](https://github.com/tiangolo/typer/pull/317) by [@tiangolo](https://github.com/tiangolo). + ## 0.3.2 ### Features