Skip to content

Commit

Permalink
Add CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
lempiji committed Mar 10, 2018
1 parent d1da1bf commit 15b4c7d
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
66 changes: 66 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
Contributing
============

Thank you for your interest!
Issue and pull request are welcome!


Development and Testing
-----------------------
We are weolcoming tha refactoring and implements operators.

`rx` provides attractive code to users, like the general `std.range` and `std.algorithm`. But, its source code is unfortunately complicated.

In particular, it is important a variety operators combination tests, and multithreading tests.

### Things you will need

* Linux, Mac OS X, or Windows
* git (used for source version control).
* Some D Compiler. dmd and ldc.
* Latest dub (used for build and testing).
* An IDE. We recommend [Visual Studio Code](https://code.visualstudio.com/download) with [code-d](https://marketplace.visualstudio.com/items?itemName=webfreak.code-d).
* Use dfmt (with default settings) for code formatting.

### Patterns
Taking `map` as an example, the operator consists of the following three elements.

- struct `MapObserver`
- struct `MapObservable`
- template function `map`

#### MapObserver
Observer's role is to provide concrete algorithms in the constructed pipeline.

`MapObserver` has the function of passing processed values to Observer as source.

#### MapObservable
Observable as an operator has Observable as a source and has the role of processing a given Observer and constructing a pipeline.

`MapObservable` has the function of wrapping the passed Observer in `MapObserver` and subscribing to Observable as source.

Also, since Observable returns `Disposable`, it relays it.

#### map
It is utility function for build `MapObservable`.


### Naming priority
Unified naming conventions is important. It is now as follows.

1. Look for similar operators from `std.algorithm`.
2. If there are no similar operators, follow [Reactive X](http://reactivex.io/documentation/operators.html).


Documentation
-------------
We are welcoming the tutorial documentation.

For users, the goal is to think about the composition of the tutorial so that you can see how to use it, and to add practical examples.

For developers, We think that the following things are necessary.

- Manage the tutorial as part of the source.
- Since the contribution log remains, it is easy to understand later.
- Not separate it into another repository to avoid version inconsistency.
- Keep docs as a simple API reference.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ Supported compilers are `dmd` and `ldc` that latest 3 versions.
This library is under the MIT License.
Some code is borrowed from [Rx.NET](https://github.com/Reactive-Extensions/Rx.NET).

### Contributing
Issue and PullRequest are welcome! :smiley:

Refer to [CONTRIBUTING.md](/CONTRIBUTING.md) for details.

### Future work

- generic observable factory
Expand Down

0 comments on commit 15b4c7d

Please sign in to comment.