Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

Code Integration

...

R Convenience Functions

codeObj <- Code(name, parent, codeRepo)

parameters

name

parent: a Project ID

codeRepo:  the (brief and easily remembered) name of the code repository.  If omitted, a default is used.

side effects

none

returns

new Code object

addFile(codeObj, localPath, repoPath)

parameters

codeObj

localPath: path to file or directory on machine running the R session

repoPath: path relative to repository.  If omitted then a default path is generated.

side effects

 none

returns

 nothing

storeEntity(codeObj)

parameters

 codeObj

side effects

Checks that code is committed to svn, stops if not. 

Creates metadata in Synapse, including code version.

returns

 nothing

loadEntity(codeId, localPath, repoSync=F)

parameters
side effects
returns

deleteEntity(codeId)

parameters

codeId: ID of the object in Synapse

side effects

Delete metadata from Synapse.

Delete from the code repository. [Alt: Print out delete command that user should execute.]

returns

Nothing.

TODO: What if not all steps are successful?
TODO: Should we delete from the local disk? From the R session?

TODO: Can we defer the convenience function for loading a specific code version?

Scenarios

...

Scenarios

The development cycle for preexisting code:  The code is Downloaded from Synapse, and Loaded into the R session.  The user repeatedly Runs, Edits and reLoads the code.  When satisfied, she may Store the code back to Synapse.  To help capture provenance, the Load and Store functions put the Code's ID and version into the current Step.  For the provenance record to be accurate, the user must Store prior to running.

  Image Added

Discover, retrieve, load and run code

A user, browsing Synapse, sees a piece of code of interest (mentioned in a discussion or used in an analysis), and clicks on it.  She sees:# Load in Synapse R Client:

entity.3733 <- loadCodedownloadEntity(3733)

and begins by executing this in R.

(Note:  "Repo" is the code repository client.  The interaction between the repository client and server is not shown.)

Retrieve existing code, modify and save.

Image Removed

Develop new code, then

...

(Per Matt F., this is an important use case for data curators.)
Image Removed

Run code and capture provenance info.

...

Store

Image Added