|
1 | 1 | # Contributing to repo2docker development |
2 | 2 |
|
| 3 | +Thank you for thinking about contributing to repo2docker! |
| 4 | +This is an open source project that is developed and maintained entirely by volunteers. |
| 5 | +*Your contribution* is integral to the future of the project. |
| 6 | +THANK YOU! |
| 7 | + |
| 8 | +## Types of contribution |
| 9 | + |
| 10 | +There are many ways to contribute to repo2docker: |
| 11 | + |
| 12 | +* **Update the documentation.** |
| 13 | + If you're reading a page or docstring and it doesn't make sense (or doesn't exist!), please let us know by opening a bug report. |
| 14 | + It's even more amazing if you can give us a suggested change. |
| 15 | +* **Fix bugs or add requested features.** |
| 16 | + Have a look through the [issue tracker](https://github.com/jupyter/repo2docker/issues) and see if there are any tagged as ["help wanted"](https://github.com/jupyter/repo2docker/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22). |
| 17 | + As the label suggests, we'd love your help! |
| 18 | +* **Report a bug.** |
| 19 | + If repo2docker isn't doing what you thought it would do then open a [bug report](https://github.com/jupyter/repo2docker/issues/new?template=bug_report.md). |
| 20 | + That issue template will ask you a few questions described in more detail below. |
| 21 | +* **Suggest a new feature.** |
| 22 | + We know that there are lots of ways to extend repo2docker! |
| 23 | + If you're interested in adding a feature then please open a [feature request](https://github.com/jupyter/repo2docker/issues/new?template=feature_request.md). |
| 24 | + That issue template will ask you a few questions described in detail below. |
| 25 | +* **Review someone's Pull Request.** |
| 26 | + Whenever somebody proposes changes to the repo2docker codebase, the community reviews |
| 27 | + the changes, and provides feedback, edits, and suggestions. Check out the |
| 28 | + [open pull requests](https://github.com/jupyter/repo2docker/pulls?q=is%3Apr+is%3Aopen+sort%3Aupdated-desc) |
| 29 | + and provide feedback that helps improve the PR and get it merged. Please keep your |
| 30 | + feedback positive and constructive! |
| 31 | +* **Tell people about repo2docker.** |
| 32 | + As we said above, repo2docker is built by and for its community. |
| 33 | + If you know anyone who would like to use repo2docker, please tell them about the project! |
| 34 | + You could give a talk about it, or run a demonstration. |
| 35 | + The sky is the limit :rocket::star2:. |
| 36 | + |
| 37 | +If you're not sure where to get started, then please come and say hello in our [Gitter channel](https://gitter.im/jupyterhub/binder), or open an discussion thread at the [Jupyter discourse forum](https://discourse.jupyter.org/). |
| 38 | + |
3 | 39 | ## Process for making a contribution |
4 | 40 |
|
5 | 41 | This outlines the process for getting changes to the repo2docker project merged. |
6 | 42 |
|
7 | | -* If your change is a big change, **open an issue to discuss** |
8 | | - before spending a lot of time writing. Getting consensus with the |
9 | | - community is a great way to save time later. |
10 | | -* Make edits in your fork of the repo2docker repository |
11 | | -* All changes are made by submitting a pull request. Read the next section for |
12 | | - the guidelines for both reviewers and contributors on merging a PR. |
13 | | -* Edit [the changelog](./../../changelog) |
14 | | - by appending your feature / bug fix to the development version. |
15 | | -* Wait for a community member to merge your changes. |
16 | | -* (optional) Deploy a new version of repo2docker to mybinder.org by [following these steps](http://mybinder-sre.readthedocs.io/en/latest/deployment/how.html) |
| 43 | +1. Identify the correct issue template: [bug report](https://github.com/jupyter/repo2docker/issues/new?template=bug_report.md) or [feature request](https://github.com/jupyter/repo2docker/issues/new?template=feature_request.md). |
17 | 44 |
|
| 45 | + **Bug reports** ([examples](https://github.com/jupyter/repo2docker/issues?q=is%3Aissue+is%3Aopen+label%3Abug), [new issue](https://github.com/jupyter/repo2docker/issues/new?template=bug_report.md)) will ask you for a description of the problem, the expected behaviour, the actual behaviour, how to reproduce the problem, and your personal set up. |
| 46 | + Bugs can include problems with the documentation, or code not running as expected. |
18 | 47 |
|
19 | | -## Guidelines to getting a Pull Request merged |
| 48 | + It is really important that you make it easy for the maintainers to reproduce the problem you're having. |
| 49 | + This guide on creating a [minimal, complete and verifiable example](https://stackoverflow.com/help/mcve) is a great place to start. |
| 50 | + |
| 51 | + **Feature requests** ([examples](https://github.com/jupyter/repo2docker/labels/needs%3A%20discussion), [new issue](https://github.com/jupyter/repo2docker/issues/new?template=feature_request.md)) will ask you for the proposed change, any alternatives that you have considered, a description of who would use this feature, and a best-guess of how much work it will take and what skills are required to accomplish. |
| 52 | + |
| 53 | + Very easy feature requests might be updates to the documentation to clarify steps for new users. |
| 54 | + Harder feature requests may be to add new functionality to the project and will need more in depth discussion about who can complete and maintain the work. |
20 | 55 |
|
21 | | -These are not hard rules to be enforced by 🚓 but instead guidelines |
22 | | -to help you make a contribution. |
23 | | - |
24 | | -* prefix the title of your pull request with `[MRG]` if the contribution |
25 | | - is complete and should be subjected to a detailed review; |
26 | | -* create a PR as early as possible, marking it with `[WIP]` while you work on |
27 | | - it (good to avoid duplicated work, get broad review of functionality or API, |
28 | | - or seek collaborators); |
29 | | -* a PR solves one problem (do not mix problems together in one PR) with the |
30 | | - minimal set of changes; |
31 | | -* describe why you are proposing the changes you are proposing; |
32 | | -* try to not rush changes (the definition of rush depends on how big your |
33 | | - changes are); |
34 | | -* Enter your changes into the [changelog](./../../changelog) in `docs/source/changelog.rst`; |
35 | | -* someone else has to merge your PR; |
36 | | -* new code needs to come with a test; |
37 | | -* apply [PEP8](https://www.python.org/dev/peps/pep-0008/) as much |
38 | | - as possible, but not too much; |
39 | | -* no merging if travis is red; |
40 | | -* do use merge commits instead of merge-by-squashing/-rebasing. This makes it |
41 | | - easier to find all changes since the last deployment `git log --merges --pretty=format:"%h %<(10,trunc)%an %<(15)%ar %s" <deployed-revision>..` |
| 56 | + Feature requests are a great opportunity for you to advocate for the use case you're suggesting. |
| 57 | + They help others understand how much effort it would be to integrate the work,and - if you're successful at convincing them that this effort is worth it - make it more likely that they to choose to work on it with you. |
| 58 | + |
| 59 | +2. Open an issue. |
| 60 | + Getting consensus with the community is a great way to save time later. |
| 61 | +3. Make edits in [your fork](https://help.github.com/en/articles/fork-a-repo) of the [repo2docker repository](https://github.com/jupyter/repo2docker). |
| 62 | +4. Make a [pull request](https://help.github.com/en/articles/about-pull-requests). |
| 63 | +Read the [next section](#guidelines-to-getting-a-pull-request-merged) for guidelines for both reviewers and contributors on merging a PR. |
| 64 | +5. Edit [the changelog](./../../changelog) by appending your feature / bug fix to the development version. |
| 65 | +6. Wait for a community member to merge your changes. |
| 66 | + Remember that **someone else must merge your pull request**. |
| 67 | + That goes for new contributors and long term maintainers alike. |
| 68 | +7. (optional) Deploy a new version of repo2docker to mybinder.org by [following these steps](http://mybinder-sre.readthedocs.io/en/latest/deployment/how.html) |
| 69 | + |
| 70 | +## Guidelines to getting a Pull Request merged |
42 | 71 |
|
| 72 | +These are not hard rules to be enforced by 🚓 but they are suggestions written by the repo2docker maintainers to help complete your contribution as smoothly as possible for both you and for them. |
| 73 | + |
| 74 | +* **Create a PR as early as possible**, marking it with `[WIP]` while you work on it. |
| 75 | + This avoids duplicated work, lets you get high level feedback on functionality or API changes, and/or helps find collaborators to work with you. |
| 76 | +* **Keep your PR focused.** |
| 77 | + The best PRs solve one problem. |
| 78 | + If you end up changing multiple things, please open separate PRs for the different conceptual changes. |
| 79 | +* **Add tests to your code.** |
| 80 | + PRs will not be merged if Travis is failing. |
| 81 | +* **Apply [PEP8](https://www.python.org/dev/peps/pep-0008/)** as much as possible, but not too much. |
| 82 | + If in doubt, ask. |
| 83 | +* **Use merge commits** instead of merge-by-squashing/-rebasing. |
| 84 | + This makes it easier to find all changes since the last deployment `git log --merges --pretty=format:"%h %<(10,trunc)%an %<(15)%ar %s" <deployed-revision>..` and your PR easier to review. |
| 85 | +* **Make it clear when your PR is ready for review.** |
| 86 | + Prefix the title of your pull request (PR) with `[MRG]` if the contribution is complete and should be subjected to a detailed review. |
| 87 | +* **Enter your changes into the [changelog](./../../changelog)** in `docs/source/changelog.rst`. |
| 88 | +* **Use commit messages to describe _why_ you are proposing the changes you are proposing.** |
| 89 | +* **Try to not rush changes** (the definition of rush depends on how big your changes are). |
| 90 | + Remember that everyone in the repo2docker team is a volunteer and we can not (nor would we want to) control their time or interests. |
| 91 | + Wait patiently for a reviewer to merge the PR. |
| 92 | + (Remember that **someone else** must merge your PR, even if you have the admin rights to do so.) |
43 | 93 |
|
44 | 94 | ## Setting up for Local Development |
45 | 95 |
|
|
0 commit comments