Skip to content

Commit

Permalink
Merge pull request #105 from qbicsoftware/release/1.12.1
Browse files Browse the repository at this point in the history
Prepare Release 1.12.1
  • Loading branch information
sven1103 authored Aug 26, 2022
2 parents 1c9e114 + ff84c0d commit 68aa2c7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 31 deletions.
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
<description>Collection of non-Vaadin, non-Liferay utilities.</description>
<modelVersion>4.0.0</modelVersion>
<name>Core Utilities Library</name>
<version>1.12.0</version>
<version>1.12.1-SNAPSHOT</version>
<url>https://github.com/qbicsoftware/core-utils-lib</url>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<log4j.version>2.17.1</log4j.version>
<groovy.version>3.0.10</groovy.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
Expand Down Expand Up @@ -83,7 +84,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-bom</artifactId>
<version>3.0.9</version>
<version>${groovy.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -93,7 +94,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.9</version>
<version>${groovy.version}</version>
<type>pom</type>
</dependency>

Expand Down Expand Up @@ -127,7 +128,7 @@
<dependency>
<artifactId>data-model-lib</artifactId>
<groupId>life.qbic</groupId>
<version>2.19.0</version>
<version>2.20.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
Expand Down
25 changes: 8 additions & 17 deletions src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class BioinformaticAnalysisParser implements DatasetParser<NfCorePipelineResult>
enum RequiredPipelineFileKeys {
SOFTWARE_VERSIONS("softwareVersions"),
EXECUTION_REPORT("executionReport"),
PIPELINE_REPORT("pipelineReport")

private String keyName

Expand Down Expand Up @@ -184,19 +183,14 @@ class BioinformaticAnalysisParser implements DatasetParser<NfCorePipelineResult>
* "path": "./pipeline_info",
* "children": [],
* "softwareVersions": {
* "name": "software_versions.csv",
* "fileType": "csv",
* "path": "./pipeline_info/software_versions.csv"
* "name": "software_versions.yml",
* "fileType": "yml",
* "path": "./pipeline_info/software_versions.yml"
* },
* "pipelineReport": {
* "name": "pipeline_report.txt",
* "fileType": "txt",
* "path": "./pipeline_info/pipeline_report.txt"*
* },
* "executionReport": {
* "name": "execution_report.txt",
* "fileType": "txt",
* "path": "./pipeline_info/execution_report.txt"
* "name": "execution_report.html",
* "fileType": "html",
* "path": "./pipeline_info/execution_report.html"
* }
* }
* @param pipelineInformation the folder containing the pipeline information
Expand All @@ -207,15 +201,12 @@ class BioinformaticAnalysisParser implements DatasetParser<NfCorePipelineResult>

pipelineInformation.get("children").each { Map child ->
switch (child.get("name")) {
case "software_versions.csv":
case "software_versions.yml":
insertAsProperty(pipelineInformation, child, RequiredPipelineFileKeys.SOFTWARE_VERSIONS.getKeyName())
break
case "execution_report.txt":
case "execution_report.html":
insertAsProperty(pipelineInformation, child, RequiredPipelineFileKeys.EXECUTION_REPORT.getKeyName())
break
case "pipeline_report.txt":
insertAsProperty(pipelineInformation, child, RequiredPipelineFileKeys.PIPELINE_REPORT.getKeyName())
break
default:
//ignoring other children
break
Expand Down
15 changes: 5 additions & 10 deletions src/test/groovy/life/qbic/utils/BioinformaticAnalysisSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package life.qbic.utils

import life.qbic.datamodel.datasets.NfCorePipelineResult
import life.qbic.datamodel.datasets.datastructure.files.nfcore.ExecutionReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.PipelineReport
import life.qbic.datamodel.datasets.datastructure.files.nfcore.SoftwareVersions
import life.qbic.datamodel.datasets.datastructure.folders.DataFolder
import life.qbic.datamodel.datasets.datastructure.folders.nfcore.PipelineInformationFolder
Expand Down Expand Up @@ -57,16 +56,12 @@ class BioinformaticAnalysisSpec extends Specification {
//Files in Root folders can be parsed

SoftwareVersions softwareVersions = pipelineInfo.getSoftwareVersions()
assert softwareVersions.getRelativePath() == "./pipeline_info/software_versions.csv"
assert softwareVersions.getName() == "software_versions.csv"

PipelineReport pipelineReport = pipelineInfo.getPipelineReport()
assert pipelineReport.getRelativePath() == "./pipeline_info/pipeline_report.txt"
assert pipelineReport.getName() == "pipeline_report.txt"
assert softwareVersions.getRelativePath() == "./pipeline_info/software_versions.yml"
assert softwareVersions.getName() == "software_versions.yml"

ExecutionReport executionReport = pipelineInfo.getExecutionReport()
assert executionReport.getRelativePath() == "./pipeline_info/execution_report.txt"
assert executionReport.getName() == "execution_report.txt"
assert executionReport.getRelativePath() == "./pipeline_info/execution_report.html"
assert executionReport.getName() == "execution_report.html"


}
Expand Down Expand Up @@ -109,7 +104,7 @@ class BioinformaticAnalysisSpec extends Specification {

def "parsing a file throws a DataParserException"() {
given:
def pathToDirectory = Paths.get(exampleDirectoriesRoot, "validates/pipeline_info/execution_report.txt")
def pathToDirectory = Paths.get(exampleDirectoriesRoot, "validates/pipeline_info/execution_report.html")
when:
bioinformaticAnalysisParser.parseFrom(pathToDirectory)
then:
Expand Down
Empty file.

0 comments on commit 68aa2c7

Please sign in to comment.