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

Update PRIDE package to v1.0.3 #4

Merged
merged 4 commits into from
Nov 15, 2024
Merged
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
11 changes: 11 additions & 0 deletions tests/ReferenceObjects.fs
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,16 @@ module invenio =
let validationResultCritical =
ValidationResult.create(10,9,1,0)

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


module pride =

module testARC_proteomicsCorrect =

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

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

<ItemGroup />

<ItemGroup>
<PackageReference Include="ARCExpect" Version="4.0.1" />
<PackageReference Include="Fake.Core.Process" Version="6.0.0" />
Expand Down
Empty file.
Empty file.
Binary file not shown.
Empty file.
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,27 @@
<?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" />
</testsuite>
</testsuites>
61 changes: 61 additions & 0 deletions tests/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
module pride


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.3", "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.testARC_proteomicsCorrect.validationResultCritical, this.Fixture.ArcExpectValidationResult.Critical)
Assert.Equal(ReferenceObjects.pride.testARC_proteomicsCorrect.validationResultNonCritical, this.Fixture.ArcExpectValidationResult.NonCritical)

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