Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRIDE bugfix: Values in fixed/variable modification column must not be empty #6

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 59 additions & 35 deletions tests/ReferenceObjects.fs
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,90 @@ module General =

module invenio =

module ArcPrototype =
module ``3_0_0`` =

let validationResultCritical =
ValidationResult.create(10,10,0,0)
module ArcPrototype =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,10,0,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)

module testARC_empty =

let validationResultCritical =
ValidationResult.create(10,4,6,0)
module testARC_empty =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,4,6,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)

module testARC_emptyContactsColumn =

let validationResultCritical =
ValidationResult.create(10,6,4,0)
module testARC_emptyContactsColumn =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,6,4,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)

module testARC_shiftedContactsCells =

let validationResultCritical =
ValidationResult.create(10,9,1,0)
module testARC_shiftedContactsCells =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,9,1,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)

module testARC_shiftedTitleCell =

let validationResultCritical =
ValidationResult.create(10,10,0,0)
module testARC_shiftedTitleCell =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,10,0,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)

module testARC_wrongEmail =

let validationResultCritical =
ValidationResult.create(10,9,1,0)
module testARC_wrongEmail =

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultCritical =
ValidationResult.create(10,9,1,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)


module pride =

module testARC_proteomicsCorrect =
module ``1_0_3`` =

module testARC_proteomicsCorrect =

let validationResultCritical =
ValidationResult.create(22,22,0,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)


module ``1_0_4`` =

module testARC_proteomicsCorrect =

let validationResultCritical =
ValidationResult.create(23,23,0,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)


module testARC_proteomicsModifValueMissing =

let validationResultCritical =
ValidationResult.create(22,22,0,0)
let validationResultCritical =
ValidationResult.create(23,22,1,0)

let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
let validationResultNonCritical =
ValidationResult.create(0,0,0,0)
1 change: 1 addition & 0 deletions tests/ValidationPackages.Tests.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<Compile Include="GitSubmodulesTests.fs" />
<Compile Include="invenio%403.0.0.fs" />
<Compile Include="pride%401.0.3.fs" />
<Compile Include="pride%401.0.4.fs" />
<Compile Include="Program.fs" />
</ItemGroup>

Expand Down
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
Empty file.
Binary file not shown.
Binary file not shown.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
<testsuite name="fsi">
<testcase name="[ Critical; INVESTIGATION; Investigation Title ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Description ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person First Name exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person First Name is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Last Name exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Last Name is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Affiliation exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Affiliation is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Email ]" time="0.001" />
<testcase name="[ Critical; STUDY; STUDY PROTOCOLS ]" time="0.001" />
<testcase name="[ Critical; STUDY; STUDY PROTOCOLS description ]" time="0.001" />
<testcase name="[ Critical; STUDY; Tissue ]" time="0.001" />
<testcase name="[ Critical; STUDY; Organism ]" time="0.001" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Email exists ]" time="0.000" />
<testcase name="[ Critical; STUDY; Tissue terms ]" time="0.000" />
<testcase name="[ Critical; STUDY; Organism terms ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type Term Accession Number ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type Term Source REF ]" time="0.000" />
<testcase name="[ Critical; ASSAY; instrument model ]" time="0.000" />
<testcase name="[ Critical; ASSAY; instrument model terms ]" time="0.000" />
<testcase name="[ Critical; ASSAY; modification ]" time="0.000" />
<testcase name="[ Critical; ASSAY; modification values ]" time="0.000" />
</testsuite>
</testsuites>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<testsuites>
<testsuite name="fsi">
<testcase name="[ Critical; INVESTIGATION; Investigation Title ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Description ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person First Name exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person First Name is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Last Name exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Last Name is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Affiliation exists ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Affiliation is not empty ]" time="0.003" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Email ]" time="0.001" />
<testcase name="[ Critical; STUDY; STUDY PROTOCOLS ]" time="0.001" />
<testcase name="[ Critical; STUDY; STUDY PROTOCOLS description ]" time="0.001" />
<testcase name="[ Critical; STUDY; Tissue ]" time="0.001" />
<testcase name="[ Critical; STUDY; Organism ]" time="0.001" />
<testcase name="[ Critical; INVESTIGATION; Investigation Person Email exists ]" time="0.000" />
<testcase name="[ Critical; STUDY; Tissue terms ]" time="0.000" />
<testcase name="[ Critical; STUDY; Organism terms ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type Term Accession Number ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type ]" time="0.000" />
<testcase name="[ Critical; ASSAY; Assay Technology Type Term Source REF ]" time="0.000" />
<testcase name="[ Critical; ASSAY; instrument model ]" time="0.000" />
<testcase name="[ Critical; ASSAY; instrument model terms ]" time="0.000" />
<testcase name="[ Critical; ASSAY; modification ]" time="0.000" />
<testcase name="[ Critical; ASSAY; modification values ]" time="0.000" />
</testsuite>
</testsuites>
26 changes: 13 additions & 13 deletions tests/[email protected]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module invenio
module invenio_3_0_0


