As you may already know, Streams has started an open-source community on Github in 2014.  We currently have over 30 projects under the IBMStreams organization on Github and it’s growing.

Here’s a summary of all projects currently hosted on Github:  Github Project Overview.

To learn more about Streams and what’s new, check out this website:  IBM Streams on Github

What can I do to contribute?

There are a number of ways you can contribute to an IBM Streams Github projects.

Open an Issue

You do not have to write code to contribute.  Issues do not always have to be a defect or problem.  If you have an idea about the project, open an issue!  If you think we can do something better, start a conversation with an issue!  We are happy to hear from you and discuss whatever it is about the project that you are interested in.

Try Out a Release!

In many of the projects, we have made beta and official releases.  Download the release and give us feedback!  It is one of the best ways to help out the community.  It will also help us better understand your use cases and make sure that we address your needs.

Propose a New Project

If you have a new project idea, don’t be shy to propose one.  Project proposals can be opened in the Administration project here:  IBM Streams Administration Project.  Let us know what the project is for, and what you would like to contribute.  The proposals will be reviewed by the management committee.  Once we have got enough +1 votes, we will create a repository for you.

Contribute to Existing Project

If you have an idea on how to enhance an existing toolkit.  Open an issue in the project.  You can also start working on the project. code.  A number of people have asked me how they can contribute to an existing Github project.  Here’s how you can set up a development environment and work on your code, and then contribute it back to the main stream.

 Fork the Git Repository

First, you need to fork the Git repository that you would like to contribute to.  To fork the repository, press the “Fork” button at the top right corner of the repository page:

 

You will be asked where you would like to fork the repository, pick your own user id:

This will fork the main @IBMStreams repository to a new repository owned by you on the Github server.  Because you are the owner of the repository, you can push changes to it, and also control who can also write to this repository.

Clone a Local Copy

Next, you need to clone the fork that you have just created onto your local file system.  Make a note of the clone URL of your fork.  You will find it on the side bar on the right hand side here:

In my case, my clone URL is as set as follows.  Notice that my user name is in the repository URL.

https://github.com/chanskw/streamsx.messaging.git

On the file system, run the following git command:

git clone https://github.com/chanskw/streamsx.messaging.git

This will clone the forked repository to your local file system.

Working on the Git Project

Once the code is cloned onto your local file system, you can work on the toolkit like other toolkits.  Streams Studio can be run with Egit, which is an Eclipse-based Git client.  You can import the project into Studio using the Egit client.

Pushing the Changes to Your Fork

When you are happy with the changes and ready to contribute back.  You can do the following:

  1. Commit your changes in your local repository:
  2. Push the changes from your local repository to the fork.  This will copy your changes from the local file system to your fork on the Git server.

Creating Pull Request

To merge your changes back to the main IBMStreams repository, you need to create a pull reaquest.  To do this, create a pull request by pressing the “Pull requests” link on the top right corner:

Press the “New pull request” button at the top right corner.

git_newPull

You will get a Compare Changes page:

git_compare

This page allows you to see what changes are to be applied to the main IBMStreams master branch. In the base fork field, specify IBMStreams/<your project name>.  The base fork is where the changes are to be applied to.  In the head fork, specify your repository.  For example:  <your user id>/streamsx.messaging.  The head fork specifies where changes should be pulled from.

When you are happy with the changes, press the Create pull request button.  This will create the pull request and notify everyone who has commit rights to the project.

The project owner will review the pull request and work with you if any adjustment is required.  The project owner will merge the pull request to the main IBMStreams branch.

Hope this article helps you get started!  See you on IBM Streams on Github!

1 Comment on "Contribute to a IBM Streams Github project"

  1. When working in your own fork of a IBMStreams repository I would recommend that you make any changes on a new branch for each change, rather than master, especially if you want to regularly contribute to the project. This then makes it much easier to rebase your fork from the IBMStreams version.

    As they say, git branches are cheap.

Join The Discussion