Skip to content

Commit f6795b1

Browse files
Merge pull request #479 from e-korolevskii/main
Update contributors guide
2 parents aa5ddbf + 2e6ca74 commit f6795b1

File tree

1 file changed

+97
-21
lines changed

1 file changed

+97
-21
lines changed

docs/contributors.md

+97-21
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,113 @@
11
# Contributors
22

3-
### Checkin
3+
Thank you for contributing!
44

5-
- Do check in source (`src/`)
6-
- Do check in a single `index.js` file after running `ncc`
7-
- Do not check in `node_modules/`
5+
We have prepared a short guide so that the process of making your contribution is as simple and clear as possible. Please check it out before you contribute!
86

9-
### NCC
7+
## How can I contribute...
108

11-
In order to avoid uploading `node_modules/` to the repository, we use [vercel/ncc](https://github.com/vercel/ncc) to create a single `index.js` file that gets saved in `dist/`.
9+
* [Contribute Documentation:green_book:](#contribute-documentation)
1210

13-
### Developing
11+
* [Contribute Code :computer:](#contribute-code)
1412

15-
If you're developing locally, you can run
13+
* [Provide Support on Issues:pencil:](#provide-support-on-issues)
1614

17-
```sh
18-
npm install
19-
tsc
20-
ncc build src/setup-python.ts
21-
```
15+
* [Review Pull Requests:mag:](#review-pull-requests)
2216

23-
Any files generated using `tsc` will be added to `lib/`, however those files also are not uploaded to the repository and are excluded using `.gitignore`.
17+
## Contribute documentation
2418

25-
During the commit step, Husky will take care of formatting all files with [Prettier](https://github.com/prettier/prettier) (to run manually, use `npm run format`).
19+
Documentation is a super important, critical part of this project. Docs are how we keep track of what we're doing, how, and why. It's how we stay on the same page about our policies and how we tell others everything they need to be able to use this project or contribute to it.
2620

27-
### Testing
21+
Documentation contributions of any size are welcome! Feel free to contribute even if you're just rewording a sentence to be more clear, or fixing a spelling mistake!
2822

29-
We ask that you include a link to a successful run that utilizes the changes you are working on. For example, if your changes are in the branch `newAwesomeFeature`, then show an example run that uses `setup-python@newAwesomeFeature` or `my-fork@newAwesomeFeature`. This will help speed up testing and help us confirm that there are no breaking changes or bugs.
23+
**How to contribute:**
3024

31-
### Licensed
25+
Pull requests are the easiest way to contribute changes to git repos at GitHub. They are the preferred contribution method, as they offer a convenient way of commenting and amending the proposed changes.
3226

33-
This repository uses a tool called [Licensed](https://github.com/github/licensed) to verify third party dependencies. You may need to locally install licensed and run `licensed cache` to update the dependency cache if you install or update a production dependency. If licensed cache is unable to determine the dependency, you may need to modify the cache file yourself to put the correct license. You should still verify the dependency, licensed is a tool to help, but is not a substitute for human review of dependencies.
27+
- Please check that no one else has already created a pull request with these or similar changes
28+
- Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request
29+
- Make sure your changes are formatted properly and consistently with the rest of the documentation
30+
- Re-read what you wrote, and run a spellchecker on it to make sure you didn't miss anything
31+
- If your pull request is connected to an open issue, please, leave a link to this issue in the `Related issue:` section
32+
- If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then push them. The pull request gets automatically updated
3433

35-
### Releases
34+
**Once you've filed the pull request:**
3635

37-
There is a `master` branch where contributor changes are merged into. There are also release branches such as `releases/v1` that are used for tagging (for example the `v1` tag) and publishing new versions of the action. Changes from `master` are periodically merged into a releases branch. You do not need to create any PR that merges changes from master into a releases branch.
36+
- Maintainers will review your pull request
37+
- If a maintainer requests changes, first of all, try to think about this request critically and only after that implement and request another review
38+
- If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag
39+
> Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart:
40+
41+
## Contribute code
42+
43+
We like code commits a lot! They're super handy, and they keep the project going and doing the work it needs to do to be useful to others.
44+
45+
Code contributions of just about any size are acceptable!
46+
47+
The main difference between code contributions and documentation contributions is that contributing code requires the inclusion of relevant tests for the code being added or changed. Contributions without accompanying tests will be held off until a test is added unless the maintainers consider the specific tests to be either impossible or way too much of a burden for such a contribution.
48+
49+
**How to contribute:**
50+
51+
Pull requests are the easiest way to contribute changes to git repos at GitHub. They are the preferred contribution method, as they offer a convenient way of commenting and amending the proposed changes.
52+
53+
- Please check that no one else has already created a pull request with these or similar changes
54+
- Use a "feature branch" for your changes. That separates the changes in the pull request from your other changes and makes it easy to edit/amend commits in the pull request
55+
- Make sure your changes are well formatted and that all tests are passing
56+
- If your pull request is connected to an open issue, please, leave a link to this issue in the `Related issue:` section
57+
- If you later need to add new commits to the pull request, you can simply commit the changes to the local branch and then push them. The pull request gets automatically updated
58+
59+
**Learn more about how to work with the repository:**
60+
61+
- To implement new features or fix bugs, you need to make changes to the `.ts` files, which are located in the `src` folder
62+
- To comply with the code style, **you need to run the `format` script**
63+
- To transpile source code to `javascript` we use [NCC](https://github.com/vercel/ncc). **It is very important to run the `build` script after making changes**, otherwise your changes will not get into the final `javascript` build
64+
65+
**Learn more about how to implement tests:**
66+
67+
Adding or changing tests is an integral part of making a change to the code.
68+
Unit tests are in the `__tests__` folder, and end-to-end tests are in the `workflows` folder, particularly take a look at the files with `e2e` and `test` prefixes, for instance, [e2e-cache.yml](https://github.com/actions/setup-python/blob/main/.github/workflows/e2e-cache.yml).
69+
70+
- The contributor can add various types of tests (like unit tests or end-to-end tests), which, in his opinion, will be necessary and sufficient for testing new or changed functionality
71+
- Tests should cover a successful execution, as well as some edge cases and possible errors
72+
- As already mentioned, pull requests without tests will be considered more carefully by maintainers. If you are sure that in this situation the tests are not needed or cannot be implemented with a commensurate effort - please add this clarification message to your pull request
73+
74+
**Once you've filed the pull request:**
75+
76+
- CI will start automatically with some checks. Wait until the end of the execution and make sure that all checks passed successfully. If some checks fail, you can open them one by one, try to find the reason for failing and make changes to your code to resolve the problem
77+
- Maintainers will review your pull request
78+
- If a maintainer requests changes, first of all, try to think about his request critically and only after that implement and request another review
79+
- If your PR gets accepted, it will soon be merged into the main branch. But your contribution will take effect only after the release of a new version of the action and updating the major tag
80+
> Sometimes maintainers reject pull requests and that's ok! Usually, along with rejection, we supply the reason for it. Nonetheless, we still really appreciate you taking the time to do it, and we don't take that lightly :heart:
81+
82+
## Provide support on issues
83+
84+
Helping out other users with their questions is an awesome way of contributing to any community. It's not uncommon for most of the issues on open source projects to be support-related questions by users trying to understand something they ran into or find their way around a known bug.
85+
86+
**To help other folks out with their questions:**
87+
88+
- Go to the [issue tracker](https://github.com/actions/setup-python/issues)
89+
- Read through the list until you find something that you're familiar enough with to answer to
90+
- Respond to the issue with whatever details are needed to clarify the question, or get more details about what's going on
91+
- Once the discussion wraps up and things are clarified, ask the original issue filer (or a maintainer) to close it for you
92+
93+
*Some notes on picking up support issues:*
94+
95+
- Avoid responding to issues you don't know you can answer accurately
96+
- Try to refer to past issues with accepted answers as much as possible. Link to them from your replies
97+
- Be kind and patient with users. Often, folks who have run into confusing things might be upset or impatient. This is natural. If you feel uncomfortable in conversation with them, it's better to stay away or withdraw from the issue.
98+
99+
> If some user is violating our code of conduct [standards](https://github.com/actions/setup-python/blob/main/CODE_OF_CONDUCT.md#our-standards), refer to the [enforcement](https://github.com/actions/setup-python/blob/main/CODE_OF_CONDUCT.md#enforcement) section of the Code of Conduct to resolve the conflict
100+
101+
102+
## Review pull requests
103+
104+
105+
Another great way to contribute is to review pull request. Please, be extra kind: people who submit code/doc contributions are putting themselves in a pretty vulnerable position, and have put time and care into what they've done (even if that's not obvious to you!) Please, always respond with respect, and be understanding, but don't feel like you need to sacrifice your standards for their sake, either.
106+
107+
**How to review:**
108+
109+
- Go to the [pull requests](https://github.com/actions/setup-python/pulls)
110+
- Make sure you're familiar with the code or documentation is updated, unless it's a minor change (spellchecking, minor formatting, etc.)
111+
- Review changes using the GitHub functionality. You can ask a clarifying question, point out an error or suggest an alternative.
112+
> Note: You may ask for minor changes - "nitpicks", but consider whether they are real blockers to merging or not
113+
- Submit your review, which may include comments, an approval, or a changes request

0 commit comments

Comments
 (0)