...
R Convenience Functions
"Level 1" functions
saveCode(localFolder, codeRepo)
parameters
localFolder: folder or file on the local file system
'codeRepo' short 'nickname' of code repository system. If 'codeRepo' is omitted, user's default is used.
side effects
Register folder with code repository, if not already registered.
Commit code.
Create metadata in Synapse, if not already created.
returns
ID of the object created in Synapse
Note: Code version is not recorded.
loadCode(id)
parameters
ID of the object in Synapse
side effects
Checks out code from code repository, if not already checked out. Otherwise, updates local copy from code repository.
"Sources" code into R session.
returns
nothing
TODO: What if not all steps are successful?
delete(id)
parameters
ID of the object in Synapse
side effects
Delete from the code repository.
Delete metadata from Synapse.
returns
Nothing.
TODO: What if not all steps are successful?
"Level 2" functions
Web Services
...
Code Block |
---|
POST https://repo-staging.sagebase.org/repo/v1/codeRepo {"codeRepoType":"svn", "nickname":"sageSvn", "codeRepoURL":"https://sagebionetworks.jira.com/svn"} |
...
Code Block |
---|
HTTP/1.1 201 Created {id:"9876", "codeRepoType":"svn", "codeRepoURL":"https://sagebionetworks.jira.com/svn"} |
TODO: Error response if 'nickname' is already used.
TODO: GET, PUT, DELETE
Create Code Repo Credentials
...