Skip to content

Commit

Permalink
Feat: Add Open Source Contribution Templates (#118)
Browse files Browse the repository at this point in the history
* add issue templates

* pull request template

* create a contributing guide

* add initial code_of_conduct
  • Loading branch information
shivaylamba authored Dec 5, 2021
1 parent 2cee216 commit 7e12ea8
Show file tree
Hide file tree
Showing 6 changed files with 190 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
**Description**

This PR fixes #

<!--
Thank you for contributing to Robyn!
Contributing Conventions:
1. Include descriptive PR titles.
2. Build and test your changes before submitting a PR.
-->
27 changes: 27 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: 🐛 Bug Report
about: Report an issue to help us improve
title: '[BUG]'
labels: 'kind/bug'
assignees: ''
---
**Description**
<!-- A brief description of the issue. -->

**Expected Behavior**
<!-- A brief description of what you expected to happen. -->

**Screenshots**
<!-- Add screenshots, if applicable, to help explain your problem. -->

**Environment:**
- Host OS:
- Browser:

---


[Optional] **Additional Context**
<!-- Add any other context about the problem here. -->

---
21 changes: 21 additions & 0 deletions .github/workflows/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: 💡 Feature request
about: Suggest an enhancement to Robyn
title: '[Feature Request]'
labels: 'kind/enhancement'
assignees: ''
---
**Current Behavior**
<!-- A brief description of what the problem is. (e.g. I need to be able to...) -->

**Desired Behavior**
<!-- A brief description of the enhancement. -->

---
**Screenshots / Mockups**
<!-- Add any other context or screenshots about the feature request here. -->

**Alternatives**
<!-- A brief description of any alternative solutions or features you've considered. -->

---
6 changes: 6 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Robyn Open Source Community Guidelines

- **Be friendly and patient**.
- **Be welcoming**.
- **Be respectful**.
- **Be careful in the words that we choose**.
122 changes: 122 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
## Contributing Guidelines

First off, thank you for considering contributing to ```Robyn```. This guide details all the general information that one should know before contributing to the project.
Please stick as close as possible to the guidelines. That way we ensure that you have a smooth experience contributing to this project.

### General Rules :
These are in general rules that you should be following while contributing to an Open Source project :

- Be Nice, Be Respectful (BNBR)
- Check if the Issue you created, exists or not.
- While creating a new issue make sure you describe the issue clearly.
- Make proper commit messages and document your PR well.
- Always add Comments in your Code and explain it at points, if possible add Doctest.
- Always create a Pull Request from a Branch; Never from the Main.
- Follow proper code conventions because writing clean code is important.
- Issues would be assigned on a "First Come, First Serve" basis.
- Do mention (@maintainer) the project maintainer if your PR isn't reviewed within few days.

## First time contributors :

Pushing files in your own repository is easy but how to contribute to someone else's project? If you have the same question then below are the steps that you can follow
to make your first contribution in this repoitory.


### Pull Request

**1.** The very first step includes forking the project. Click on the ```fork``` button as shown below to fork the project.
<br><br><img src="https://i.imgur.com/7wapvt2.png" width="750" /><br>

**2.** Clone the forked repository. Open up the GitBash/Command Line and type

```
git clone https://github.com/<YOUR_USER_NAME>/robyn.git
```

**3.** Navigate to the project directory.

```
cd robyn
```
**4.** Add a reference to the original repository.

```
git remote add upstream https://github.com/sansyrox/robyn.git
```

**5.** See latest changes to the repo using

```
git remote -v
```

**6.** Create a new branch.

```
git checkout -b <YOUR_BRANCH_NAME>
```

**7.** Always take a pull from the upstream repository to your main branch to keep it even with the main project. This will save your from frequent merge conflicts.

```
git pull upstream main
```

**8.** You can make the required changes now. Make appropriate commits with proper commit messages.

**9.** Add and then commit your changes.

```
git add .
```
```
git commit -m "<YOUR_COMMIT_MESSAGE>"
```


**10.** Push your local branch to the remote repository.

```
git push -u origin <YOUR_BRANCH_NAME>
```

**11.** Once you have pushed the changes to your repository, go to your forked repository. Click on the ```Compare & pull request``` button as shown below.
<br><br><img src="https://hisham.hm/img/posts/github-comparepr.png" width="750" /><br>


**12.** The image below is how the new page would look like. Give a proper title to your PR and describe the changes made by you in the description box.(Note - Sometimes there are PR templates which is to be filled as instructed.)
<br><br><img src="https://github.blog/wp-content/uploads/2019/02/draft-pull-requests.png?fit=1354%2C780" width="750" /><br>


**13.** Open a pull request by clicking the ```Create pull request``` button.

```Voila, you have made your first contribution to this project```

## Issue

- Issues can be used to keep track of bugs, enhancements, or other requests. Creating an issue to let the project maintainers know about the changes your are
planning to make before raising a PR is a good open source practice.
<br>

Lets walkthrough the steps to create an issue:

**1.** On GitHub navigate to the main page of the repository. [Here](https://github.com/sansyrox/robyn.git) in this case.


**2.** Under your repository name, click on the ```Issues``` button.
<br><br><img src="https://www.stevejgordon.co.uk/wp-content/uploads/2018/01/GitHubIssueTab.png" width="750" /><br>


**3.** Click on the ```New issue``` button.
<br><br><img src="https://miro.medium.com/max/3696/1*8jiGiKhMdVQDycWSAbjB8A.png" width="750" /><br>

**4.** Select one of the Issue Templates to get started.
<br><br><img src="https://i.imgur.com/xz2KAwU.png" width="750" /><br>

**4.** Fill in the appropriate ```Title``` and ```Issue description``` and click on ```Submit new issue```.
<br><br><img src="https://i.imgur.com/XwjtGG1.png" width="750" /><br>

### Tutorials that may help you :

- [Git & GitHub Tutorial](https://www.youtube.com/watch?v=RGOj5yH7evk)
- [Resolve merge conflict](https://docs.github.com/en/free-pro-team@latest/github/collaborating-with-issues-and-pull-requests/resolving-a-merge-conflict-on-github)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ optional arguments:

## Contributors/Supporters

To contribute to Robyn, make sure to first go through the [CONTRIBUTING.md](./CONTRIBUTING.md).

Thanks to all the contributors of the project. Robyn will not be what it is without all your support :heart:.

Special thanks to the [ PyO3 ](https://pyo3.rs/v0.13.2/) community and [ Andrew from PyO3-asyncio ](awestlake87/pyo3-asyncio) for their amazing libraries and their support for my queries. 💖

0 comments on commit 7e12ea8

Please sign in to comment.