Skip to content

Commit b0b22fa

Browse files
fpilletkzaher
authored andcommitted
Initial pass at a new contribution guide
1 parent e1933eb commit b0b22fa

File tree

1 file changed

+56
-11
lines changed

1 file changed

+56
-11
lines changed

CONTRIBUTING.md

Lines changed: 56 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,71 @@
1-
## About contributing
1+
## Contributing to RxSwift
22

3-
There are multiple ways you can contribute to this project.
3+
Thank you for your interest in RxSwift! There are multiple ways you can contribute to this project. We welcome contributions in all areas, with special attention to:
44

5-
The easiest way to contribute is to report possible bugs, request features, [discuss ideas](https://github.com/ReactiveX/RxSwift/issues) and share excitement about this project.
5+
* [Issue fixes](#issuefixes)
6+
* [Performance improvements](#performanceimprovements)
7+
* [Documentation improvements](#documentationimprovements)
8+
* [New operators](#newoperators) (**read carefully!**)
69

7-
You can also make pull requests.
10+
Please take the time to carefully read the following guide. These rules help make the best out of your time, the code reviewer's time and the general consistency of the project.
811

9-
There are some best practices that will be followed during the development of this project for common good ([Gitflow](http://nvie.com/posts/a-successful-git-branching-model/) branching model)
12+
### General rules
1013

11-
So what does this mean in practice:
12-
13-
* Please target your PR to **develop** branch
14-
* If you want to make a bigger contribution to the project, please [open an issue first](https://github.com/ReactiveX/RxSwift/issues/new) so we can plan that work, discuss the architecture and brainstorm around that idea first.
15-
16-
## Submitting a Pull Request
14+
All contributions are handled via Pull Requests (PRs). Your PR _must_ target the `[develop](https://github.com/ReactiveX/RxSwift/tree/develop)` branch. This is the place where we aggregate all upcoming changes for the next release of RxSwift. Moreover, your PR _must_ pass all tests and provide a meaningful description of what it is about. We have bots looking at PRs and enforcing these rules.
1715

1816
Before submitting a pull request please make sure **`./scripts/all-tests.sh`** is passing (exits with 0), otherwise we won't be able to pull your code.
1917

2018
To be able to run `./scripts/all-tests.sh`, you'll need to install [xcpretty](https://github.com/supermarin/xcpretty).
2119

2220
`sudo gem install xcpretty`
2321

22+
Once the tests pass, you can push your feature branch to your clone of the repository, then open a pull request. There are some best practices that will be followed during the development of this project for common good ([Gitflow](http://nvie.com/posts/a-successful-git-branching-model/) branching model).
23+
24+
25+
### Slack channel
26+
27+
Many of the RxSwift Community contributors interact on the [RxSwift Slack](https://rxswift.slack.com). It is a good starting place to exchange ideas and talk about your planned contributions to RxSwift. A good first step would be to join the slack, in particular the `#community` channel.
28+
29+
### Issue fixes
30+
31+
Fixing issues is a good way to start contributing and getting used to the large codebase in project! You may want to look at outstanding [reported issues](https://github.com/ReactiveX/RxSwift/issues), or maybe you bumped into an issue that you found. In the latter case, please make sure you first open an issue in the [issue tracker](https://github.com/ReactiveX/RxSwift/issues) and indicate that you're working on a fix. This will give a chance to other contributors to chime in, and help tracking who's working on what in order to avoid duplicate work.
32+
33+
Once you believe the issue is fixed, make sure the tests pass (see above) then open a Pull Request.
34+
35+
Congratulations on contributing a fix! We love receiving new bug fixes and your help is very much welcomed.
36+
37+
#### Performance improvements
38+
39+
We take performance very much to heart. RxSwift is at the core of some large products, and is a moderately complex framework with a lot of code. Performance improvements are always welcome! If you identified a bottleneck, please make sure you follow the performance fix procedure:
40+
41+
* Prepare a reproducible case that highlights the performance issue, if possible. At least, the case should provide a testable timing result.
42+
* Submit a PR with a fix that provides a measurable performance improvement
43+
* Think hard about all the use cases! Threading and concurrency are important to think about when it comes to performance, make sure your fix doesn't come with a performance regression in some use cases.
44+
45+
As previously highlighted, discussing the matter via an issue is a preferred starting point. This will allow other contributors to join and express their point of view, allowing for a smooth glide from problem description to resolution.
46+
47+
Thanks for caring about performance! RxSwift is a crucial component of many applications and performance issues can have a wide impact.
48+
49+
#### Documentation improvements
50+
51+
RxSwift is a complex project. Reactive programming in general is a lot about explaining the concepts, classes and operators. If you spotted a place where documentation could be improved (be in it-line documentation of project markdown pages), please feel free to submit a documentation improvement PR. We very much need a documentation that is as good, as as up-to-date as possible!
52+
53+
We understand the need for foreign language documentation. Unfortunately, due to the scope and breadth of the project it's a tough promise to keep up-to-date documentation in other languages than English. Moreover, all contributors only have English as a common language on the project. Therefore, and to keep the project as maintainable as possible, we only accept documentation changes and improvements provided in English. If you're looking at providing a translation of the in-line documentation, please make sure you have the resources and time to keep it updated as the framework changes. We care a lot about the quality of both the code and its documentation, over the long term. Maintaining a foreign language translation is a longtime commitment that should not be taken lightly.
54+
55+
Thank you for your interest in helping with documentation! Your contributions will make the life of other developers easier.
56+
57+
58+
#### New operators
59+
60+
If you're thinking about adding new operators to RxSwift, please make sure you discuss them via an [issue](https://github.com/ReactiveX/RxSwift/issues) first. RxSwift is a large project, and we're trying to keep its core as compact as possible. We understand the desire to fulfill various kinds of needs, and want to make sure the core serves the majority of developers.
61+
62+
Any operator you need may also be needed by others! But not all operators belong to the RxSwift core. The [RxSwift Commmunity](https://github.com/RxSwiftCommunity/) is home to many projects that may be a better recipient for the improvements you want to bring. In some cases, you may even find that your specific problem is addressed by one of the RxSwiftCommunity project!
63+
64+
Some operators, even though available in the core of other ReactiveX implementations, may be left out of the RxSwift code. Some of them can go into the [RxSwiftExt](https://github.com/RxSwiftCommunity/RxSwiftExt) project, others can be hosted in one of the many satellite community projects.
65+
66+
In any case, feel free to discuss your need in an [issue](https://github.com/ReactiveX/RxSwift/issues) ! The RxSwift Community is all about helping and interacting with fellow developers, and we very much welcome
67+
68+
2469
## Developer's Certificate of Origin 1.1
2570

2671
By making a contribution to this project, I certify that:

0 commit comments

Comments
 (0)