Contribution Guidelines
Apache Zeppelin is an Apache2 License Software.
Contributing to Zeppelin (Source code, Documents, Image, Website) means you agree to the Apache2 License.
- Make sure your issue is not already in the Jira issue tracker
- If not, create a ticket describing the change you're proposing in the Jira issue tracker
- Setup travis Continuous Integration
- Contribute your patch via Pull Request on our Github Mirror.
Before you start, please read the Code of Conduct carefully, familiarize yourself with it and refer to it whenever you need it.
For those of you who are not familiar with Apache project, understanding How it works would be quite helpful.
Creating a Pull Request
When creating a Pull Request, you will automatically get the template below.
Filling it thoroughly can improve the speed of the review process.
Testing a Pull Request
You can also test and review a particular Pull Request. Here are two useful ways.
Using a utility provided from Zeppelin.
For example, if you want to test
#513
, then the command will be:Another way is using github/hub.
The above two methods will help you test and review Pull Requests.
Source Control Workflow
Zeppelin follows Fork & Pull model.
The Review Process
When a Pull Request is submitted, it is being merged or rejected by the following review process.
- Anybody can be a reviewer and may comment on the change or suggest modifications.
- Reviewer can indicate that a patch looks suitable for merging with a comment such as: "Looks good", "LGTM", "+1".
- At least one indication of suitability (e.g. "LGTM") from a committer is required to be merged.
- Pull request is open for 1 or 2 days for potential additional review, unless it's got enough indication of suitability.
- A committer can then initiate lazy consensus ("Merge if there is no more discussion") after what the code can be merged after a certain time (normally 24 hours) if there is no more reviews.
- Contributors can ping reviewers (including committers) by commenting 'Ready to review' or suitable indication.
Becoming a Committer
The PMC adds new committers from the active contributors, based on their contribution to Zeppelin.
The qualifications for new committers include:
- Sustained contributions: Committers should have a history of constant contributions to Zeppelin.
- Quality of contributions: Committers more than any other community member should submit simple, well-tested, and well-designed patches.
- Community involvement: Committers should have a constructive and friendly attitude in all community interactions. They should also be active on the dev, user list and reviewing patches. Also help new contributors and users.
Setting up
Here are some things you will need to build and test Zeppelin.
Software Configuration Management (SCM)
Zeppelin uses Git for its SCM system. so you'll need git client installed in your development machine.
Integrated Development Environment (IDE)
You are free to use whatever IDE you prefer, or your favorite command line editor.
Project Structure
Zeppelin project is based on Maven. Maven works by convention & defines directory structure for a project. The top-level pom.xml describes the basic project structure. Currently Zeppelin has the following modules.
Code convention
We are following Google Code style:
There are some plugins to format, lint your code in IDE (use _tools/checkstyle.xml as rules)
Checkstyle report location is in ${submodule}/target/site/checkstyle.html
Test coverage report location is in ${submodule}/target/site/cobertura/index.html
Getting the source code
First of all, you need the Zeppelin source code.
The official location for Zeppelin is http://git.apache.org/zeppelin.git.
git access
Get the source code on your development machine using git.
You may also want to develop against a specific branch. For example, for branch-0.5.6
or with write access
Fork repository
If you want not only build Zeppelin but also make change, then you need fork Zeppelin github mirror repository and make a pull request.
Build
Build Tools
To build the code, install
- Oracle Java 7
- Apache Maven
Building the code
To skip test
To build with specific spark / hadoop version
Tests
Each new File should have its own accompanying unit tests. Each new interpreter should have come with its tests.
Zeppelin has 3 types of tests:
- Unit Tests: The unit tests run as part of each package's build. E.g. SparkInterpeter Module's unit test is SparkInterpreterTest
- Integration Tests: The integration tests run after all modules are build. The integration tests launch an instance of Zeppelin server. ZeppelinRestApiTest is an example integration test.
- GUI integration tests: These tests validate the Zeppelin UI elements. These tests require a running Zeppelin server and launches a web browser to validate Notebook UI elements like Notes and their execution. See ZeppelinIT as an example.
Currently the GUI integration tests are not run in the Maven and are only run in the CI environment when the pull request is submitted to github.
Make sure to watch the CI results for your pull request.
Running GUI integration tests locally
All tests, just like the CI:
Next to a Running instance of Zeppelin
This allows you to target a specific GUI integration test.
Continuous Integration
Zeppelin project's CI system will collect information from pull request author's travis-ci and display status in the pull request.
Each individual contributor should setup travis-ci for the fork before making a pullrequest. Go to https://travis-ci.org/profile and switch on 'zeppelin' repository.
Run Zeppelin server in development mode
or use daemon script
Server will be run on http://localhost:8080