-
Notifications
You must be signed in to change notification settings - Fork 8
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
CWL Model, Encoding & Decoding #421
base: main
Are you sure you want to change the base?
Changes from all commits
a814349
b0ff7aa
093b71d
d4d44a0
cd0078f
ee84815
a7aecf0
fe79944
62ef339
9bf5b30
ef9c09e
8af4fa6
6e3b032
58b6fe9
79052ec
f77652c
015abb2
80224f3
2fd65c1
5ca6bf0
d493ecb
e5c2a00
42fcb79
01a3046
233e4c5
7ed70ad
ac9aa23
796fc96
42b2105
86b87d6
05e89b7
62a2831
af6443e
8c35e1b
43a9be6
a05301e
6fb2871
78e09de
1fd8fb8
b80f6aa
1b301c3
39a13b0
ee737c0
95f2763
741d07e
7c60965
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
namespace ARCtrl | ||
|
||
open ARCtrl.CWL | ||
open DynamicObj | ||
open CWLTypes | ||
open Requirements | ||
open Inputs | ||
open Outputs | ||
open WorkflowSteps | ||
open Fable.Core | ||
|
||
module CWLProcessingUnits = | ||
|
||
[<AttachMembers>] | ||
type CWLToolDescription ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add [AttachMembers] attribute to each class. See ArcAssay as reference. This is important for js and py usability |
||
cwlVersion: string, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How vastly differing are the cwl versions? Do we have a default version in the specs? If not, we should pick one and set this field here to optional with a default value. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We ask for version 1.2 (current one) or higher. The version is a mandatory field in cwl files and always present, so it can always be read. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, but this type is not exclusively for parsing but also for being created, edited and such. I don't think we should have this as a mandatory field in the constructor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even if you want to create or edit cwl, you need this field for it to be valid. So making it optional wouldn't make sense imo. A creator which automatically sets it to 1.2 could be an option. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, having it as an optional parameter in the constructor with an internal default value is exactly what I meant. |
||
cls: CWLClass, | ||
outputs: ResizeArray<Output>, | ||
?baseCommand: ResizeArray<string>, | ||
?requirements: ResizeArray<Requirement>, | ||
?hints: ResizeArray<Requirement>, | ||
?inputs: ResizeArray<Input>, | ||
?metadata: DynamicObj | ||
) = | ||
inherit DynamicObj () | ||
|
||
let mutable _cwlVersion: string = cwlVersion | ||
let mutable _class: CWLClass = cls | ||
let mutable _outputs: ResizeArray<Output> = outputs | ||
let mutable _baseCommand: ResizeArray<string> option = baseCommand | ||
let mutable _requirements: ResizeArray<Requirement> option = requirements | ||
let mutable _hints: ResizeArray<Requirement> option = hints | ||
let mutable _inputs: ResizeArray<Input> option = inputs | ||
let mutable _metadata: DynamicObj option = metadata | ||
|
||
member this.CWLVersion | ||
with get() = _cwlVersion | ||
and set(version) = _cwlVersion <- version | ||
|
||
member this.Class | ||
with get() = _class | ||
and set(cls) = _class <- cls | ||
|
||
member this.Outputs | ||
with get() = _outputs | ||
and set(outputs) = _outputs <- outputs | ||
|
||
member this.BaseCommand | ||
with get() = _baseCommand | ||
and set(baseCommand) = _baseCommand <- baseCommand | ||
|
||
member this.Requirements | ||
with get() = _requirements | ||
and set(requirements) = _requirements <- requirements | ||
|
||
member this.Hints | ||
with get() = _hints | ||
and set(hints) = _hints <- hints | ||
|
||
member this.Inputs | ||
with get() = _inputs | ||
and set(inputs) = _inputs <- inputs | ||
|
||
member this.Metadata | ||
with get() = _metadata | ||
and set(metadata) = _metadata <- metadata | ||
|
||
[<AttachMembers>] | ||
type CWLWorkflowDescription( | ||
cwlVersion: string, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same thing with version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See answer above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See answer above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See answer above |
||
cls: CWLClass, | ||
steps: ResizeArray<WorkflowStep>, | ||
inputs: ResizeArray<Input>, | ||
outputs: ResizeArray<Output>, | ||
?requirements: ResizeArray<Requirement>, | ||
?hints: ResizeArray<Requirement>, | ||
?metadata: DynamicObj | ||
) = | ||
inherit DynamicObj() | ||
|
||
let mutable _cwlVersion: string = cwlVersion | ||
let mutable _class: CWLClass = cls | ||
let mutable _steps: ResizeArray<WorkflowStep> = steps | ||
let mutable _inputs: ResizeArray<Input> = inputs | ||
let mutable _outputs: ResizeArray<Output> = outputs | ||
let mutable _requirements: ResizeArray<Requirement> option = requirements | ||
let mutable _hints: ResizeArray<Requirement> option = hints | ||
let mutable _metadata: DynamicObj option = metadata | ||
|
||
member this.CWLVersion | ||
with get() = _cwlVersion | ||
and set(version) = _cwlVersion <- version | ||
|
||
member this.Class | ||
with get() = _class | ||
and set(cls) = _class <- cls | ||
|
||
member this.Steps | ||
with get() = _steps | ||
and set(steps) = _steps <- steps | ||
|
||
member this.Inputs | ||
with get() = _inputs | ||
and set(inputs) = _inputs <- inputs | ||
|
||
member this.Outputs | ||
with get() = _outputs | ||
and set(outputs) = _outputs <- outputs | ||
|
||
member this.Requirements | ||
with get() = _requirements | ||
and set(requirements) = _requirements <- requirements | ||
|
||
member this.Hints | ||
with get() = _hints | ||
and set(hints) = _hints <- hints | ||
|
||
member this.Metadata | ||
with get() = _metadata | ||
and set(metadata) = _metadata <- metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of these types (the top-level ones) should definitely be directly in the ARCtrl namespace. Maybe take a look at ARCtrl.Core, where ArcAssay and such are directly in the ARCtrl namespace.