Skip to content

Commit b4b93e2

Browse files
feat(docs): Adding basic contribution docs
1 parent 340af62 commit b4b93e2

File tree

4 files changed

+284
-1
lines changed

4 files changed

+284
-1
lines changed

CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

+197
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Contributing to IxJS
2+
3+
[Read and abide by the Code of Conduct](CODE_OF_CONDUCT.md)! Even if you don't read it,
4+
it still applies to you. Ignorance is not an exemption.
5+
6+
Contents
7+
8+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
9+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
10+
11+
12+
- [Submitting a Pull Request (PR)](#submitting-a-pull-request-pr)
13+
- [After your pull request is merged](#after-your-pull-request-is-merged)
14+
- [Coding Style Guidelines](#coding-style-guidelines)
15+
- [Unit Tests](#unit-tests)
16+
- [CI Tests](#ci-tests)
17+
- [Commit Message Guidelines](#commit-message-guidelines)
18+
- [Commit Message Format](#commit-message-format)
19+
- [Revert](#revert)
20+
- [Type](#type)
21+
- [Scope](#scope)
22+
- [Subject](#subject)
23+
- [Body](#body)
24+
- [Footer](#footer)
25+
26+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
27+
28+
(This document is a work and progress and is subject to change)
29+
30+
## Submitting a Pull Request (PR)
31+
Before you submit your Pull Request (PR) consider the following guidelines:
32+
33+
* Search [GitHub](https://github.com/ReactiveX/IxJS/pulls) for an open or closed PR
34+
that relates to your submission. You don't want to duplicate effort.
35+
* Make your changes in a new git branch:
36+
37+
```shell
38+
git checkout -b my-fix-branch master
39+
```
40+
41+
* Create your patch, following [code style guidelines](#coding-style-guidelines), and **including appropriate test cases**.
42+
* Run the full test suite and ensure that all tests pass.
43+
* Run the micro and macro performance tests against your feature branch and compare against master
44+
to ensure performance wasn't changed for the worse.
45+
* Commit your changes using a descriptive commit message that follows our
46+
[commit message guidelines](#commit-message-guidelines). Adherence to these conventions
47+
is necessary because release notes are automatically generated from these messages.
48+
49+
```shell
50+
git commit -a
51+
```
52+
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
53+
54+
* Push your branch to GitHub:
55+
56+
```shell
57+
git push origin my-fix-branch
58+
```
59+
60+
* In GitHub, send a pull request to `IxJS:master`.
61+
* If we suggest changes then:
62+
* Make the required updates.
63+
* Re-run the test suites to ensure tests are still passing.
64+
* Re-run performance tests to make sure your changes didn't hurt performance.
65+
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
66+
67+
```shell
68+
git rebase master -i
69+
git push -f
70+
```
71+
72+
That's it! Thank you for your contribution!
73+
74+
75+
### After your pull request is merged
76+
77+
After your pull request is merged, you can safely delete your branch and pull the changes
78+
from the main (upstream) repository:
79+
80+
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
81+
82+
```shell
83+
git push origin --delete my-fix-branch
84+
```
85+
86+
* Check out the master branch:
87+
88+
```shell
89+
git checkout master -f
90+
```
91+
92+
* Delete the local branch:
93+
94+
```shell
95+
git branch -D my-fix-branch
96+
```
97+
98+
* Update your master with the latest upstream version:
99+
100+
```shell
101+
git pull --ff upstream master
102+
```
103+
104+
## Coding Style Guidelines
105+
106+
- Please use proper types and generics throughout your code.
107+
- 2 space indentation only
108+
- favor readability over terseness
109+
110+
(TBD): For now try to follow the style that exists elsewhere in the source, and use your best judgment.
111+
112+
113+
## Unit Tests
114+
115+
Unit tests are located under the [spec directory](/spec). Unit tests are written using [tape](https://github.com/substack/tape)
116+
117+
Each operator under test must be in its own file to cover the following cases:
118+
119+
- Never
120+
- Empty
121+
- Single/Multiple Values
122+
- Error in the sequence
123+
124+
If the operator accepts a function as an argument from the user/developer (for example `filter(fn)` or `zip(a, fn)`),
125+
then it must cover the following cases:
126+
127+
- Success with all values in the callback
128+
- Success with the context, if any allowed in the operator signature
129+
- If an error is thrown
130+
131+
### CI Tests
132+
133+
- Using [Travis](https://travis-ci.org/) on your forked version of IxJS will allow running CI tests on that fork before submitting a PR to master
134+
- Simply create a `Travis` account and add your fork as a new project
135+
- As master runs both of these tests per each check in, it'd be welcome to setup those test before creating your PR
136+
137+
## Commit Message Guidelines
138+
139+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
140+
readable messages** that are easy to follow when looking through the **project history**. But also,
141+
we use the git commit messages to **generate the IxJS change log**. Helper script `npm run commit`
142+
provides command line based wizard to format commit message easily.
143+
144+
### Commit Message Format
145+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
146+
format that includes a **type**, a **scope** and a **subject**:
147+
148+
```
149+
<type>(<scope>): <subject>
150+
<BLANK LINE>
151+
<body>
152+
<BLANK LINE>
153+
<footer>
154+
```
155+
156+
The **header** is mandatory and the **scope** of the header is optional.
157+
158+
Any line of the commit message cannot be longer than 100 characters! This allows the message to be easier
159+
to read on GitHub as well as in various git tools.
160+
161+
### Revert
162+
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
163+
164+
### Type
165+
Must be one of the following:
166+
167+
* **feat**: A new feature
168+
* **fix**: A bug fix
169+
* **docs**: Documentation only changes
170+
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing
171+
semi-colons, etc)
172+
* **refactor**: A code change that neither fixes a bug nor adds a feature
173+
* **perf**: A code change that improves performance
174+
* **test**: Adding missing tests
175+
* **chore**: Changes to the build process or auxiliary tools and libraries such as documentation
176+
generation
177+
178+
### Scope
179+
The scope could be anything specifying place of the commit change. For example
180+
`Observable`, `Subject`, `switchMap`, etc.
181+
182+
### Subject
183+
The subject contains succinct description of the change:
184+
185+
* use the imperative, present tense: "change" not "changed" nor "changes"
186+
* don't capitalize first letter
187+
* no dot (.) at the end
188+
189+
### Body
190+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
191+
The body should include the motivation for the change and contrast this with previous behavior.
192+
193+
### Footer
194+
The footer should contain any information about **Breaking Changes** and is also the place to
195+
reference GitHub issues that this commit **Closes**.
196+
197+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Microsoft Corporation
3+
Copyright (c) 2017 ReactiveX Organization
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

readme.md

+12
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ for await (let item of mapped) {
323323
}
324324
```
325325

326+
## Contributing
327+
328+
We are grateful for contributions to the IxJS project. The IxJS project evolves because of community involvemnent from people such as yourselves. Please read below on how to get involved.
329+
330+
### [Code Of Conduct](CODE_OF_CONDUCT.md)
331+
332+
The IxJS project has a strict Code of Conduct that must be adhered at all times. This code of conduct comes from the [Contributor Convenant](http://contributor-covenant.org/). Please read [the full text](CODE_OF_CONDUCT.md) as to what is and is not permitted.
333+
334+
### Contributing Guide
335+
336+
Read the [Contributing Guide](CONTRIBUTING.md) on how to get involved with the IxJS project. This includes our development process and how to test your code before committing.
337+
326338
## License ##
327339

328340
The MIT License (MIT)

0 commit comments

Comments
 (0)