Skip to content

Commit c49e60d

Browse files
committed
Remove redundant mentions of Github
1 parent cc0ea09 commit c49e60d

File tree

8 files changed

+18
-15
lines changed

8 files changed

+18
-15
lines changed

src/main/java/org/commonwl/view/cwl/CWLToolRunner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void createWorkflowFromQueued(QueuedWorkflow queuedWorkflow, File workflo
8585
workflowRepository.save(newWorkflow);
8686

8787
// Generate RO bundle
88-
roBundleFactory.workflowROFromGithub(newWorkflow);
88+
roBundleFactory.createWorkflowRO(newWorkflow);
8989

9090
// Mark success on queue
9191
queuedWorkflow.setCwltoolStatus(CWLToolStatus.SUCCESS);

src/main/java/org/commonwl/view/cwl/CWLToolStatus.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
* Cwltool run status
55
*/
66
public enum CWLToolStatus {
7-
RUNNING, ERROR, SUCCESS
7+
DOWNLOADING,
8+
RUNNING,
9+
ERROR,
10+
SUCCESS
811
}

src/main/java/org/commonwl/view/researchobject/ROBundleFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public ROBundleFactory(ROBundleService roBundleService,
6363
* @throws IOException Any API errors which may have occurred
6464
*/
6565
@Async
66-
public void workflowROFromGithub(Workflow workflow)
66+
public void createWorkflowRO(Workflow workflow)
6767
throws IOException, InterruptedException {
6868
logger.info("Creating Research Object Bundle");
6969

@@ -72,7 +72,7 @@ public void workflowROFromGithub(Workflow workflow)
7272
GitDetails roDetails = new GitDetails(githubInfo.getRepoUrl(), githubInfo.getBranch(),
7373
FilenameUtils.getPath(githubInfo.getPath()));
7474

75-
// Create a new Research Object Bundle with Github contents
75+
// Create a new Research Object Bundle
7676
Bundle bundle = roBundleService.createBundle(workflow, roDetails);
7777

7878
// Save the bundle to the storage location in properties

src/main/java/org/commonwl/view/researchobject/ROBundleService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
129129
Path bundlePath = bundleRoot.resolve("workflow");
130130
Files.createDirectory(bundlePath);
131131

132-
// Add the files from the Github repo to this workflow
132+
// Add the files from the repo to this workflow
133133
Set<HashableAgent> authors = new HashSet<>();
134134
Git gitRepo = gitService.getRepository(workflow.getRetrievedFrom());
135135
Path relativePath = Paths.get(FilenameUtils.getPath(gitInfo.getPath()));
@@ -199,7 +199,7 @@ public Bundle createBundle(Workflow workflow, GitDetails gitInfo) throws IOExcep
199199
}
200200

201201
/**
202-
* Add files to this bundle from a list of Github repository contents
202+
* Add files to this bundle from a list of repository contents
203203
* @param gitDetails The Git information for the repository
204204
* @param bundle The RO bundle to add files/directories to
205205
* @param bundlePath The current path within the RO bundle

src/main/java/org/commonwl/view/workflow/WorkflowController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public String searchWorkflows(Model model,
106106
* @return The workflow view with new workflow as a model
107107
*/
108108
@PostMapping("/workflows")
109-
public ModelAndView newWorkflowFromGithubURL(@Valid WorkflowForm workflowForm, BindingResult bindingResult) {
109+
public ModelAndView createWorkflow(@Valid WorkflowForm workflowForm, BindingResult bindingResult) {
110110

111111
// Run validator which checks the git URL is valid
112112
GitDetails gitInfo = workflowFormValidator.validateAndParse(workflowForm, bindingResult);
@@ -122,7 +122,7 @@ public ModelAndView newWorkflowFromGithubURL(@Valid WorkflowForm workflowForm, B
122122
workflow = workflowService.createQueuedWorkflow(gitInfo).getTempRepresentation();
123123
} catch (GitAPIException ex) {
124124
bindingResult.rejectValue("url", "git.retrievalError");
125-
logger.error("Github API Error", ex);
125+
logger.error("Git API Error", ex);
126126
return new ModelAndView("index");
127127
} catch (WorkflowNotFoundException ex) {
128128
bindingResult.rejectValue("url", "git.pathTraversal");
@@ -363,10 +363,10 @@ public FileSystemResource getTempGraphAsPng(@PathVariable("queueID") String queu
363363

364364

365365
/**
366-
* Extract the Github path from the end of a full request string
366+
* Extract the path from the end of a full request string
367367
* @param path The full request string path
368368
* @param startSlashNum The ordinal slash index of the start of the path
369-
* @return THe Github path from the end
369+
* @return The path from the end
370370
*/
371371
public static String extractPath(String path, int startSlashNum) {
372372
int pathStartIndex = StringUtils.ordinalIndexOf(path, "/", startSlashNum);
@@ -452,7 +452,7 @@ private ModelAndView getWorkflow(GitDetails gitDetails, RedirectAttributes redir
452452
queued = workflowService.createQueuedWorkflow(gitDetails);
453453
} catch (GitAPIException ex) {
454454
errors.rejectValue("url", "git.retrievalError", "The workflow could not be retrieved from the Git repository using the details given");
455-
logger.error("Github API Error", ex);
455+
logger.error("Git API Error", ex);
456456
} catch (WorkflowNotFoundException ex) {
457457
errors.rejectValue("url", "git.pathTraversal", "The path given did not resolve to a location within the repository");
458458
} catch (IOException ex) {

src/main/java/org/commonwl/view/workflow/WorkflowRESTController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public Page<Workflow> searchWorkflowsJson(Model model,
8686
}
8787

8888
/**
89-
* Create a new workflow from the given github URL
89+
* Create a new workflow from the given URL
9090
* @param url The URL of the workflow
9191
* @return Appropriate response code and optional JSON string with message
9292
*/
@@ -139,7 +139,7 @@ public ResponseEntity<?> newWorkflowFromGithubURLJson(@RequestParam(value="url")
139139
}
140140

141141
/**
142-
* Get the JSON representation of a workflow from Github details
142+
* Get the JSON representation of a workflow from Github or Gitlab details
143143
* @param domain The domain of the hosting site, Github or Gitlab
144144
* @param owner The owner of the Github repository
145145
* @param repoName The name of the repository

src/main/java/org/commonwl/view/workflow/WorkflowService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public void retryCwltool(QueuedWorkflow queuedWorkflow) {
292292
*/
293293
private void generateROBundle(Workflow workflow) {
294294
try {
295-
ROBundleFactory.workflowROFromGithub(workflow);
295+
ROBundleFactory.createWorkflowRO(workflow);
296296
} catch (Exception ex) {
297297
logger.error("Error creating RO Bundle", ex);
298298
}

src/test/java/org/commonwl/view/researchobject/ROBundleFactoryTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void bundleForValidWorkflow() throws Exception {
6363
ROBundleFactory factory = new ROBundleFactory(mockROBundleService, mockRepository);
6464

6565
// Attempt to add RO to workflow
66-
factory.workflowROFromGithub(validWorkflow);
66+
factory.createWorkflowRO(validWorkflow);
6767

6868
assertEquals("test/path/to/check/for.zip", validWorkflow.getRoBundlePath());
6969

0 commit comments

Comments
 (0)