ga4gh/build

Name: build

Owner: Global Alliance for Genomics and Health

Description: A hub for working on the GA4GH Reference Server, Schemas, and Compliance projects.

Created: 2015-10-23 16:14:42.0

Updated: 2017-02-18 18:54:01.0

Pushed: 2015-11-13 18:18:57.0

Homepage:

Size: 144

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits
Herb Jellinek2015-10-02 20:29:47.02
Maciek Smuga-Otto2015-11-13 18:18:57.02

Other Committers

UserEmailMost Recent Commit# Commits

README

One Repo to Build Them All

Introduction

This repo is a hub for those working on the GA4GH Reference Server, Schemas, and Compliance projects.

Using the instructions below and, optionally, the scripts in the bin directory, you can make synchronized changes across GA4GH repos.

Setting it up

You must first install Google's repo tool. See installing repo for the simple details of how to do this.

Getting help

See Repo command reference for more information on repo's subcommands. (Note that we are not using the Gerrit code-review tool, so please ignore the repo subcommands download and upload).

You can also get help from repo itself. Typing repo help (subcommand) will display information on the given repo subcommand. For example:

po help init
ary
---
ialize repo in the current directory

e: repo init [options]

Get started

Clone this repo. By default it will be called build:

t clone https://github.com/ga4gh/build.git

If that's too generic, you can give it a different name, like ga4gh-build:

t clone https://github.com/ga4gh/build.git ga4gh-build

Add the included scripts to your path (the exact syntax will depend on the shell you use and the location of your local copy of this repo):

port PATH=$PATH:~/ga4gh-build/bin

That takes care of the build tool itself. Now that it's set up, we can use it to work on the GA4GH projects themselves.

Create a new directory to serve as the parent directory for the three GA4GH projects above.

dir MyBigBuild

Set your current directory to the one you just created:

 MyBigBuild

Then set things up with repo.

po init -u https://github.com/ga4gh/build.git

Synchronize your directories with the server:

po sync

or, to use a specific branch,

po sync -b some_remote_branch

If you're using the normal GA4GH Git flow, you'll want to set up an origin Git remote to which you will normally push your changes.

Assuming your GitHub user name is myaccount, do that like this using the add-origin script:

d-origin myaccount

Use show-remotes to review your remotes to make sure they're correct. They should look something like this:

ow-remotes
ect compliance/
ream   https://github.com/ga4gh/compliance (fetch)
ream   https://github.com/ga4gh/compliance (push)
in  https://github.com/myaccount/compliance (fetch)
in  https://github.com/myaccount/compliance (push)

ect schemas/
ream   https://github.com/ga4gh/schemas (fetch)
ream   https://github.com/ga4gh/schemas (push)
in  https://github.com/myaccount/schemas (fetch)
in  https://github.com/myaccount/schemas (push)

ect server/
ream   https://github.com/ga4gh/server (fetch)
ream   https://github.com/ga4gh/server (push)
in  https://github.com/myaccount/server (fetch)
in  https://github.com/myaccount/server (push)
Using it
To start working on a new task (topic branch)
po start fix_bug_112 compliance server schemas

Then make your changes. Within each of the subdirectories (compliance, server, etc. – repo calls these “projects”), use git as you normally would.

Let's say you made coordinated changes to the compliance and schemas projects. You can see your changes with respect to each project with this command, analogous to git status:

po status
ect schemas/                                branch fix_bug_112
    src/main/resources/avro/reads.avdl
ect compliance/                             branch fix_bug_112
    cts-java/src/test/java/org/ga4gh/cts/api/TestData.java
ect server/                                 branch fix_bug_112

The status codes (-m in the example above) are explained here.

You can get a more detailed view of things with a command like this:

lti-diff
ect compliance/
 --git a/cts-java/src/test/java/org/ga4gh/cts/api/TestData.java b/cts-java/s
ails omitted)

ect schemas/
 --git a/src/main/resources/avro/reads.avdl b/src/main/resources/avro/reads.
ails omitted) 

Assuming you're satisfied with your changes, you change directories into each affected project and use git add and git commit as normal, then push the changes to your private repo (origin).

Check that you have no uncommitted files:

po status
ect compliance/                             branch fix_bug_112
ect schemas/                                branch fix_bug_112
ect server/                                 branch fix_bug_112

It looks clean, so it's time to push:

po forall -p -c 'git push origin fix_bug_112'

Continuing on GitHub, you issue pull requests for the changes you made to each project.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.