Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
{section} {column:width=50%} On This page {toc} {column} {column:width=5%} {column} {column:width=45%} On Related Pages {pagetree:root=@self|startDepth=3} {column} {section} h2. Standard Tools These are the tools we have pretty much settled on as a team.  For ease and consistency of development please try to remain on these tools and discuss with the team before introducing competing technologies. * Operating System: what ever floats your boat. * IDE: [Eclipse|http://www.eclipse.org/] commonly used and free * Wiki / Issue Tracker / Code Browsing and Reviewing / Automated Builds: we have a [Jira Studio|http://www.atlassian.com/hosted/studio/] subscription  (Nicole Deflaux and Mike Kellen as admins) * Code versioning: [Subversion|http://subversion.tigris.org/], hosted by Atlassian as part of our Jira Studio subscription * Build System: [Maven|http://maven.apache.org/] * Build repository manager: see [Sage's hosted Artifactory service|http://sagebionetworks.artifactoryonline.com/sagebionetworks/webapp/home.html] see [jFrog website|http://www.jfrog.org/products.php] for info (John Hill and Mike Kellen as admins) h3. Profilers * [JProfiler|http://www.ej-technologies.com/products/jprofiler/overview.html] * [CodePro|http://code.google.com/javadevtools/codepro/doc/index.html] h3. Code Coverage We have been approved for free licenses to use Clover (Atlassian Code Coverage tool) for Eclipse. To install the Clover plug-in for eclipse you can use the update site [
Wiki Markup
Section
Column
width50%

On This page

Table of Contents
Column
width5%

Column
width45%

On Related Pages

Page Tree
rootPLFM:@self
startDepth3

Standard Tools

These are the tools we have pretty much settled on as a team.  For ease and consistency of development please try to remain on these tools and discuss with the team before introducing competing technologies.

  • Operating System: what ever floats your boat.
  • IDE: Eclipse commonly used and free
  • Wiki / Issue Tracker / Code Browsing and Reviewing / Automated Builds: we have a Jira Studio subscription  (Nicole Deflaux and Mike Kellen as admins)
  • Code versioning: Subversion, hosted by Atlassian as part of our Jira Studio subscription
  • Build System: Maven
  • Build repository manager: see Sage's hosted Artifactory service see jFrog website for info (John Hill and Mike Kellen as admins)

Profilers

Code Coverage

We have been approved for free licenses to use Clover (Atlassian Code Coverage tool) for Eclipse. To install the Clover plug-in for eclipse you can use the update site http://update.atlassian.com/eclipse/clover

...

Eclipse users:

...

Within

...

Eclipse,

...

select

...

from

...

the

...

menu

...

"Window

...

>

...

Preferences"

...

and

...

click

...

on

...

"Clover

...

>

...

License"

...

and

...

paste

...

the

...

above

...

license

...

string

...

into

...

the

...

license

...

text

...

area.

...

MONqrDkXrjMnJciwRtLBAEGFOmnBGjNmbRRWECCaUafBQo

...


mi2Kehqg3mIlkHdhHlTejumx2KzaGJQIsBkyJf66uTXT7W

...


NPQQsvpRQnqmPnrRpQPSunQNrOQnnRqMNovXXwssmXtvsW

...


vSttxsuurRqopnmomUUnovrnuoummmmmUUnovrnuoummmm

...


mUUJXdbW2flkbqtlohpUUnmmmm

Java

Libraries

At this point we don't

...

have

...

any

...

strict

...

licensing

...

requirements,

...

however

...

to

...

maintain

...

flexibility

...

we

...

have

...

to

...

be

...

careful

...

about

...

licenses

...

for

...

software

...

we

...

choose

...

to

...

incorporate

...

into

...

our

...

system.

...

 The best licenses are open source licenses without copy-left

...

provisions

...

(e.g.

...

Apache

...

License

...

) that give us maximal flexibility in what we later do with the code base.  Some strong copy-left licenses (e.g.

...

 GPL) would impose licensing requirements on us (e.g.

...

force

...

us

...

to

...

use

...

GPL

...

ourselves)

...

if

...

we

...

chose

...

to

...

redistribute

...

the

...

code

...

base

...

at

...

a

...

later

...

date.

...

For

...

now,

...

we

...

should

...

just

...

be

...

aware

...

of

...

the

...

mix

...

of

...

licenses

...

incorporated

...

into

...

our

...

projects,

...

and

...

have

...

a

...

bias

...

for

...

open

...

source,

...

non-copy

...

left

...

licenses.

...

  • Application

...

  • Framework:

...

R

Python

Python Examples for Perl programmers

  1. Example: empty dictionary, add values to it
    Code Block
    
            layer = {}
            layer["type"] = row[1]
            layer["status"] = row[2]
            layer["name"] = row[3]
            layer["numSamples"] = row[4]
            layer["platform"] = row[5]
            layer["version"] = row[6]
            layer["qcBy"] = row[11]
    

...

  1. Example:

...

  1. create

...

  1. a

...

  1. populated

...

  1. dictionary

...

  1. Code Block

...

  1. 
    CSV_TO_PRIMARY_FIELDS = {
        'name': 'name',
        'description': 'description',
        'Investigator': 'creator',
        'Creation Date': 'creationDate',
        'Status': 'status',
        'date_released': 'releaseDate',
        'version':'version'
        }

...

  1. Example:

...

  1. empty

...

  1. array,

...

  1. add

...

  1. values

...

  1. to

...

  1. it

...

  1. Code Block

...

  1. 
        stringAnnotations = []
        stringAnnotations.append("foo")
    

...

  1. Example:

...

  1. create

...

  1. a

...

  1. populated

...

  1. array

...

  1. Code Block

...

  1. 
    CSV_SKIP_FIELDS = ["db_id","user_agreement_file_path", "readme_file_path"];
    

...

Subversion

For general SVN info see the SVN book

Moving files and directories

The eclipse plugin for svn generally does a decent job moving files and directories. See also http://svnbook.red-bean.com/en/1.1/re18.html

...

Here

...

is

...

an

...

example:

...

  • You

...

  • can

...

  • see

...

  • that

...

  • there

...

  • is

...

  • a

...

  • "deleted"

...

  • file

...

  • here

...

  • but

...

  • it

...

  • was

...

  • actually

...

  • "svn

...

  • moved"

...

...

  • Old

...

  • filename

...

...

  • New

...

  • filename

...

...

  • You

...

  • can

...

  • see

...

  • that

...

  • the

...

  • full

...

  • svn

...

  • history

...

  • is

...

  • shown

...

  • on

...

  • each

...

  • page.

...

svn

...

gets

...

really

...

upset

...

though

...

when

...

you

...

do

...

more

...

complicated

...

things

...

like

...

created

...

a

...

file,

...

delete

...

that

...

file,

...

then

...

make

...

a

...

directory

...

with

...

the

...

same

...

name

...

in

...

the

...

same

...

location

...

as

...

the

...

deleted

...

file.

...

(but

...

that

...

is

...

a

...

pretty

...

odd

...

thing

...

to

...

do

...

anyway)

...

When

...

in

...

doubt,

...

make

...

a

...

developer

...

branch

...

and

...

try

...

it

...

there

...

first.

...

http://svnbook.red-bean.com/en/1.1/ch04s02.html#svn-ch-4-sect-2.1

...

Developer branches

Want to make a drastic change and run it by the team before merging it to trunk? Want to check in broken code? Make a branch and do it there.

Resources

...

  • svnmerge.py

...

  • Documentation

...

...

...

  • the svn switch command is handy to change the branch for your local checked out copy of code

How to Set Up Merge Tracking

  1. Download svnmerge.py
  2. Make a branch directory for yourself (you'll only need to do this once)
    Code Block
    
    svn mkdir https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux
    

...

  1. Make a new branch from trunk
    Code Block
    
    svn copy https://sagebionetworks.jira.com/svn/PLFM/trunk https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux/automatedIntegrationTesting
    

...

  1. Have both trunk and your new branch on your local hard drive, this assumes you already have trunk checked out in directory ~/platform
    Code Block
    
    cd ~/platform
    svn update trunk
    svn checkout https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux/automatedIntegrationTesting
    

...

  1. Initialize merge tracking
    Code Block
    
    cd trunk
    svnmerge.py init ../automatedIntegrationTesting
    svn commit -F svnmerge-commit-message.txt
    cd ../automatedIntegrationTesting
    svnmerge.py init ../trunk
    svn commit -F svnmerge-commit-message.txt
    

...

How to merge

Merge from trunk to your branch

Best Practice: merge changes from trunk to your branch every morning Monday through Friday. This reduces the pain later when you want to merge from your branch to trunk.

  1. Ensure the branch is working and committed to SVN.
  2. To see what branches are available for importing, use this command from the branch distribution:
    Code Block
    
    python svnmerge.py avail
    

...

    • One of the results should be '/PLFM/trunk'.

...

  1. import

...

  1. the

...

  1. changes

...

  1. from

...

  1. trunk

...

  1. into

...

  1. the

...

  1. branch:

...

  1. Code Block

...

  1. 
    python svnmerge.py merge -S /PLFM/trunk
    

...

  1. Resolve conflicts,

...

  1. compile,

...

  1. test

...

  1. and

...

  1. commit

...

  1. EVERYTHING

...

  1. in

...

  1. the

...

  1. branch.

...

Merge

...

from

...

your

...

branch

...

to

...

trunk

...

  1. Go

...

  1. to

...

  1. an

...

  1. up-to-date

...

  1. local

...

  1. distribution

...

  1. of

...

  1. trunk.

...

  1. From

...

  1. the

...

  1. trunk

...

  1. distribution

...

  1. use

...

  1. the

...

  1. 'avail'

...

  1. command

...

  1. (above)

...

  1. to

...

  1. find

...

  1. the

...

  1. branch

...

  1. of

...

  1. interest.

...

  1. Use

...

  1. the

...

  1. following

...

  1. command

...

  1. to

...

  1. find

...

  1. the

...

  1. revision(s)

...

  1. of

...

  1. interest:

...

  1. Code Block

...

  1. 
    python svnmerge.py avail -S <your branch>
    

...

  1. Import the changes from the branch into trunk:
    1. For all changes
      Code Block
      
      python svnmerge.py merge -S <your branch>
      

...

    1. For particular changes
      Code Block
      
      python svnmerge.py merge -r <your revisions comma separated> -S <your branch>
      

...

  1. Resolve conflicts,

...

  1. compile,

...

  1. test

...

  1. and

...

  1. commit.

...

Elastic

...

Bamboo

...

We

...

currently

...

have

...

MySQL

...

running

...

on

...

our

...

Elastic

...

Bamboo

...

host

...

for

...

the

...

purposes

...

of

...

integration

...

testing.

...

This

...

is

...

accomplished

...

by

...

the

...

customise-extras.sh

...

shell

...

script

...

which

...

is

...

run

...

at

...

boot

...

time

...

for

...

the

...

hosts.

...

If

...

you

...

want

...

to

...

import

...

a

...

database

...

dump,

...

install

...

Crowd,

...

etc.,

...

here

...

is

...

how

...

to

...

modify

...

that

...

script:

...

  1. Log

...

  1. onto

...

  1. the

...

  1. currently

...

  1. running

...

  1. elastic

...

  1. instance

...

  1. (or

...

  1. spawn

...

  1. one

...

  1. if

...

  1. none

...

  1. are

...

  1. running).

...

  1. http://confluence.atlassian.com/display/BAMBOO/Accessing+an+Elastic+Instance

...

    • Note

...

    • that

...

    • the

...

    • ssh

...

    • key

...

    • is

...

    • on

...

    • belltown:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/elasticbamboo.pk

...

    • Note that if you want to log onto the AWS console, Mike's

...

    • username

...

    • and

...

    • password

...

    • is

...

    • on

...

    • belltown:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/Mike'sPassword

...

  1. From

...

  1. the

...

  1. shell

...

  1. try

...

  1. out

...

  1. the

...

  1. commands

...

  1. you

...

  1. want

...

  1. to

...

  1. run

...

  1. at

...

  1. boot

...

  1. time

...

  1. Run

...

  1. you

...

  1. build

...

  1. and

...

  1. make

...

  1. sure

...

  1. it

...

  1. works

...

  1. Check

...

  1. your

...

  1. changes

...

  1. to

...

  1. customize-extras.sh

...

  1. into

...

  1. source

...

  1. control

...

  1. PLFM/trunk/tools/bamboo/bin/customise-extras.sh

...

  1. On the bamboo host, overwrite /mnt/bamboo-ebs/bin/customise-extras.sh

...

  1. with

...

  1. your

...

  1. updated

...

  1. script.

...

  1. Follow

...

  1. these

...

  1. instructions

...

  1. to

...

  1. create

...

  1. snapshot

...

  1. and

...

  1. configure

...

  1. bamboo

...

  1. to

...

  1. use

...

  1. it

...

  1. Updating

...

  1. your

...

  1. EBS

...

  1. snapshot
  2. Shutdown the host, and kick off a new build. This should start a new bamboo host that will run your updated script.
  3. Make sure the build passes!

For more information, see:

...

...

Tools To Know About

Pretty-Print

...

JSON

...

Have

...

a

...

large

...

blob

...

of

...

JSON?

...

 Want to see it in human readable format?  Toss it into this web ui: http://jsonformatter.curiousconcept.com/

...

Web Trace Tools

...

...

Sequence Diagram Editors

Don’t waste your time with drawing programs when you can just write something similar to psuedocode.

...

...

Lucene Search

Browse lucene indices with Luke http://www.getopt.org/luke/

...