-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update test UTILS and test multi profile job matrix
- Loading branch information
1 parent
aa654d1
commit 1a4605c
Showing
11 changed files
with
55 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,38 @@ | ||
// Function to remove Nextflow version from software_versions.yml | ||
// Helper functions for pipeline tests | ||
|
||
class UTILS { | ||
|
||
// Function to remove Nextflow version from software_versions.yml | ||
public static String removeNextflowVersion(outputDir) { | ||
def softwareVersions = path("$outputDir/pipeline_info/software_versions.yml").yaml | ||
if (softwareVersions.containsKey("Workflow")) { | ||
softwareVersions.Workflow.remove("Nextflow") | ||
} | ||
return softwareVersions | ||
} | ||
|
||
// Function to filter lines from a file and return a new file | ||
public static File filterLines(String inFilePath, int linesToSkip) { | ||
if (linesToSkip >= 0) { | ||
File inputFile = new File(inFilePath) | ||
File outputFile = new File(inFilePath + ".filtered") | ||
def lineCount = 0 | ||
inputFile.eachLine { line -> | ||
lineCount++ | ||
if (lineCount > linesToSkip) { | ||
outputFile.append(line + '\n') | ||
} | ||
} | ||
return outputFile | ||
} else { | ||
File inputFile = new File(inFilePath) | ||
File outputFile = new File(inFilePath + ".filtered") | ||
def lines = inputFile.readLines() | ||
def totalLines = lines.size() | ||
lines.take(totalLines + linesToSkip).each { line -> | ||
outputFile.append(line + '\n') | ||
} | ||
return outputFile | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.