Code Monkey home page Code Monkey logo

git-bioc's Introduction

git-bioc

The official way to keep a Git repository in sync with a corresponding Bioconductor SVN repository is to make use of git-svn after proper configuration. Such a Git repository can be hosted anywhere, including on GitHub.

These git-bioc tools provides a set of Git commands that helps you keep the Git repository and the Bioconductor devel SVN repository in sync. They are meant to be intuitive and easy to remember.

These git-bioc tools were designed with the following work process in mind:

  • The Git repository is the main source of the Bioconductor package.
  • Since the Git repository is the main source, you should as far aa possible strive to make all commits to Git.
  • When you think the updates are ready to go live on Bioconductor, then should be committed there:
    • Committing to the Bioconductor devel SVN repository takes place in two steps: (i)git bioc export followed by (ii) git bioc push). Any Git-Bioc SVN conflicts have to be resolved in the first step.
    • After committing, Bioconductor will, on a daily basis, take a snapshot of your and all other Bioconductor packages, build them and check them. When all packages are completed, updated packages are made available via the Bioconductor package repository. At this time, the corresponding Bioc devel package pages are also updated. Thus, it may take a day or two before your git bioc push goes live.
  • At times there will be updates committed directly to the Bioconductor SVN (which were not committed to your Git repository first). This happens when the version of the Bioc package is bumped in preparation of a new major Bioconductor release (twice a year). It may also happen when Bioconductor core developers find it necessary to make direct adjustments to your package. It may also happen if you or one of your collaborators by mistake commit to the Bioconductor SVN instead of the Git repository.
    • When this happens, you need to import such Bioc-only updates into the Git repository which takes place in two steps: (i) git bioc pull followed by (ii) git bioc import. Any Git-Bioc SVN conflicts have to be resolved in the second step.

Note that all synchronization via your Git repository and Bioconductor SVN is done by you locally via these git-bioc tools. Online repositories such as GitHub are not involved in this synchronization. They are only used to host your Git repository online.

IMPORTANT ABOUNT THE CURRENT IMPLEMENTATION: I developed git-bioc mainly for my own needs, because I couldn't remember all failed to remember all the steps in the official Bioconductor Git Mirror instructions. More importantly, all the packages I've used git-bioc for - affxparser, aroma.light and illuminaio - were previously using the Bioconductor 'Git-SVN bridge' (deprecated and removed on 2016-01-29). Any Bioconductor package that used this 'Git-SVN bridge' is likely to have a "non-linear" Git history / tree, which complicates our synchronization. The current implementation of the git-bioc tools handles this problem by:

  • Exporting to Bioc SVN: All Git commits are incorporated into a single Bioconductor SVN commit. The SVN commit message is currently not that informative.
  • Importing from Bioc SVN: All Bioconductor SVN commits are incorporated into a single Git commit. The Git commit message is currently not that informative.

If your package didn't use the Git-SVN bridge in the past, the above / the current importation may not be optimal for you!

WARNING: Did you read the previous paragraph? It is very important! Make sure you understand it.

Usage

Setup

To use the git bioc tools, change to the directory of your Bioconductor package and run the following once per package / repository:

git bioc init

This will setup bioc/devel and bioc/release-x.y branches and bind them to the remote Bioconductor SVN branches.

Get an overview

To get an overview of the repository and its branches, do:

$ git bioc info
*** Bioconductor GitHub-SVN Bridge history (master branch):
Switched to branch 'master'
- YES (contains commits by Bioconductor GitHub-SVN Bridge - [email protected])

*** Bioconductor SVN URLs:
svn-remote.devel.url=https://hedgehog.fhcrc.org/bioconductor//trunk/madman/Rpacks/illuminaio
svn-remote.release-3.0.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_0/madman/Rpacks/illuminaio
svn-remote.release-3.1.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_1/madman/Rpacks/illuminaio
svn-remote.release-3.2.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_2/madman/Rpacks/illuminaio
svn-remote.release-3.3.url=https://hedgehog.fhcrc.org/bioconductor//branches/RELEASE_3_3/madman/Rpacks/illuminaio

*** Git-SVN branch tree:
* 5158646 (git-svn-devel, bioc/master, bioc/devel) bump version after creating 3.3 branch
* 27180e1 Bump versions prior to creation of 3.3 branch
* 3b02bbd Commit made by the Bioconductor Git-SVN bridge.
* 836448e Commit made by the Bioconductor Git-SVN bridge.
* a11385d Bumped version number of all packages after creation of 3.2 branch.
* 617cf7e Bumped versions of all packages prior to creating 3.2 branch.
* 8f4e390 Commit made by the Bioconductor Git-SVN bridge.
* b3be4a2 Commit made by the Bioconductor Git-SVN bridge.
* e5d5193 Commit made by the Bioconductor Git-SVN bridge.
* 67b5048 Commit made by the Bioconductor Git-SVN bridge.

Bioc-to-Git: Pull down all commits from the Bioconductor SVN repository

To update the local bioc/devel branch with what is on the Bioconductor SVN server, do:

$ git bioc pull

Bioc-to-Git: Update master branch with bioc/devel branch

To update the local master branch with updates on the local bioc/devel branch, do:

$ git bioc import

Git-to-Bioc: Update bioc/devel branch with master branch

To update the local bioc/devel branch with updates on the local master branch, do:

$ git bioc export
[...]

Git-to-Bioc: Push bioc/devel branch to Bioconductor SVN repository

To push (formally svn commit) the local bioc/devel branch to the Bioconductor SVN server, do:

$ git bioc push
Switched to branch 'bioc/devel'
Your branch is up-to-date with 'bioc/master'.
Committing to https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/illuminaio ...
[...]

Installation instructions

To use the git bioc commands, place all git-bioc* files on the PATH. For instance, if you have ~/bin/ on the PATH, then copy them there:

git clone https://github.com/HenrikBengtsson/git-bioc.git
cp git-bioc/bin/git-bioc* ~/bin/
chmod ugo+x ~/bin/git-bioc*

After this, you can verify the installation as:

$ git bioc
usage: git bioc <subcommand>

Available subcommands are:
   export    Copies updates from master branch to bioc/devel.
   import    Cherry-picks commits from bioc/devel into master branch.
   info      Show information about Bioconductor devel SVN.
   init      Initialize a new git bioc repo.
   pull      Update branch bioc/devel with devel on Bioconductor SVN server.
   push      Commit bioc/devel updates to Bioconductor SVN server.

git-bioc's People

Contributors

henrikbengtsson avatar

Stargazers

Bohdan Khomtchouk avatar Przemyslaw Stempor avatar Lorena Pantano avatar HarryZhu avatar nima hejazi avatar Peter Hickey avatar Andrew McDavid avatar Diego Diez avatar Caleb Lareau avatar Gökçen Eraslan avatar

Watchers

James Cloos avatar  avatar HarryZhu avatar  avatar

Forkers

mtmorgan

git-bioc's Issues

Make use of git config

Make use of git config for setting default options such has how to import / export between the Git master and the bioc/devel SVN branch. For example,

$ git config git-bioc.import.method "copy-into-one-commit"
$ git config git-bioc.import.method 
copy-into-one-commit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.