From c4f426712847ad0785ee4f453a5a8dba6d821884 Mon Sep 17 00:00:00 2001 From: Joott <jonathan.ott1994@gmail.com> Date: Thu, 1 Feb 2024 20:04:26 +0100 Subject: [PATCH] add different cwl use cases --- runs/FSharpArcCapsule.yml | 4 +++ workflows/.gitkeep | 0 workflows/FSharpArcCapsule.cwl | 29 ------------------- .../.config/dotnet-tools.json | 5 ---- .../.devcontainer/devcontainer.json | 15 ---------- .../.devcontainer/settings.vscode.json | 3 -- workflows/FSharpArcCapsule/Dockerfile | 10 ------- workflows/FSharpArcCapsule/script.fsx | 20 ------------- 8 files changed, 4 insertions(+), 82 deletions(-) delete mode 100644 workflows/.gitkeep delete mode 100644 workflows/FSharpArcCapsule.cwl delete mode 100644 workflows/FSharpArcCapsule/.config/dotnet-tools.json delete mode 100644 workflows/FSharpArcCapsule/.devcontainer/devcontainer.json delete mode 100644 workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json delete mode 100644 workflows/FSharpArcCapsule/Dockerfile delete mode 100644 workflows/FSharpArcCapsule/script.fsx diff --git a/runs/FSharpArcCapsule.yml b/runs/FSharpArcCapsule.yml index 6ecc43b..8ee0ab0 100644 --- a/runs/FSharpArcCapsule.yml +++ b/runs/FSharpArcCapsule.yml @@ -1,3 +1,7 @@ arcDirectory: class: Directory path: ../ +firstArg: + class: File + path: ../assays/measurement1/dataset/table.csv +secondArg: ./result.csv diff --git a/workflows/.gitkeep b/workflows/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/workflows/FSharpArcCapsule.cwl b/workflows/FSharpArcCapsule.cwl deleted file mode 100644 index f3aa1c3..0000000 --- a/workflows/FSharpArcCapsule.cwl +++ /dev/null @@ -1,29 +0,0 @@ -cwlVersion: v1.2 -class: CommandLineTool -hints: - DockerRequirement: - dockerImageId: "devcontainer" - dockerFile: {$include: "FSharpArcCapsule/Dockerfile"} -requirements: - - class: InitialWorkDirRequirement - listing: - - entryname: arc - entry: $(inputs.arcDirectory) - writable: true - - class: EnvVarRequirement - envDef: - - envName: DOTNET_NOLOGO - envValue: "true" - - envName: CWL - envValue: "true" - - class: NetworkAccess - networkAccess: true -baseCommand: [dotnet, fsi, "./arc/workflows/FSharpArcCapsule/script.fsx"] -inputs: - arcDirectory: - type: Directory -outputs: - output: - type: File - outputBinding: - glob: "./arc/runs/fsResult1/result.csv" \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/.config/dotnet-tools.json b/workflows/FSharpArcCapsule/.config/dotnet-tools.json deleted file mode 100644 index b0e38ab..0000000 --- a/workflows/FSharpArcCapsule/.config/dotnet-tools.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "isRoot": true, - "tools": {} -} \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/.devcontainer/devcontainer.json b/workflows/FSharpArcCapsule/.devcontainer/devcontainer.json deleted file mode 100644 index 71ac9e7..0000000 --- a/workflows/FSharpArcCapsule/.devcontainer/devcontainer.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "F#ARC-Capsule", - "dockerFile": "../Dockerfile", - "appPort": [8080], - "extensions": [ - "ionide.ionide-fsharp", - "ms-vscode.csharp", - "editorconfig.editorconfig", - "ionide.ionide-paket", - "ionide.ionide-fake" - ], - "mounts": [ - "source=${localWorkspaceFolder}/../../,target=/arc,type=bind,consistency=cached" - ] -} \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json b/workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json deleted file mode 100644 index 5b238fa..0000000 --- a/workflows/FSharpArcCapsule/.devcontainer/settings.vscode.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "FSharp.fsacRuntime":"netcore" -} \ No newline at end of file diff --git a/workflows/FSharpArcCapsule/Dockerfile b/workflows/FSharpArcCapsule/Dockerfile deleted file mode 100644 index 982b4cd..0000000 --- a/workflows/FSharpArcCapsule/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -#FROM rocker/r-ver:3.4.4 -FROM mcr.microsoft.com/dotnet/sdk:6.0 -#FROM r-base -# Copy endpoint specific user settings into container to specify -# .NET Core should be used as the runtime. -COPY *.devcontainer/settings.vscode.json /root/.vscode-remote/data/Machine/settings.json - -# Install git, process tools -RUN apt-get update && apt-get -y install git procps - diff --git a/workflows/FSharpArcCapsule/script.fsx b/workflows/FSharpArcCapsule/script.fsx deleted file mode 100644 index 155693f..0000000 --- a/workflows/FSharpArcCapsule/script.fsx +++ /dev/null @@ -1,20 +0,0 @@ -#r "nuget: FSharp.Data, 5.0.2" - -open FSharp.Data -open System.IO - -printfn "%A" (System.IO.Directory.GetCurrentDirectory()) - -let data = - CsvFile - .Load(Path.Combine(System.IO.Directory.GetCurrentDirectory(),"./arc/assays/measurement1/dataset/table.csv")) - .Cache() - -let r = - [ - yield "Sum_1-2" - for row in data.Rows do - yield sprintf "%f" ((row.["value_1"].AsFloat()) + (row.["value_2"].AsFloat())) - ] - -System.IO.File.WriteAllLines("./arc/runs/fsResult1/result.csv",r) \ No newline at end of file -- GitLab