open ValidationPackages.Tests
Expand Down Expand Up @@ -75,8 +75,8 @@ type ArcPrototype() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.ArcPrototype.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.ArcPrototype.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.ArcPrototype.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.ArcPrototype.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand All @@ -102,8 +102,8 @@ type testARC_empty() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.testARC_empty.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.testARC_empty.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_empty.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_empty.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand All @@ -129,8 +129,8 @@ type testARC_emptyContactsColumn() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.testARC_emptyContactsColumn.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.testARC_emptyContactsColumn.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_emptyContactsColumn.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_emptyContactsColumn.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand All @@ -156,8 +156,8 @@ type testARC_shiftedContactsCells() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.testARC_shiftedContactsCells.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.testARC_shiftedContactsCells.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_shiftedContactsCells.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_shiftedContactsCells.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand All @@ -183,8 +183,8 @@ type testARC_shiftedTitleCell() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.testARC_shiftedTitleCell.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.testARC_shiftedTitleCell.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_shiftedTitleCell.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_shiftedTitleCell.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand All @@ -210,8 +210,8 @@ type testARC_wrongEmail() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.invenio.testARC_wrongEmail.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.testARC_wrongEmail.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_wrongEmail.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.invenio.``3_0_0``.testARC_wrongEmail.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand Down
6 changes: 3 additions & 3 deletions tests/[email protected]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module pride
module pride_1_0_3


open ValidationPackages.Tests
Expand Down Expand Up @@ -53,8 +53,8 @@ type testARC_proteomicsCorrect() =

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.pride.testARC_proteomicsCorrect.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.pride.testARC_proteomicsCorrect.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)
Assert.Equal(ReferenceObjects.pride.``1_0_3``.testARC_proteomicsCorrect.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.pride.``1_0_3``.testARC_proteomicsCorrect.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Expand Down
88 changes: 88 additions & 0 deletions tests/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
module pride_1_0_4


open ValidationPackages.Tests
open TestUtils

open Xunit
open ARCExpect

open System.IO
open System


type BaseTool_Fixture(scriptName : string, version : string, arcfolder : string) =

let result = runTool "dotnet" [|"fsi"; $"../../validation_packages/{scriptName}/{scriptName}@{version}.fsx"|] $"fixtures/{arcfolder}"

let arcExpectValidationResult = ARCExpect.ValidationSummary.fromJson (File.ReadAllText $"fixtures/{arcfolder}/.arc-validate-results/{scriptName}@{version}/validation_summary.json")

let jUnitResult = JUnitResults.fromJUnitFile $"fixtures/{arcfolder}/.arc-validate-results/{scriptName}@{version}/validation_report.xml"

let jUnitExpected = JUnitResults.fromJUnitFile $"fixtures/validationReport/{scriptName}/{version}/{arcfolder}/validation_report.xml"

interface IDisposable with
override this.Dispose() =
Directory.Delete($"fixtures/{arcfolder}/.arc-validate-results/{scriptName}@{version}/", true)

member this.Result = result

member this.ArcExpectValidationResult = arcExpectValidationResult

member this.JUnitResult = jUnitResult

member this.JUnitExpected = jUnitExpected


type testARC_proteomicsCorrect_Fixture() =

inherit BaseTool_Fixture("pride", "1.0.4", "testARC_proteomicsCorrect")


type testARC_proteomicsCorrect() =

let tool_fixture = new testARC_proteomicsCorrect_Fixture()

interface IClassFixture<testARC_proteomicsCorrect_Fixture>

member this.Fixture with get() = tool_fixture

[<Fact>]
member this.``result Exitcode is 0`` () =
Assert.Equal(0, this.Fixture.Result.ExitCode)

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.pride.``1_0_4``.testARC_proteomicsCorrect.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.pride.``1_0_4``.testARC_proteomicsCorrect.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Assert.Equal(this.Fixture.JUnitExpected, this.Fixture.JUnitResult)


type testARC_proteomicsModifValueMissing_Fixture() =

inherit BaseTool_Fixture("pride", "1.0.4", "testARC_proteomicsCorrect")


type testARC_proteomicsModifValueMissing() =

let tool_fixture = new testARC_proteomicsModifValueMissing_Fixture()

interface IClassFixture<testARC_proteomicsModifValueMissing_Fixture>

member this.Fixture with get() = tool_fixture

[<Fact>]
member this.``result Exitcode is 0`` () =
Assert.Equal(0, this.Fixture.Result.ExitCode)

[<Fact>]
member this.``validation_summary JSON is equal`` () =
Assert.Equal(ReferenceObjects.pride.``1_0_4``.testARC_proteomicsCorrect.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.pride.``1_0_4``.testARC_proteomicsCorrect.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

[<Fact>]
member this.``validation_report XML is equal`` () =
Assert.Equal(this.Fixture.JUnitExpected, this.Fixture.JUnitResult)
Loading
Loading