Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
git checkout develop
git pull upstream develop

 

 

Now create a feature branch, named after the JIRA issue you're working on, e.g. for issue SYNR-1234:

Code Block
git checkout -b SYNR-1234

Installing compilation tools (Windows ONLY):

Windows does not have the necesssary tools to build R packages preinstalled so you must download them from http://mirror.fcaglp.unlp.edu.ar/CRAN/bin/windows/Rtools/
You will also need to download the binary for the wget tool from http://downloads.sourceforge.net/gnuwin32/wget-1.11.4-1-bin.zip and extract the executable to the bin folder of your Rtools (default is C:\\Rtools\\bin)

Build the Client and run the test suite

Build the client

Once you've made changes it's time to build the client and run the test suite.  There are two ways to build.  Both paths download the Synapse object JSON schemas and auto-generate certain documentation files.  The first does a basic installation in just a few seconds:

  1. tools/prebuild.sh
  2. R CMD install .

The second option does a complete build, including 'vignettes'.  It requires LaTeX to be installed on your machine and takes a minute or more to run:

  1. tools/build.sh

Run the test suite

Now start up R and run the test suite:

Code Block
library(synapseClient)
synapseClient:::.test()

synapseLogin()
synapseClient:::.integrationTest()

".test()" runs unit tests, i.e. tests which do not contact the Synapse server.  ".integrationTest()" runs those tests that do contact the server, creating and deleting content as they go.

Sometimes a client feature is developed in concert with a back end change.  Back end changes are deployed to a "staging" version of the server for a week before becoming production. To direct a client to this staging back end do the following:

Code Block
library(synapseClient)
synSetEndpoints("https://repo-staging.prod.sagebase.org/repo/v1", "https://repo-staging.prod.sagebase.org/auth/v1", "https://repo-staging.prod.sagebase.org/file/v1", "https://portal-staging.prod.sagebase.org")
# now log in, run integration tests, or perform other server interaction
synapseLogin()
synapseClient:::.integrationTest()

...