diff --git a/pom.xml b/pom.xml index a3db0d3d..df775cc1 100644 --- a/pom.xml +++ b/pom.xml @@ -8,13 +8,14 @@ Collection of non-Vaadin, non-Liferay utilities. 4.0.0 Core Utilities Library - 1.12.0 + 1.12.1-SNAPSHOT https://github.com/qbicsoftware/core-utils-lib jar 1.8 1.8 2.17.1 + 3.0.10 UTF-8 UTF-8 @@ -83,7 +84,7 @@ org.codehaus.groovy groovy-bom - 3.0.9 + ${groovy.version} pom import @@ -93,7 +94,7 @@ org.codehaus.groovy groovy-all - 3.0.9 + ${groovy.version} pom @@ -127,7 +128,7 @@ data-model-lib life.qbic - 2.19.0 + 2.20.0 org.mockito diff --git a/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy b/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy index 8b3a3320..02441a0d 100644 --- a/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy +++ b/src/main/groovy/life/qbic/utils/BioinformaticAnalysisParser.groovy @@ -81,7 +81,6 @@ class BioinformaticAnalysisParser implements DatasetParser enum RequiredPipelineFileKeys { SOFTWARE_VERSIONS("softwareVersions"), EXECUTION_REPORT("executionReport"), - PIPELINE_REPORT("pipelineReport") private String keyName @@ -184,19 +183,14 @@ class BioinformaticAnalysisParser implements DatasetParser * "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 @@ -207,15 +201,12 @@ class BioinformaticAnalysisParser implements DatasetParser 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 diff --git a/src/test/groovy/life/qbic/utils/BioinformaticAnalysisSpec.groovy b/src/test/groovy/life/qbic/utils/BioinformaticAnalysisSpec.groovy index b28da5e8..ef61d920 100644 --- a/src/test/groovy/life/qbic/utils/BioinformaticAnalysisSpec.groovy +++ b/src/test/groovy/life/qbic/utils/BioinformaticAnalysisSpec.groovy @@ -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 @@ -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" } @@ -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: diff --git a/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/execution_report.txt b/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/execution_report.html similarity index 100% rename from src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/execution_report.txt rename to src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/execution_report.html diff --git a/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/software_versions.csv b/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/software_versions.csv deleted file mode 100644 index e69de29b..00000000 diff --git a/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/pipeline_report.txt b/src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/software_versions.yml similarity index 100% rename from src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/pipeline_report.txt rename to src/test/resources/dummyFileSystem/bioinformatic-analysis-output/validates/pipeline_info/software_versions.yml