Skip to content

Commit 4889ff3

Browse files
authored
Update CONTRIBUTING.md and add Issue, PR templates (#326)
* Update CONTRIBUTING.md and add ISSUE templates * Address PR comments
1 parent c1675b3 commit 4889ff3

File tree

5 files changed

+216
-23
lines changed

5 files changed

+216
-23
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Bug Report
2+
description: Report a software bug on Turing components.
3+
labels: ['type: bug', 'status: waiting triage']
4+
body:
5+
- type: dropdown
6+
attributes:
7+
label: Turing Component
8+
description: What Turing component is this issue related to?
9+
multiple: true
10+
options:
11+
- API
12+
- Router
13+
- Experiment Engine Plugin
14+
- Pyfunc Ensembler
15+
- Batch Ensembler
16+
- SDK
17+
- UI
18+
- Others
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Describe the Issue
24+
description: A clear and concise description of the issue you encountered.
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: Steps to Reproduce
30+
description: Please provide the steps to reproduce the issue.
31+
value: |
32+
1.
33+
2.
34+
3.
35+
validations:
36+
required: true
37+
- type: textarea
38+
attributes:
39+
label: Expected behavior
40+
description: A clear and concise description of what you expected to happen.
41+
validations:
42+
required: true
43+
- type: textarea
44+
attributes:
45+
label: System
46+
description: Add your system information which surfaced this bug.
47+
value: |
48+
- Device: [e.g. Macbook, Windows Laptop]
49+
- OS: [e.g. macOS Monterey, Windows 10, Ubuntu 20.04]
50+
- Browser: [e.g. Chrome, Safari]
51+
- Version: [e.g. 22]
52+
validations:
53+
required: true
54+
- type: textarea
55+
attributes:
56+
label: Additional context
57+
description: Add any other context about the problem here. Or, screenshots (if applicable) to help explain your problem. You can drag and drop `png`, `jpg`, `gif`, etc. in this box.
58+
validations:
59+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Support Request
4+
url: https://github.com/caraml-dev/turing/blob/main/CONTRIBUTING.md#question
5+
about: Questions and requests for support
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Feature Request
2+
description: Request a new feature for Turing components.
3+
labels: ['type: feature request']
4+
body:
5+
- type: textarea
6+
attributes:
7+
label: Is your feature request related to a problem? Please describe.
8+
description: A clear and concise description of what the problem is. Ex. I'm facing [...] when trying to [...]
9+
validations:
10+
required: true
11+
- type: textarea
12+
attributes:
13+
label: Describe the solution you would like
14+
description: A clear and concise description of what you want to happen.
15+
validations:
16+
required: true
17+
- type: textarea
18+
attributes:
19+
label: Describe alternatives you have considered
20+
description: A clear and concise description of any alternative solutions or features you have considered.
21+
validations:
22+
required: true
23+
- type: textarea
24+
attributes:
25+
label: Additional context
26+
description: Add any other context or screenshots about the feature request here.
27+
validations:
28+
required: false
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!-- Thanks for sending a pull request! Here are some tips for you:
2+
3+
1. Run unit tests and ensure that they are passing
4+
2. If your change introduces any API changes, make sure to update the e2e tests
5+
3. Make sure documentation is updated for your PR!
6+
7+
-->
8+
9+
**What this PR does / why we need it**:
10+
<!-- Explain here the context and why you're making the change. What is the problem you're trying to solve. --->
11+
12+
**Which issue(s) this PR fixes**:
13+
<!--
14+
*Automatically closes linked issue when PR is merged.
15+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
16+
-->
17+
18+
Fixes #
19+
20+
**Does this PR introduce a user-facing change?**:
21+
<!--
22+
If no, just write "NONE" in the release-note block below.
23+
If yes, a release note is required. Enter your extended release note in the block below.
24+
If the PR requires additional action from users switching to the new release, include the string "action required".
25+
26+
For more information about release notes, see kubernetes' guide here: http://git.k8s.io/community/contributors/guide/release-notes.md
27+
-->
28+
29+
```release-note
30+
31+
```

CONTRIBUTING.md

Lines changed: 93 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Contributing to Turing
22

3-
Thank you for your interest in contributing to Turing. This document provides
4-
some suggestions and guidelines on how you can get involved.
5-
6-
## Become a contributor
3+
Thank you for your interest in contributing to Turing.
74

85
You can contribute to Turing in several ways:
96
- Contribute to the Turing codebase
@@ -12,29 +9,102 @@ You can contribute to Turing in several ways:
129
- Create articles and documentation for users and contributors
1310
- Help others answering questions about Turing
1411

15-
### Report bugs
12+
The following sections provide some suggestions and guidelines you should follow:
13+
- [Code of Conduct](#coc)
14+
- [Issues and Bugs](#issue)
15+
- [Feature Requests](#feature)
16+
- [Submission Guidelines](#submit)
17+
- [Coding Rules](#rules)
18+
19+
## <a name="coc"></a> Code of Conduct
20+
21+
Help us keep Turing open and inclusive.
22+
Please read and follow our [Code of Conduct](https://github.com/caraml-dev/turing/blob/main/CODE_OF_CONDUCT.md).
23+
24+
## <a name="issue"></a> Found a Bug?
25+
26+
If you find a bug in the source code, you can help us by [submitting an issue](#submit-issue) to our [GitHub Repository][github].
27+
Even better, you can [submit a Pull Request](#submit-pr) with a fix.
28+
29+
30+
## <a name="feature"></a> Missing a Feature?
31+
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub Repository.
32+
If you would like to *implement* a new feature, please consider the size of the change in order to determine the right steps to proceed:
33+
34+
* For a **Major Feature**, first open an issue and outline your proposal so that it can be discussed.
35+
This process allows us to better coordinate our efforts, prevent duplication of work, and help you to craft the change so that it is successfully accepted into the project.
36+
37+
**Note**: Adding a new topic to the documentation, or significantly re-writing a topic, counts as a major feature.
38+
39+
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
40+
41+
## <a name="submit"></a> Submission Guidelines
42+
43+
### <a name="submit-issue"></a> Submitting an Issue
44+
45+
Before you submit an issue, please search the issue tracker. An issue for your problem might already exist and the discussion might inform you of workarounds readily available.
46+
47+
We want to fix all the issues as soon as possible, but before fixing a bug, we need to reproduce and confirm it.
48+
In order to reproduce bugs, we require that you provide a minimal reproduction.
49+
Having a minimal reproducible scenario gives us the necessary information without going back and forth to you with additional questions.
50+
51+
A minimal reproduction allows us to quickly confirm a bug (or point out a coding problem) as well as confirm that we are fixing the right problem.
52+
53+
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough information to be reproduced.
54+
55+
You can file new issues by selecting from our [new issue templates](https://github.com/caraml-dev/turing/issues/new/choose) and filling out the issue template.
56+
57+
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
58+
59+
Before you submit your Pull Request (PR), consider the following guidelines:
60+
61+
1. Search [GitHub](https://github.com/caraml-dev/turing/pulls) for an open or closed PR that relates to your submission.
62+
You don't want to duplicate existing efforts.
63+
64+
2. Be sure that an issue describes the problem you're fixing, or documents the design for the feature you'd like to add.
65+
Discussing the design upfront helps to ensure that we're ready to accept your work.
66+
67+
3. Fork this Turing repository
68+
4. Create a new branch in your forked repository
69+
5. Commit the changes to the codebase
70+
6. Follow our [Coding Rules](#rules).
71+
7. Make sure all the tests pass
72+
8. Submit a pull request to the main Turing codebase from your forked repository
73+
74+
## <a name="rules"></a> Coding Rules
75+
To ensure consistency throughout the source code, keep these rules in mind as you are working:
76+
77+
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
78+
79+
### Code Style & Linting
80+
81+
We are using [golangci-lint](https://github.com/golangci/golangci-lint), and we can run the following commands for formatting.
82+
83+
```sh
84+
# Formatting for linting issues
85+
make format
86+
87+
# Checking for linting issues
88+
make lint
89+
```
1690

17-
Report a bug by creating an issue. Provide as much information as possible
18-
on how to reproduce the bug.
91+
### Go tests
1992

20-
Before submitting the bug report, please make sure there are no existing issues
21-
with a similar bug report. You can search the existing issues for similar issues.
93+
For **Unit** tests, we follow the convention of keeping it beside the main source file.
2294

23-
### Sugest features
95+
### Pre-commit Hooks
2496

25-
If you have an idea to improve Turing, submit a feature request. It will be good
26-
to describe the use cases and how it will benefit Turing users in your feature
27-
request.
97+
Setup [`pre-commit`](https://pre-commit.com/) to automatically lint and format the codebase on commit:
2898

29-
### Make a pull request
99+
1. Ensure that you have Python (3.7 and above) with `pip`, installed.
100+
2. Install `pre-commit` with `pip` &amp; install pre-push hooks
30101

31-
Submit a pull request to Turing when you want to make changes to Turing
32-
codebase. You can submit pull requests to fix bugs, add new features or
33-
improve our documentation.
102+
```sh
103+
# Clear existing hooks
104+
git config --unset-all core.hooksPath
105+
rm -rf .git/hooks
106+
# Install hooks
107+
make setup
108+
```
34109

35-
The process is normally as follows:
36-
1. Fork this Turing repository
37-
2. Create a new branch in your forked repository
38-
3. Commit the changes to the codebase
39-
4. Make sure all the tests pass
40-
5. Submit a pull request to the main Turing codebase from your forked repository
110+
3. On push, the pre-commit hook will run. This runs `make format` and `make lint`.

0 commit comments

Comments
 (0)