Demo sandbox

From genomewiki
Jump to navigationJump to search

Why use a demo browser?

Frequently it is desirable to demonstrate browser features that are not yet ready to be pushed into the git master branch and/or not ready to be introduced into the genome-test (hgwdev) browser. This is especially so for large or experimental feartures that QA may need to test drive before they are approved to be put into the three week CGI release cycle. Alternatively, you may wish to demonstrate a track organization as represented in trackDb, but you can't build this trackDb into alpha yet. Keeping these features static in your own sandbox is the simplest solution. However, that is not always practical as we all have many things to work on. To help you there are 5 demo sandboxes cleverly named as demo1 through demo5.

Claiming a demo browser

The demo browsers are sandboxes like your own and the cgis live on hgwdev in the appropriate cgi-bin directory: /usr/local/apache/cgi-bin-demo#/
To claim one, you should first see that no one else has that demo directory by seeing who owns the CGIs in that directory and how old they are:

ll /usr/local/apache/cgi-bin-demo2/
-rwxrwxr-x   1 tdreszer protein 11954236 Sep 15  2010 hgTracks
... 

If the CGIs in a demo cgi-bin are more than a couple months old, then that demo browser can be considered fair game. If there is any doubt, ask the owner.

Here is a list of current claims, but it is no doubt out of date as you read this:

Claimed sandbox table

what who when why
demo1 Tim 2011-06-23 jQuery upgrade: jQuery 1.5.1 and DDCL 1.3
demo2 Melissa 2011-05-24 Noncoding content for UCSC Genes, to be reviewed by Pauline.
demo3 Galt 2011-06-27 Data Hubs and parallel remote data fetching
demo4 open
demo5 Fan 2011-06-21 ?

What about htdocs?

Much of the time you will not need a separate htdocs sandbox for your demo. When you will need this is if you have images or CSS style sheets that cannot be put into the genome-test browser yet. Of the 5 demo sandboxes only demo1 and demo2 have htdocs sandbox directories (/usr/local/apache/htdocs-demo2). If you need this functionality, you must claim demo1 or demo2.

Building your demo CGIs

Just like any other sandbox, the demo dirs are built based upon your USER environment variable. Set your USER to "demo2" (or whatever demo you have claimed) and then make your CGIs.

export IMAGEEK=$USER;export USER=demo2;echo $USER  # bash syntax
cd ~/kent/src/hg/
make cgi

And if you have demo1 or demo2 you should make the htdocs as well:

cd ~/kent/src/hg/htdocs
make

Do you need to do a full make (make clean;make...)? It is a good idea, but you are running in the context of your current git branch. If your src/lib and src/hg/lib have already been made, then you only need to assure the CGIs and possibly htdocs get rebuilt. Especially when you are first claiming the demo sandbox, I recommend a full make.

Building your demo assemblies

Just like with your own sandbox, there is a trackDb_demo# for each assembly which will probably be well out of date when you claim a demo sandbox. Chances are that you only need to demo a new feature on one assembly however, so you can just rebuild that assembly as the demo user:

cd ~/kent/src/hg/makeDb/trackDb
make DBS=hg19

Nothing is preventing you from making all assembles as the demo user. It is your time!

Hint: keep track of what your USER environment variable is set to. When you are done building demo2, set this back to yourself!

export USER=$IMAGEEK; echo $USER  # bash syntax

Viewing your demo

This is just another sandbox, so view it like you view your own:

  http://hgwdev-demo1.cse.ucsc.edu
  http://hgwdev-demo2.cse.ucsc.edu
  http://hgwdev-demo3.cse.ucsc.edu
  http://hgwdev-demo4.cse.ucsc.edu
  http://hgwdev-demo5.cse.ucsc.edu

Your demo responsibility

  • Since you are reading this document, go ahead and update the table above, when you claim a demo sandbox.
  • You are responsible for advertising the features you have made available in a demo browser.
  • It is your responsibility to make sure all the CGIs necessary are working. If the feature you added is in the "hgc" CGI but you didn't bring "hgTracks" up to date, then don't be surprised if someone in your target audience thinks your new feature has created a mess and broken the browser in ways entirely unrelated to what you actually coded.
  • Likewise, it is your responsibility to see that all the assemblies necessary are working. If QA wants to test your feature on a mouse assembly then don't cause them irritation by leaving the mouse assembly in some year old state.
  • Finally, you can get out of the way when you are done with a demo browser. Perhaps you should just delete out the CGIs which will make it obvious that you are done with it. And if you are really responsible, you will update the claimed sandbox table above.

Problems? Additions?

So far very few have used these demo sandboxes, so if these instructions are lacking or if you find and resolve problems with this documentation, please extend or correct it.