Skip to content

Commit

Permalink
add contributing to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
smpallen99 committed Jul 11, 2016
1 parent 076ed96 commit fe5019f
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 1 deletion.
22 changes: 22 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,22 @@
# Contributor Code of Conduct

As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.

We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery
* Personal attacks
* Trolling or insulting/derogatory comments
* Public or private harassment
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
* Other unethical or unprofessional conduct.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.

This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.

This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
183 changes: 183 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,183 @@
# Contributing to Coherence

Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved! Also make sure you read our [Code of Conduct](CODE_OF_CONDUCT.md) that outlines our commitment towards an open and welcoming environment.

## Using the issue tracker

Use the issues tracker for:

* [bug reports](#bug-reports)
* [submitting pull requests](#pull-requests)

We do our best to keep the issue tracker tidy and organized, making it useful for everyone. For example, we classify open issues per perceived difficulty, making it easier for developers to [contribute to Coherence](#pull-requests).

## Bug reports

A bug is a _demonstrable problem_ that is caused by the code in the repository.
Good bug reports are extremely helpful - thank you!

Guidelines for bug reports:

1. **Use the GitHub issue search** — check if the issue has already been
reported.

2. **Check if the issue has been fixed** — try to reproduce it using the
`master` branch in the repository.

3. **Isolate and report the problem** — ideally create a reduced test
case.

Please try to be as detailed as possible in your report. Include information about your Operating System, as well as your Erlang, Elixir, Phoenix, and Coherence versions. Please provide steps to reproduce the issue as well as the outcome you were expecting! All these details will help developers to fix any potential bugs.

Example:

> Short and descriptive example bug report title
>
> A summary of the issue and the environment in which it occurs. If suitable,
> include the steps required to reproduce the bug.
>
> 1. This is the first step
> 2. This is the second step
> 3. Further steps, etc.
>
> `<url>` - a link to the reduced test case (e.g. a GitHub Gist)
>
> Any other information you want to share that is relevant to the issue being
> reported. This might include the lines of code that you have identified as
> causing the bug, and potential solutions (and your opinions on their
> merits).
## Feature requests

Feature requests are welcome and should be discussed with the issue tracker. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to *you* to make a strong case to convince the community of the merits of this feature. Please provide as much detail and context as possible.

## Contributing Documentation

Code documentation (`@doc`, `@moduledoc`, `@typedoc`) has a special convention:
the first paragraph is considered to be a short summary.

For functions, macros and callbacks say what it will do. For example write something like:

```elixir
@doc """
Marks the given value as HTML safe.
"""
def safe({:safe, value}), do: {:safe, value}
```

For modules, protocols and types say what it is. For example write something like:

```elixir
defmodule Phoenix.HTML do
@moduledoc """
Conveniences for working HTML strings and templates.
...
"""
```

Keep in mind that the first paragraph might show up in a summary somewhere, long texts in the first paragraph create very ugly summaries. As a rule of thumb anything longer than 80 characters is too long.

Try to keep unnecessary details out of the first paragraph, it's only there to give a user a quick idea of what the documented "thing" does/is. The rest of the documentation string can contain the details, for example when a value and when `nil` is returned.

If possible include examples, preferably in a form that works with doctests. This makes it easy to test the examples so that they don't go stale and examples are often a great help in explaining what a function does.

## Pull requests

Good pull requests - patches, improvements, new features - are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.

**IMPORTANT**: By submitting a patch, you agree that your work will be licensed under the license used by the project.

If you have any large pull request in mind (e.g. implementing features, refactoring code, etc), **please ask first** otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.

Please adhere to the coding conventions in the project (indentation, accurate comments, etc.) and don't forget to add your own tests and documentation. When working with git, we recommend the following process in order to craft an excellent pull request:

1. [Fork](http://help.github.com/fork-a-repo/) the project, clone your fork,
and configure the remotes:

```bash
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/coherence
# Navigate to the newly cloned directory
cd coherence
# Assign the original repo to a remote called "upstream"
git remote add upstream https://github.com/smpallen99/coherence
```

2. Pick a project to interactively see your Coherence changes:

* Create your own project or use the [Coherence Demo](https://github.com/smpallen99/coherence_demo)

* Change the :coherence dependency in your project to a path directive like

```elixir
def deps do
[
{:coherence, path: "../coherence"}
]
end
```

* Get the new deps and remove the old build dir

```bash
mix deps.get coherence
rm -rf build/dev/lib/coherence
```

* Now your project should be setup to your up your local changes every time you compile your project.

3. If you cloned a while ago, get the latest changes from upstream, and update your fork:

```bash
git checkout master
git pull upstream master
git push
```

4. Create a new topic branch (off of `master`) to contain your feature, change,
or fix.

**IMPORTANT**: Making changes in `master` is discouraged. You should always
keep your local `master` in sync with upstream `master` and make your
changes in topic branches.

```bash
git checkout -b <topic-branch-name>
```

5. Commit your changes in logical chunks. Keep your commit messages organized,
with a short description in the first line and more detailed information on
the following lines. Feel free to use Git's
[interactive rebase](https://help.github.com/articles/interactive-rebase)
feature to tidy up your commits before making them public.

6. Make sure all the tests are still passing.

```bash
mix test
```

7. Push your topic branch up to your fork:

```bash
git push origin <topic-branch-name>
```

8. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
with a clear title and description.

9. If you haven't updated your pull request for a while, you should consider
rebasing on master and resolving any conflicts.

**IMPORTANT**: _Never ever_ merge upstream `master` into your branches. You
should always `git rebase` on `master` to bring your changes up to date when
necessary.

```bash
git checkout master
git pull upstream master
git checkout <your-topic-branch>
git rebase master
```

Thank you for your contributions!
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -363,6 +363,17 @@ If the controllers are generated, you will need to change your router to use the
end
```

## Contributing

We appreciate any contribution to Coherence. Check our [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) and [CONTRIBUTING.md](CONTRIBUTING.md) guides for more information. We usually keep a list of features and bugs [in the issue tracker][1].

## References

* Detailed Example [Coherence Demo](https://github.com/smpallen99/coherence_demo)
* [Docs](https://hexdocs.pm/coherence/)

[1]: https://github.com/smpallen99/coherence/issues

## License

`coherence` is Copyright (c) 2016 E-MetroTel
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
@@ -1,7 +1,7 @@
defmodule Coherence.Mixfile do
use Mix.Project

@version "0.1.1"
@version "0.1.2-dev"

def project do
[ app: :coherence,
Expand Down

0 comments on commit fe5019f

Please sign in to comment.