Skip to content

Commit

Permalink
Contribution and build documentation. (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
gs-rezaem committed Feb 10, 2017
1 parent 506e3a5 commit 968a1d6
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 0 deletions.
38 changes: 38 additions & 0 deletions BUILD.md
@@ -0,0 +1,38 @@
# Building Reladomo

Reladomo is built from the command line with the `build/build.sh` or `build/build.bat` files.
Reladomo is currently built with JDK 1.6. The resulting jars are known to work with JDK 1.6, 1.7, and 1.8.
Reladomo cannot be built with any other version of the JDK.

## Setting up your environment
You'll need to clone the repository and have JDK 1.6 installed. You can then setup your environment.

If you're using `build.bat` under Windows, you must modify the first line of `build/setenv.bat` to point to
your JDK installation.

If you're using `build.sh`, you can set a variable in your shell, for example:
```
export RELADOMO_JDK_HOME=/opt/jdk1.6.0_45
```
Alternatively, you can modify `build/setenv.sh` by uncommenting the similar line near the top
and setting the value to point to your JDK.

Try the following command to test your setup:
```
build/build.sh compile-reladomo
```

## Reladomo Build Process
The build process will download relevant dependencies and start ant to build Reladomo.
You do not need your own copy of ant or any other jar.

The build takes a target. See the `build/build.xml` file for all the targets. Some of the
important ones are:
* `compile-reladomo`: compiles the main library and code generator.
* `compile-reladomo-test`: compiles Reladomo and all tests.
* `reladomo-test-suite`: compiles and runs the test suite.

### Using a different Maven mirror
The file `build/repos.txt` has the specification for where the dependencies are downloaded from.
If you wish to use your own mirror, make the appropriate changes to that file.

85 changes: 85 additions & 0 deletions CONTRIBUTING.md
@@ -0,0 +1,85 @@
# Contributing to Reladomo

This file contains information about reporting issues as well as contributing code. Make sure
you read our [Contributor Covenant Code of Conduct](CONTRIBUTOR_COVENANT.md) before you
start participating.

For code contributions, read the [BUILD.md](BUILD.md) instructions. If you're considering a larger piece of
work, start with an enhancement request and make sure committers are supportive of the work. Reading the
Reladomo framework philosophy would be helpful.

## Reporting Issues
Please use GitHub Issues for issue submission. We strongly prefer issues that have reproducible test cases.
To contribute a test case follow the same process as contributing a feature.

## Contributing Code
Code contributions are accepted via the normal GitHub pull request mechanism. Code must pass existing tests,
have its own set of tests, be formatted correctly and be consistent with the overall Reladomo vision.
It must follow the pull request procedure outlined below.

### Coding Style
* Use 4 spaces for indentation. No tabs.
* A brace must be on a line by itself.

### Before your first code pull request

If you have never contributed to Reladomo, or your copyright ownership has changed, you must first create a pull request that has
a developer certificate of origin (DCO) in it. To create this file, follow these steps:

For code you write, determine who the copyright owner is. If you are employed in the US, it's likely that your
employer can exert copyright ownership over your work, even if the work was not done during regular working hours or
using the employer's equipment. Copyright law is highly variable from jurisdiction to jurisdiction. Consult your
employer or a lawyer if you are not sure.

If you've determined that the copyright holder for the code you write is yourself,
please fill out the following (replace all `<>` terms); place it in a file under `dco/<your name>.dco`.

```
1) I, <your name>, certify that all work committed with the commit message
"covered by: <your name>.dco" is my original work and I own the copyright
to this work. I agree to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from <date submitted> to 9999-01-01.
```

If you've determined that the copyright holder for the code you write is some other entity (e.g. your employer),
you must ensure that you are authorized by the copyright holder to be able to license this code under the
Apache 2.0 license for the purpose of contribution to Reladomo. Negotiating such authorization and administering
the terms is entirely between you and the copyright holder. Please fill out the following (replace all
`<>` terms); place it in a file under `dco/<copyright holder name>-<your name>.dco`.

```
1) I, <your name>, certify that all work committed with the commit message
"covered by: <copyright holder name>-<your name>.dco" is copyright
<copyright holder name> and that I am authorized by <copyright holder name>
to contribute this code under the Apache 2.0 license.
2) I understand and agree all contribution including all personal
information I submit with it is maintained indefinitely and may be
redistributed consistent with the open source license(s) involved.
This certification is effective for all code contributed from <date submitted> to 9999-01-01.
```

`<your name>` must reference your real name; we will not accept aliases, pseudonyms or anonymous contributions.
Issue a pull request with the appropriate DCO and a change to NOTICE.txt with
one line `This product contains code copyright <copyright holder name>, licensed under Apache 2.0 license`.

### Pull requests
When you create a code pull request, please follow these guidelines:
* Make sure you rebase your fork so that pull requests can be fast-forward merges.
* We generally prefer squashed commits, unless multi-commits add clarity or are required for mixed copyright commits.
* Your commit message for your code must contain a `covered by: <dco>` line. See above.
* Every file you modify should contain a single line with copyright information after the Apache header:
```
//Portions copyright <copyright holder>. Licensed under Apache 2.0 license
```
* New files must contain the standard Apache 2.0 header with appropriate copyright holder.
* If you're going to contribute code from other open source projects, commit that code first with `covered by: <license>`
where `<license>` is license of the code being committed. Ensure the file retains its original copyright notice and add an appropriate line to
NOTICE.txt in the same commit. You can then modify that code in subsequent commits with a reference to your DCO and copyright.

74 changes: 74 additions & 0 deletions CONTRIBUTOR_COVENANT.md
@@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

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

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

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, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at gs-oss-abuse@gs.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

0 comments on commit 968a1d6

Please sign in to comment.