Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contributing and code of conduct #401

Merged
merged 3 commits into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## Description

<!-- Please give a short description of the changes you propose. Please use prose and try not to be too technical, if possible. Make sure to mention people that you think should know about the PR. -->

## Related issues or pull requests

<!-- Please list issues or pull requests that the changes you propose are related to. It does not matter if they are still open and/or unmerged, any link is appreciated. -->

## Pull request type

<!-- Please check the type of change your PR introduces: -->

<!-- Put an x between the square brackets to check an item, like so: [x] -->

- [ ] Bugfix
- [ ] Feature
- [ ] Dependency updates
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe)

## Do you introduce a breaking change?

- [ ] Yes
- [ ] No

## Checklist

- [ ] I understand and agree that the changes in this PR will be licensed under the
[Apache Licence Version 2.0](https://github.com/terrestris/shogun/blob/main/LICENSE).
- [ ] I have followed the [guidelines for contributing](https://github.com/terrestris/shogun/blob/main/CONTRIBUTING.md).
- [ ] The proposed change fits to the content of the [code of conduct](https://github.com/terrestris/shogun/blob/main/CODE_OF_CONDUCT.md).
- [ ] I have added or updated tests and documentation, and the test suite passes (run `mvn test` locally).
- [ ] I have added a screenshot/screencast to illustrate the visual output of my update.
132 changes: 132 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders 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, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
info@terrestris.de.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available
at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
204 changes: 204 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
# Contributing

Thank you for contributing to our project! We are happy for any kind of contribution
and welcome anyone who is interested in doing so. Please also have a look at our [code of conduct](./CODE_OF_CONDUCT.md).

## Contributions other than code

There is more than one way of contributing. If you have questions, topics to discuss or anything else
that is related to the SHOGun project, feel free to open an issue - we have created some issue templates to help you
with that. If your issue addresses a general topic or if you are unsure where to open it, this repository is the right
one to choose. However, if your issue relates to something specific, please see if one of the other repositories
(e.g. [shogun-docker](https://github.com/terrestris/shogun-docker) or [shogun-admin](https://github.com/terrestris/shogun-admin))
might be more appropriate.

## Reporting issues and suggesting features

To report an issue or to suggest features or a change, [open an issue](https://github.com/terrestris/shogun/issues/new/choose)
on GitHub.

## Changing code and documentation

This guide covers contributing to the main version of SHOGun source code which is the `main` branch. It assumes that you
have some very basic knowledge of Git and GitHub, but if you don't just go through some tutorial online.

### First time setup

* Create an account on GitHub.
* Install Git on your computer.
* Set up Git with your name and email.
* Fork the repository.
* Clone your fork (use SSH or HTTPS URL):

```
git clone git@github.com:your_GH_account/shogun.git
```

* Enter the directory

```
cd shogun/
```

* Add main SHOGun repository as "upstream" (use HTTPS URL):

```
git remote add upstream https://github.com/terrestris/shogun
```

* Your remotes now should be `origin` which is your fork and `upstream` which
is this main SHOGun repository. You can confirm that using:

```
git remote -v
```

* You should see something like:

```
origin git@github.com:your_GH_account/shogun.git (fetch)
origin git@github.com:your_GH_account/shogun.git (push)
upstream https://github.com/terrestris/shogun.git (fetch)
upstream https://github.com/terrestris/shogun.git (push)
```

It is important that `origin` points to your fork.

### Update before creating a branch

* Make sure you are using the `main` branch:

```
git checkout main
```

* Download updates from all branches from all remotes:

```
git fetch upstream
```

* Update your local `main` branch to match `main` in the main repository:

```
git rebase upstream/main
```

### Update if you have local branches

If `rebase` fails with "error: cannot rebase: You have unstaged changes...",
then move your uncommitted local changes to "stash" using:

```
git stash
```

* Now you can rebase:

```
git rebase upstream/main
```

* Apply your local changes on top:

```
git stash apply
```

* Remove the stash record (optional):

```
git stash pop
```

### Creating a branch

Now you have updated your local master branch, you can create a branch based on it.

* Create a branch and switch to it:

```
git checkout -b new-feature
```

### Making changes

You can use your favorite tools to change source code or other files in the local copy of the code.

### Committing

* Add files to the commit (changed ones or new ones):

```
git add file1
git add file2
```

* Commit the change:

```
git commit -m "Added a new feature"
```

### Pushing changes to GitHub

* Push your local branch to your fork:

```
git push origin new-feature
```

### Pull request

When you push, GitHub will respond back in the command line to tell you what URL to use to create a pull request.
You can follow that URL or you can go any time later to your fork on GitHub, display the branch `new-feature`, and
GitHub will show you button to create a pull request.

### After creating a pull request

SHOGun maintainers will now review your pull request. If needed, the maintainers will work with you to improve
your changes.

Once the changes in the pull request are ready to be accepted, the maintainers will decide if it is more appropriate to:

* Merge your branch,
* Squash all commit into one commit, or
* Rebase (i.e., replay) all commits on top of the master branch.

### Legalese

Committers are the front line gatekeepers to keep the code base clear of improperly contributed code. It is important
to the SHOGun users, developers and the community to avoid contributing any code to the project without it being
clearly licensed under the project license.

Generally speaking the key issues are that those providing code to be included in the repository understand that the
code will be released under the Apache License Version 2.0 license, and that the person providing the code has the
right to contribute the code. For the committer themselves understanding about the license is hopefully clear. For
other contributors, the committer should verify the understanding unless the committer is very comfortable that
the contributor understands the license (for instance frequent contributors).

If the contribution was developed on behalf of an employer (on work time, as part of a work project or similar) then
it is important that an appropriate representative of the employer understand that the code will be contributed under
the Apache License Version 2.0 license. The arrangement should be cleared with an authorized supervisor/manager, etc.

The code should be developed by the contributor, or the code should be from a source which can be rightfully contributed
such as from the public domain, or from an open source project under a compatible license.

All unusual situations need to be discussed and/or documented.

Committer should adhere to the following guidelines, and may be personally legally liable for improperly contributing
code to the source repository:

* Make sure the contributor (and possibly employer) is aware of the contribution terms.
* Code coming from a source other than the contributor (such as adapted from another project) should be clearly marked
as to the original source, copyright holders, license terms and so forth. This information can be in the file
headers, but should also be added to the project licensing file if not exactly matching normal project licensing
(LICENSE.txt).
* Existing copyright headers and license text should never be stripped from a file. If a copyright holder wishes to
give up copyright they must do so in writing to the project core team via info@terrestris.de before copyright
messages are removed. If license terms are changed it has to be by agreement (written in email is ok) of the
copyright holders.
* When substantial contributions are added to a file (such as substantial patches) the author/contributor should be
added to the list of copyright holders for the file.
* If there is uncertainty about whether a change is proper to contribute to the code base, please seek more information
from the project core team.