Validation Package test

Language: F#

validation; my-package; thing

v7.0.0 released on 07/28/2026

by John Doe; Jane Doe

90 Downloads

this package is here for testing purposes only.


Install with arc-validate

 arc-validate package install test --version 7.0.0

Include in a PLANTDataHUB CQC pipeline

validation_packages:
  - name: test
    version: 7.0.0

Available Commands

Input Type Binding Documentation
test boolean (optional) --test Enable test mode
echo string (optional) --echo Print the supplied text

Description

this package is here for testing purposes only - now with payload in json output.


Release notes

add CWL command inputs


Browse code for v7.0.0 (fsharp)
let [<Literal>]PACKAGE_METADATA = """(*
---
Name: test
MajorVersion: 7
MinorVersion: 0
PatchVersion: 0
Publish: true
Summary: this package is here for testing purposes only.
Description: this package is here for testing purposes only - now with payload in json output.
Inputs:
  - id: test
    type: boolean?
    doc: Enable test mode
    inputBinding:
      prefix: --test
  - id: echo
    type: string?
    doc: Print the supplied text
    inputBinding:
      prefix: --echo
Authors:
  - FullName: John Doe
    Email: j@d.com
    Affiliation: University of Nowhere
    AffiliationLink: https://nowhere.edu
  - FullName: Jane Doe
    Email: jj@d.com
    Affiliation: University of Somewhere
    AffiliationLink: https://somewhere.edu
Tags:
  - Name: validation
  - Name: my-package
  - Name: thing
ReleaseNotes: add CWL command inputs
CQCHookEndpoint: https://archigator-beta.nfdi4plants.org
---
*)"""

printfn "If you can read this in your console, you are executing test package v7.0.0!" 

#r "nuget: ARCExpect.Core, 7.0.0-alpha"

open ARCExpect
open Expecto

module CLIArgs =

    type Args = {
        // -i and -o will always get passed if the package is called via arc-validate
        InputPath: string
        OutputPath: string
        Test : bool
        Echo : string
    }

    let defaultArgs = {
        InputPath = ""
        OutputPath = ""
        Test = false
        Echo = ""
    }

    let rec parseArgs args state =
        match args with
        | ("-t" | "--test") :: rest ->
            parseArgs rest { state with Test = true }
        | "-e" :: value :: rest ->
            parseArgs rest { state with Echo = value }
        | "--echo" :: value :: rest ->
            parseArgs rest { state with Echo = value }
        | "-i" :: value :: rest ->
            parseArgs rest { state with InputPath = value }
        | "-o" :: value :: rest ->
            parseArgs rest { state with OutputPath = value }
        | unknown :: _ ->
            failwith $"Unknown argument: {unknown}. Valid arguments are: -i, --input, -o, --output, -t, --test, -e, --echo"
        | [] ->
            state

let args =
    fsi.CommandLineArgs
    |> Array.skip 1
    |> Array.toList
    |> fun args -> CLIArgs.parseArgs args CLIArgs.defaultArgs

if args.Test then
    printfn "Test mode enabled."

printfn $"Echo: {args.Echo}"

printfn $"InputPath: {args.InputPath}"

printfn $"OutputPath: {args.OutputPath}"

let test_package =
    Setup.ValidationPackage(
        metadata = Setup.Metadata(PACKAGE_METADATA, AVPRIndex.Frontmatter.FSharpFrontmatter),
        CriticalValidationCases = [
            test "yes" {Expect.equal 1 1 "yes"}
        ]
    )

open System.Collections.Generic

test_package
|> Execute.ValidationPipeline(
    basePath = System.Environment.CurrentDirectory,
    Payload = Dictionary<string,obj>([
        KeyValuePair("some", box "payload")
        KeyValuePair(
            "inner", 
            box (
                Dictionary<string,obj>([
                    KeyValuePair("inner?", box "yes")
                ])
            )
        )
        KeyValuePair("integer", box 42)
    ])
)

printfn "If you can read this in your console, you successfully executed test package v7.0.0!"

Available versions
Version Released on
7.0.0 07/28/2026
6.0.3 07/28/2026
6.0.2 07/28/2026
6.0.1 07/28/2026
6.0.0 07/28/2026
5.0.0 07/28/2026
5.0.0-use+suffixes 07/28/2026
4.0.0 07/28/2026
3.0.0 07/28/2026
2.0.1 07/28/2026
2.0.0 07/28/2026
1.0.1 07/28/2026
1.0.0 07/28/2026
0.0.2 07/28/2026
0.0.1 07/28/2026