mirror of
https://github.com/satwikkansal/wtfpython
synced 2024-12-22 04:40:08 +01:00
#269: Update CONTRIBUTING guidelines, add PR and issue templates
- Add issue templates for bugs, translations and new snippets - Add PR templates for general purpose, new snippets and translations
This commit is contained in:
parent
ebfa77e509
commit
cc704cebb4
25
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
25
.github/ISSUE_TEMPLATE/bug.md
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
---
|
||||||
|
name: Bug report
|
||||||
|
about: Bug template
|
||||||
|
title: 'Fix ...'
|
||||||
|
labels: 'bug'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hi, thanks for submitting a bug. We appreciate that.
|
||||||
|
|
||||||
|
But, we will need some information about what's wrong to help you.
|
||||||
|
-->
|
||||||
|
## What's wrong
|
||||||
|
|
||||||
|
<!-- Describe what is not working. -->
|
||||||
|
|
||||||
|
## How it should work?
|
||||||
|
|
||||||
|
<!-- Describe how it should work. -->
|
||||||
|
|
||||||
|
## Checklist before calling for maintainers
|
||||||
|
|
||||||
|
* [ ] Have you checked to ensure there aren't other open [Issues](../../../issues) for the same problem?
|
||||||
|
|
23
.github/ISSUE_TEMPLATE/new_snippet.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/new_snippet.md
vendored
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
name: New snippet
|
||||||
|
about: New snippet template
|
||||||
|
title: 'New snippet: ...'
|
||||||
|
labels: 'new snippets'
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Hi, thanks for submitting a new snippet. We appreciate that.
|
||||||
|
|
||||||
|
But, we will need some information and (optionally) explanation to accept it.
|
||||||
|
-->
|
||||||
|
## Description
|
||||||
|
|
||||||
|
## Snippet preview
|
||||||
|
|
||||||
|
## Checklist before calling for maintainers
|
||||||
|
|
||||||
|
* [ ] Have you checked to ensure there aren't other open [Issues](../../../issues) for the same update/change?
|
||||||
|
* [ ] Have you checked that this snippet is not similar to any of the existing snippets?
|
||||||
|
<!--Explanation is optional. You may suggest a snippet without deepp understanding of its behavior.-->
|
||||||
|
* [ ] Have you added an `Explanation` section? It shall include the reasons of changes and why you'd like us to include them
|
||||||
|
|
13
.github/ISSUE_TEMPLATE/translation.md
vendored
Normal file
13
.github/ISSUE_TEMPLATE/translation.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
name: Translation
|
||||||
|
about: New translation template
|
||||||
|
title: 'Tranlate to ...'
|
||||||
|
labels: 'translations'
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!--Hi, thanks for suggesting a new translation. We appreciate that.-->
|
||||||
|
## Checklist before calling for maintainers
|
||||||
|
|
||||||
|
* [ ] Have you checked to ensure there aren't other open [Issues](../../../issues) for the same tranlation?
|
||||||
|
* [ ] Do you wish to make a translation by yourself?
|
15
.github/PULL_REQUEST_TEMPLATE/new_snippet.md
vendored
Normal file
15
.github/PULL_REQUEST_TEMPLATE/new_snippet.md
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## #(issue number): Summarize your changes
|
||||||
|
|
||||||
|
<!--- This project only accepts pull requests related to open issuesIf
|
||||||
|
Please discuss all questions in an issue first -->
|
||||||
|
<!--- Special phrase to auto-close the issue that your PR fixes -->
|
||||||
|
Closes # (issue number)
|
||||||
|
|
||||||
|
## Checklist before requesting a review
|
||||||
|
|
||||||
|
- [ ] Have you written simple and understandable explanation?
|
||||||
|
- [ ] Have you added new snippet into `snippets/` with suitable name and number?
|
||||||
|
- [ ] Have you updated Table of content? (later will be done by pre-commit)
|
||||||
|
- [ ] Have you followed the guidelines in [CONTRIBUTING.md](../../CONTRIBUTING.md)?
|
||||||
|
- [ ] Have you performed a self-review?
|
||||||
|
- [ ] Have you added yourself into [CONTRIBUTORS.md](../../CONTRIBUTORS.md)?
|
13
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
13
.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
## #(issue number): Summarize your changes
|
||||||
|
|
||||||
|
<!--Please include the reasons behind these changes and any relevant context.
|
||||||
|
This project only accepts pull requests related to open issues -->
|
||||||
|
<!--- Special phrase to auto-close the issue that your PR fixes -->
|
||||||
|
Closes # (issue number)
|
||||||
|
|
||||||
|
## Checklist before requesting a review
|
||||||
|
|
||||||
|
- [ ] Have you followed the guidelines in [CONTRIBUTING.md](../../CONTRIBUTING.md)?
|
||||||
|
- [ ] Have you performed a self-review?
|
||||||
|
- [ ] Have you added yourself into [CONTRIBUTORS.md](../../CONTRIBUTORS.md)?
|
||||||
|
|
13
.github/PULL_REQUEST_TEMPLATE/translation.md
vendored
Normal file
13
.github/PULL_REQUEST_TEMPLATE/translation.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
## #(issue number): Translate to ...
|
||||||
|
|
||||||
|
<!--- This project only accepts pull requests related to open issues -->
|
||||||
|
<!--- Special phrase to auto-close the issue that your PR fixes -->
|
||||||
|
Closes # (issue number)
|
||||||
|
|
||||||
|
## Checklist before requesting a review
|
||||||
|
|
||||||
|
- [ ] Have you fetched the latest `master` branch?
|
||||||
|
- [ ] Have you translated all snippets?
|
||||||
|
- [ ] Have you followed the guidelines in [CONTRIBUTING.md](../../CONTRIBUTING.md)?
|
||||||
|
- [ ] Have you performed a self-review?
|
||||||
|
- [ ] Have you added yourself into [CONTRIBUTORS.md](../../CONTRIBUTORS.md)?
|
46
CONTRIBUTING.md
vendored
46
CONTRIBUTING.md
vendored
@ -1,8 +1,19 @@
|
|||||||
|
# Contributing
|
||||||
|
|
||||||
|
## Getting Started
|
||||||
|
|
||||||
|
Contributions are made to this repo via Issues and Pull Requests (PRs). A few general guidelines that cover both:
|
||||||
|
|
||||||
|
- Search for existing Issues and PRs before creating your own.
|
||||||
|
- We work hard to makes sure issues are handled in a timely manner but, depending on the impact, it could take a while to investigate the root cause. A friendly ping in the comment thread to the submitter or a contributor can help draw attention if your issue is blocking.
|
||||||
|
|
||||||
|
## Issues
|
||||||
|
|
||||||
All kinds of patches are welcome. Feel free to even suggest some catchy and funny titles for the existing Examples. The goal is to make this collection as interesting to read as possible. Here are a few ways through which you can contribute,
|
All kinds of patches are welcome. Feel free to even suggest some catchy and funny titles for the existing Examples. The goal is to make this collection as interesting to read as possible. Here are a few ways through which you can contribute,
|
||||||
|
|
||||||
- If you are interested in translating the project to another language (some people have done that in the past), please feel free to open up an issue, and let me know if you need any kind of help.
|
- If you are interested in translating the project to another language, please feel free to open up an issue using `translation` template, and let me know if you need any kind of help.
|
||||||
- If the changes you suggest are significant, filing an issue before submitting the actual patch will be appreciated. If you'd like to work on the issue (highly encouraged), you can mention that you're interested in working on it while creating the issue and get assigned to it.
|
- If the changes you suggest are significant, filing an issue before submitting the actual patch will be appreciated. If you'd like to work on the issue (highly encouraged), you can mention that you're interested in working on it while creating the issue and get assigned to it.
|
||||||
- If you're adding a new example, it is highly recommended to create an issue to discuss it before submitting a patch. You can use the following template for adding a new example:
|
- If you're adding a new example, it is highly recommended to create an issue using `new_snippet` template to discuss it before submitting a patch. You can use the following template for adding a new example:
|
||||||
|
|
||||||
<pre>
|
<pre>
|
||||||
### ▶ Some fancy Title *
|
### ▶ Some fancy Title *
|
||||||
@ -33,31 +44,22 @@ Probably unexpected output
|
|||||||
```
|
```
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
## Pull requests
|
||||||
|
|
||||||
Few things that you can consider while writing an example,
|
|
||||||
|
|
||||||
- If you are choosing to submit a new example without creating an issue and discussing, please check the project to make sure there aren't similar examples already.
|
|
||||||
- Try to be consistent with the namings and the values you use with the variables. For instance, most variable names in the project are along the lines of `some_string`, `some_list`, `some_dict`, etc. You'd see a lot of `x`s for single letter variable names, and `"wtf"` as values for strings. There's no strictly enforced scheme in the project as such, but you can take a glance at other examples to get a gist.
|
- Try to be consistent with the namings and the values you use with the variables. For instance, most variable names in the project are along the lines of `some_string`, `some_list`, `some_dict`, etc. You'd see a lot of `x`s for single letter variable names, and `"wtf"` as values for strings. There's no strictly enforced scheme in the project as such, but you can take a glance at other examples to get a gist.
|
||||||
- Try to be as creative as possible to add that element of "surprise" in the setting up part of an example. Sometimes this may mean writing a snippet a sane programmer would never write.
|
- Try to be as creative as possible to add that element of "surprise" in the setting up part of an example. Sometimes this may mean writing a snippet a sane programmer would never write.
|
||||||
- Also, feel free to add your name to the [contributors list](/CONTRIBUTORS.md).
|
- Also, feel free to add your name to the [contributors list](/CONTRIBUTORS.md).
|
||||||
|
|
||||||
**Some FAQs**
|
## Common questions
|
||||||
|
|
||||||
What is is this after every snippet title (###) in the README: <!-- Example ID: 30f1d3fc-e267-4b30-84ef-4d9e7091ac1a --->? Should it be added manually or can it be ignored when creating new snippets?
|
- What is is this after every snippet title (###) in the README: <!-- Example ID: 30f1d3fc-e267-4b30-84ef-4d9e7091ac1a --->? Should it be added manually or can it be ignored when creating new snippets?
|
||||||
|
- That's a random UUID, it is used to keep identify the examples across multiple translations of the project. As a contributor, you don't have to worry about behind the scenes of how it is used, you just have to add a new random UUID to new examples in that format.
|
||||||
That's a random UUID, it is used to keep identify the examples across multiple translations of the project. As a contributor, you don't have to worry about behind the scenes of how it is used, you just have to add a new random UUID to new examples in that format.
|
- Where should new snippets be added? Top/bottom of the section, doesn't ?
|
||||||
|
- There are multiple things that are considered to decide the order (the dependency on the other examples, difficulty level, category, etc). I'd suggest simply adding the new example at the bottom of a section you find more fitting (or just add it to the Miscellaneous section). Its order will be taken care of in future revisions.
|
||||||
Where should new snippets be added? Top/bottom of the section, doesn't ?
|
- What's the difference between the sections (the first two feel very similar)?
|
||||||
|
- The section "Strain your brain" contains more contrived examples that you may not really encounter in real life, whereas the section "Slippery Slopes" contains examples that have the potential to be encountered more frequently while programming.
|
||||||
There are multiple things that are considered to decide the order (the dependency on the other examples, difficulty level, category, etc). I'd suggest simply adding the new example at the bottom of a section you find more fitting (or just add it to the Miscellaneous section). Its order will be taken care of in future revisions.
|
- Before the table of contents it says that `markdown-toc -i README.md --maxdepth 3` was used to create it. The pip package `markdown-toc` does not contain neither `-i` nor `--maxdepth` flags. Which package is meant, or what version of that package? Should the new table of contents entry for the snippet be created with the above command or created manually (in case the above command does more than only add the entry)?
|
||||||
|
- `markdown-toc` will be replaced in the near future, follow the [issue](https://github.com/satwikkansal/wtfpython/issues/351) to check the progress.
|
||||||
What's the difference between the sections (the first two feel very similar)?
|
- We use the [markdown-toc](https://www.npmjs.com/package/markdown-toc) npm package to generate ToC. It has some issues with special characters though (I'm not sure if it's fixed yet). More often than not, I just end up inserting the toc link manually at the right place. The tool is handy when I have to big reordering, otherwise just updating toc manually is more convenient imo.
|
||||||
|
|
||||||
The section "Strain your brain" contains more contrived examples that you may not really encounter in real life, whereas the section "Slippery Slopes" contains examples that have the potential to be encountered more frequently while programming.
|
|
||||||
|
|
||||||
Before the table of contents it says that markdown-toc -i README.md --maxdepth 3 was used to create it. The pip package markdown-toc does not contain either -i or --maxdepth flags. Which package is meant, or what version of that package?
|
|
||||||
Should the new table of contents entry for the snippet be created with the above command or created manually (in case the above command does more than only add the entry)?
|
|
||||||
|
|
||||||
We use the [markdown-toc](https://www.npmjs.com/package/markdown-toc) npm package to generate ToC. It has some issues with special characters though (I'm not sure if it's fixed yet). More often than not, I just end up inserting the toc link manually at the right place. The tool is handy when I have to big reordering, otherwise just updating toc manually is more convenient imo.
|
|
||||||
|
|
||||||
If you have any questions feel free to ask on [this issue](https://github.com/satwikkansal/wtfpython/issues/269) (thanks to [@LiquidFun](https://github.com/LiquidFun) for starting it).
|
If you have any questions feel free to ask on [this issue](https://github.com/satwikkansal/wtfpython/issues/269) (thanks to [@LiquidFun](https://github.com/LiquidFun) for starting it).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user