diff --git a/ARCtrl.sln b/ARCtrl.sln index a7b85852..e2bba517 100644 --- a/ARCtrl.sln +++ b/ARCtrl.sln @@ -10,7 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .github\workflows\build-test.yml = .github\workflows\build-test.yml build.cmd = build.cmd build.sh = build.sh - Directory.Build.props = Directory.Build.props Directory.Packages.props = Directory.Packages.props .config\dotnet-tools.json = .config\dotnet-tools.json global.json = global.json diff --git a/Directory.Build.props b/Directory.Build.props deleted file mode 100644 index 59119618..00000000 --- a/Directory.Build.props +++ /dev/null @@ -1,20 +0,0 @@ - - - - true - true - - - - - 3 - - - diff --git a/Directory.Packages.props b/Directory.Packages.props index a2c404b0..97925793 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -12,7 +12,7 @@ - + diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 445be890..69401410 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -5,10 +5,10 @@ * [[#ef15f35](https://github.com/nfdi4plants/ARCtrl/commit/ef15f35779606a1bfcaecdadfc7532886466ec46)] implement first POC of ISA ROCrate profile * [[#168ead8](https://github.com/nfdi4plants/ARCtrl/commit/168ead84ca93dc0fae911e760673ef6e33180447)] add test project * [[#2cea57c](https://github.com/nfdi4plants/ARCtrl/commit/2cea57cc1415310e36f5931ef376ea183b85fb71)] update solution - * [[#ccd1805](https://github.com/nfdi4plants/ARCtrl/commit/ccd18053a83c80f4ca4b7a2ac7008a4a0cf3d348)] Unify Inheritance to ROCrateObject + * [[#ccd1805](https://github.com/nfdi4plants/ARCtrl/commit/ccd18053a83c80f4ca4b7a2ac7008a4a0cf3d348)] Unify Inheritance to LDObject * [[#95cab6f](https://github.com/nfdi4plants/ARCtrl/commit/95cab6f0f85f71a7adea887a25bd47c714e5af35)] wip ro-crate tests * [[#9ef48d7](https://github.com/nfdi4plants/ARCtrl/commit/9ef48d75f5439d3a71ca943941b70c5af3ff9261)] only use primary constructor - * [[#9deffb7](https://github.com/nfdi4plants/ARCtrl/commit/9deffb7ea81f76c067de5618f2b3388303402191)] Add basic tests for I/S/A ROCrateObjects + * [[#9deffb7](https://github.com/nfdi4plants/ARCtrl/commit/9deffb7ea81f76c067de5618f2b3388303402191)] Add basic tests for I/S/A LDObjects * [[#4b4a2fc](https://github.com/nfdi4plants/ARCtrl/commit/4b4a2fcc3bd32b31ec5aa3b4f1127883f7af83fc)] temp workaround in tests for https://github.com/CSBiology/DynamicObj/issues/25 * [[#f67e78b](https://github.com/nfdi4plants/ARCtrl/commit/f67e78b068350a8e1aecf80fa8b9dd4646fb9ddd)] Use unblocking version of DynamicObj, introduce runTestProject target * [[#4e91e9d](https://github.com/nfdi4plants/ARCtrl/commit/4e91e9dcc5b34747a2e4a16f33aee1a227eb08ef)] finish basic property tests for isa profile types @@ -22,11 +22,11 @@ * [[#93030e9](https://github.com/nfdi4plants/ARCtrl/commit/93030e915329c23b4b4f8cddc5b622312de6cedb)] Make use of Fable.Package.SDK * [[#99b2659](https://github.com/nfdi4plants/ARCtrl/commit/99b2659d1dd5c3815693f4df85691f9bead3e26d)] rename json IO implementations folder to reduce ambiguity in py and javascript packages * Deletions: - * [[#c71b8a3](https://github.com/nfdi4plants/ARCtrl/commit/c71b8a301fbdf95531a9ba0d33f8e6d0d238adc9)] correct interface implementation on ROCrateObject, remove interface implementation from Dataset + * [[#c71b8a3](https://github.com/nfdi4plants/ARCtrl/commit/c71b8a301fbdf95531a9ba0d33f8e6d0d238adc9)] correct interface implementation on LDObject, remove interface implementation from Dataset * [[#c429686](https://github.com/nfdi4plants/ARCtrl/commit/c4296864a7443a990257f7eb47fed92458fa0a7b)] remove javascript and pyton packages from main solution * [[#3586dee](https://github.com/nfdi4plants/ARCtrl/commit/3586dee6a736d3ad2ed9e79778e3ea136c638eac)] remove restorelockedmode flag * Bugfixes: - * [[#9d526b8](https://github.com/nfdi4plants/ARCtrl/commit/9d526b82df1d7ac04283cbe23c9832f1d5818771)] add LabProcess tests, fix schematype of ROCrateObject base constructor + * [[#9d526b8](https://github.com/nfdi4plants/ARCtrl/commit/9d526b82df1d7ac04283cbe23c9832f1d5818771)] add LabProcess tests, fix schematype of LDObject base constructor * [[#192812d](https://github.com/nfdi4plants/ARCtrl/commit/192812d43569270845883ca116de9931dea6ba62)] fix error messages of ROCrate testing utils * [[#43d65db](https://github.com/nfdi4plants/ARCtrl/commit/43d65db3fb121a4832e771541880c1fe79cfe89c)] various test fixes for Fable logic transition * [[#8552f9e](https://github.com/nfdi4plants/ARCtrl/commit/8552f9ea7b2183c4cb382049c71793918d4128b3)] fix fable ready packaging and/by update package tags diff --git a/src/ARCtrl/ARCtrl.Common.props b/src/ARCtrl/ARCtrl.Common.props index 5633bf3f..963548e3 100644 --- a/src/ARCtrl/ARCtrl.Common.props +++ b/src/ARCtrl/ARCtrl.Common.props @@ -40,7 +40,7 @@ - + --> diff --git a/src/ARCtrl/ARCtrl.Javascript.fsproj b/src/ARCtrl/ARCtrl.Javascript.fsproj index e9a0dc3c..9a197d64 100644 --- a/src/ARCtrl/ARCtrl.Javascript.fsproj +++ b/src/ARCtrl/ARCtrl.Javascript.fsproj @@ -46,7 +46,7 @@ - + diff --git a/src/ARCtrl/ARCtrl.Python.fsproj b/src/ARCtrl/ARCtrl.Python.fsproj index a404cc91..72204129 100644 --- a/src/ARCtrl/ARCtrl.Python.fsproj +++ b/src/ARCtrl/ARCtrl.Python.fsproj @@ -46,7 +46,7 @@ - + diff --git a/src/ARCtrl/ARCtrl.fsproj b/src/ARCtrl/ARCtrl.fsproj index 3a843e32..db129baf 100644 --- a/src/ARCtrl/ARCtrl.fsproj +++ b/src/ARCtrl/ARCtrl.fsproj @@ -45,7 +45,7 @@ - + diff --git a/src/ARCtrl/JsonIO/LDObject.fs b/src/ARCtrl/JsonIO/LDObject.fs new file mode 100644 index 00000000..1a4fe343 --- /dev/null +++ b/src/ARCtrl/JsonIO/LDObject.fs @@ -0,0 +1,25 @@ +namespace ARCtrl.Json + +open ARCtrl +open ARCtrl.ROCrate +open System +open ARCtrl.ROCrate +open Thoth.Json.Core +open DynamicObj + +[] +module LDObjectExtensions = + + type LDObject with + + static member fromROCrateJsonString (s:string) = + Decode.fromJsonString LDObject.decoder s + + /// exports in json-ld format + static member toROCrateJsonString(?spaces) = + fun (obj:LDObject) -> + LDObject.encoder obj + |> Encode.toJsonString (Encode.defaultSpaces spaces) + + member this.ToROCrateJsonString(?spaces) = + LDObject.toROCrateJsonString(?spaces=spaces) this \ No newline at end of file diff --git a/src/ARCtrl/JsonIO/ROCrateObject.fs b/src/ARCtrl/JsonIO/ROCrateObject.fs deleted file mode 100644 index 3d128634..00000000 --- a/src/ARCtrl/JsonIO/ROCrateObject.fs +++ /dev/null @@ -1,123 +0,0 @@ -namespace ARCtrl.Json - -open ARCtrl -open System -open ARCtrl.ROCrate -open Thoth.Json.Core -open DynamicObj - -module rec ROCrateObject = - - #if !FABLE_COMPILER - let (|SomeObj|_|) = - // create generalized option type - let ty = typedefof> - fun (a:obj) -> - // Check for nulls otherwise 'a.GetType()' would fail - if isNull a - then - None - else - let aty = a.GetType() - // Get option'.Value - let v = aty.GetProperty("Value") - if aty.IsGenericType && aty.GetGenericTypeDefinition() = ty then - // return value if existing - Some(v.GetValue(a, [| |])) - else - None - #endif - - - let genericEncoder (obj : obj) : IEncodable = - match obj with - | :? string as s -> Encode.string s - | :? int as i -> Encode.int i - | :? bool as b -> Encode.bool b - | :? float as f -> Encode.float f - | :? DateTime as d -> Encode.dateTime d - | :? ROCrateObject as o -> encoder o - #if !FABLE_COMPILER - | SomeObj o -> genericEncoder o - #endif - | null -> Encode.nil - | :? System.Collections.IEnumerable as l -> [ for x in l -> genericEncoder x] |> Encode.list - | _ -> failwith "Unknown type" - - let rec encoder(obj: ROCrateObject) = - obj.GetProperties true - |> Seq.map (fun kv -> - kv.Key, - genericEncoder obj - ) - |> Encode.object - - - let rec decoder : Decoder = - let rec decode() = - let decodeObject : Decoder = - { new Decoder with - member _.Decode(helpers, value) = - if helpers.isObject value then - let getters = Decode.Getters(helpers, value) - let properties = helpers.getProperties value - let builder = - fun (get : Decode.IGetters) -> - let o = ROCrateObject( - id = get.Required.Field "@id" Decode.string, - schemaType = get.Required.Field "@type" Decode.string - ) - for property in properties do - if property <> "@id" && property <> "@type" then - o.SetProperty(property,get.Required.Field property (decode())) - o - let result = builder getters - match getters.Errors with - | [] -> Ok result - | fst :: _ as errors -> - if errors.Length > 1 then - ("", BadOneOf errors) |> Error - else - Error fst - else - ("", BadPrimitive("an object", value)) |> Error - } - let resizeArray : Decoder> = - { new Decoder> with - member _.Decode(helpers, value) = - if helpers.isArray value then - let mutable i = -1 - let tokens = helpers.asArray value - let arr = ResizeArray() - - (Ok arr, tokens) - ||> Array.fold (fun acc value -> - i <- i + 1 - - match acc with - | Error _ -> acc - | Ok acc -> - match decode().Decode(helpers, value) with - | Error er -> - Error( - er - |> Helpers.prependPath ( - ".[" + (i.ToString()) + "]" - ) - ) - | Ok value -> - acc.Add value - Ok acc - ) - else - ("", BadPrimitive("an array", value)) |> Error - } - Decode.oneOf [ - Decode.map box (decodeObject) - Decode.map box (resizeArray) - Decode.map box (Decode.string) - Decode.map box (Decode.int) - Decode.map box (Decode.decimal) - - ] - decode() \ No newline at end of file diff --git a/src/ARCtrl/packages.lock.json b/src/ARCtrl/packages.lock.json deleted file mode 100644 index 2b028bdd..00000000 --- a/src/ARCtrl/packages.lock.json +++ /dev/null @@ -1,165 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Thoth.Json.Python": { - "type": "Direct", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "O86Oisv/91NpbHENz11poZh9zrTRJdAjDXHVC1JqvDDsscelI7HxOmWgks8ZFvYxbBzNJCG+FKQHC10KzyMf8g==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0", - "Fable.Python": "4.3.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[2.1.0-alpha.3, )", - "ARCtrl.Json": "[2.1.0-alpha.3, )", - "ARCtrl.Spreadsheet": "[2.1.0-alpha.3, )", - "ARCtrl.Yaml": "[2.1.0-alpha.3, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[2.1.0-alpha.3, )", - "ARCtrl.FileSystem": "[2.1.0-alpha.3, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[2.1.0-alpha.3, )", - "ARCtrl.ROCrate": "[2.1.0-alpha.3, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[2.1.0-alpha.3, )", - "ARCtrl.FileSystem": "[2.1.0-alpha.3, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[2.1.0-alpha.3, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[2.1.0-alpha.3, )", - "ARCtrl.ValidationPackages": "[2.1.0-alpha.3, )", - "YAMLicious": "[0.0.1, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/src/CWL/packages.lock.json b/src/CWL/packages.lock.json deleted file mode 100644 index 15403c2f..00000000 --- a/src/CWL/packages.lock.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - } - } - } -} \ No newline at end of file diff --git a/src/Contract/packages.lock.json b/src/Contract/packages.lock.json deleted file mode 100644 index bcac3e60..00000000 --- a/src/Contract/packages.lock.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/src/Core/packages.lock.json b/src/Core/packages.lock.json deleted file mode 100644 index 6d8c3010..00000000 --- a/src/Core/packages.lock.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - } - } - } -} \ No newline at end of file diff --git a/src/FileSystem/packages.lock.json b/src/FileSystem/packages.lock.json deleted file mode 100644 index 9f31e01f..00000000 --- a/src/FileSystem/packages.lock.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Core": { - "type": "Direct", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - } - } - } -} \ No newline at end of file diff --git a/src/Json/ARCtrl.Json.fsproj b/src/Json/ARCtrl.Json.fsproj index a519085b..64095531 100644 --- a/src/Json/ARCtrl.Json.fsproj +++ b/src/Json/ARCtrl.Json.fsproj @@ -75,7 +75,7 @@ - + diff --git a/src/Json/ROCrateObject.fs b/src/Json/LDObject.fs similarity index 68% rename from src/Json/ROCrateObject.fs rename to src/Json/LDObject.fs index 3d128634..a9aae98c 100644 --- a/src/Json/ROCrateObject.fs +++ b/src/Json/LDObject.fs @@ -6,7 +6,7 @@ open ARCtrl.ROCrate open Thoth.Json.Core open DynamicObj -module rec ROCrateObject = +module rec LDObject = #if !FABLE_COMPILER let (|SomeObj|_|) = @@ -36,7 +36,7 @@ module rec ROCrateObject = | :? bool as b -> Encode.bool b | :? float as f -> Encode.float f | :? DateTime as d -> Encode.dateTime d - | :? ROCrateObject as o -> encoder o + | :? LDObject as o -> encoder o #if !FABLE_COMPILER | SomeObj o -> genericEncoder o #endif @@ -44,32 +44,43 @@ module rec ROCrateObject = | :? System.Collections.IEnumerable as l -> [ for x in l -> genericEncoder x] |> Encode.list | _ -> failwith "Unknown type" - let rec encoder(obj: ROCrateObject) = + let rec encoder(obj: LDObject) = obj.GetProperties true - |> Seq.map (fun kv -> - kv.Key, - genericEncoder obj + |> Seq.choose (fun kv -> + let l = kv.Key.ToLower() + if l <> "id" && l <> "schematype" && l <> "additionaltype" then + Some(kv.Key, genericEncoder kv.Value) + else + None + ) + |> Seq.append [ + "@id", Encode.string obj.Id + "@type", Encode.string obj.SchemaType + if obj.AdditionalType.IsSome then + "additionalType", Encode.string obj.AdditionalType.Value + ] |> Encode.object - - let rec decoder : Decoder = - let rec decode() = - let decodeObject : Decoder = - { new Decoder with + /// Returns a decoder + /// + /// If expectObject is set to true, decoder fails if top-level value is not an ROCrate object + let rec getDecoder (expectObject : bool) : Decoder = + let rec decode(expectObject) = + let decodeObject : Decoder = + { new Decoder with member _.Decode(helpers, value) = if helpers.isObject value then let getters = Decode.Getters(helpers, value) let properties = helpers.getProperties value let builder = fun (get : Decode.IGetters) -> - let o = ROCrateObject( - id = get.Required.Field "@id" Decode.string, - schemaType = get.Required.Field "@type" Decode.string - ) + let t = get.Required.Field "@type" Decode.string + let id = get.Required.Field "@id" Decode.string + let o = LDObject(id,t) for property in properties do if property <> "@id" && property <> "@type" then - o.SetProperty(property,get.Required.Field property (decode())) + o.SetProperty(property,get.Required.Field property (decode(false))) o let result = builder getters match getters.Errors with @@ -97,7 +108,7 @@ module rec ROCrateObject = match acc with | Error _ -> acc | Ok acc -> - match decode().Decode(helpers, value) with + match decode(false).Decode(helpers, value) with | Error er -> Error( er @@ -112,12 +123,19 @@ module rec ROCrateObject = else ("", BadPrimitive("an array", value)) |> Error } - Decode.oneOf [ + if expectObject then Decode.map box (decodeObject) - Decode.map box (resizeArray) - Decode.map box (Decode.string) - Decode.map box (Decode.int) - Decode.map box (Decode.decimal) + else + Decode.oneOf [ + Decode.map box (decodeObject) + Decode.map box (resizeArray) + Decode.map box (Decode.string) + Decode.map box (Decode.int) + Decode.map box (Decode.decimal) + + ] + decode(expectObject) + + let decoder : Decoder = Decode.map unbox (getDecoder(true)) - ] - decode() \ No newline at end of file + let genericDecoder : Decoder = getDecoder(false) diff --git a/src/Json/packages.lock.json b/src/Json/packages.lock.json deleted file mode 100644 index 07e90ed1..00000000 --- a/src/Json/packages.lock.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Thoth.Json.Core": { - "type": "Direct", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - } - } - } -} \ No newline at end of file diff --git a/src/ROCrate/ARCtrl.ROCrate.fsproj b/src/ROCrate/ARCtrl.ROCrate.fsproj index 45acca92..e5dfc51f 100644 --- a/src/ROCrate/ARCtrl.ROCrate.fsproj +++ b/src/ROCrate/ARCtrl.ROCrate.fsproj @@ -7,7 +7,8 @@ - + + @@ -19,6 +20,7 @@ + diff --git a/src/ROCrate/ArcROCrateMetadata.fs b/src/ROCrate/ArcROCrateMetadata.fs new file mode 100644 index 00000000..2fd930b1 --- /dev/null +++ b/src/ROCrate/ArcROCrateMetadata.fs @@ -0,0 +1,24 @@ +namespace ARCtrl.ROCrate + +open DynamicObj + +type ArcROCrateMetadata(?about : LDObject) as this = + + inherit LDObject(id = "ro-crate-metadata",schemaType = "CreativeWork") + + do DynObj.setOptionalProperty (nameof about) about this + + do + let conformsTo = DynamicObj() + conformsTo.SetProperty("@id", "https://w3id.org/ro/crate/1.1") + this.SetProperty("conformsTo", conformsTo) + + do + let context = LDContext() + context.SetProperty("sdo", "http://schema.org/") + context.SetProperty("arc", "http://purl.org/nfdi4plants/ontology/") + context.SetProperty("CreativeWork", "sdo:CreativeWork") + context.SetProperty("about", "sdo:about") + context.SetProperty("conformsTo", "sdo:conformsTo") + this.SetProperty("@context", context) + diff --git a/src/ROCrate/DynObjExtensions.fs b/src/ROCrate/DynObjExtensions.fs new file mode 100644 index 00000000..1cb8fe70 --- /dev/null +++ b/src/ROCrate/DynObjExtensions.fs @@ -0,0 +1,15 @@ +namespace ARCtrl.ROCrate + +open DynamicObj + +module DynObj = + + let inline hasProperty (propertyName: string) (obj: #DynamicObj) = DynObj.tryGetPropertyValue propertyName obj |> Option.isSome + + let inline getMandatoryDynamicPropertyOrThrow<'TPropertyValue> (className:string) (propertyName: string) (obj: #DynamicObj) = + if hasProperty propertyName obj then + match DynObj.tryGetTypedPropertyValue<'TPropertyValue> propertyName obj with + | Some value -> value + | None -> raise (System.InvalidCastException($"Property '{propertyName}' is set on this '{className}' object but cannot be cast to '{(typeof<'TPropertyValue>).Name}'")) + else + raise (System.MissingMemberException($"No property '{propertyName}' set on this '{className}' object although it is mandatory. Was it created correctly?")) \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Assay.fs b/src/ROCrate/ISAProfile/Assay.fs index 525433ff..5532ada4 100644 --- a/src/ROCrate/ISAProfile/Assay.fs +++ b/src/ROCrate/ISAProfile/Assay.fs @@ -6,8 +6,8 @@ open Fable.Core /// [] type Assay( - id, - identifier, + id: string, + identifier: string, ?about, ?comment, ?creator, @@ -21,11 +21,14 @@ type Assay( do DynObj.setProperty (nameof identifier) identifier this - DynObj.setOptionalProperty (nameof measurementMethod) measurementMethod this - DynObj.setOptionalProperty (nameof measurementTechnique) measurementTechnique this - DynObj.setOptionalProperty (nameof variableMeasured) variableMeasured this - DynObj.setOptionalProperty (nameof about) about this - DynObj.setOptionalProperty (nameof comment) comment this - DynObj.setOptionalProperty (nameof creator) creator this - DynObj.setOptionalProperty (nameof hasPart) hasPart this - DynObj.setOptionalProperty (nameof url) url this \ No newline at end of file + DynObj.setOptionalProperty (nameof measurementMethod) measurementMethod this + DynObj.setOptionalProperty (nameof measurementTechnique) measurementTechnique this + DynObj.setOptionalProperty (nameof variableMeasured) variableMeasured this + DynObj.setOptionalProperty (nameof about) about this + DynObj.setOptionalProperty (nameof comment) comment this + DynObj.setOptionalProperty (nameof creator) creator this + DynObj.setOptionalProperty (nameof hasPart) hasPart this + DynObj.setOptionalProperty (nameof url) url this + + member this.GetIdentifier() = DynObj.getMandatoryDynamicPropertyOrThrow "Assay" (nameof identifier) this + static member getIdentifier = fun (ass: Assay) -> ass.GetIdentifier() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Data.fs b/src/ROCrate/ISAProfile/Data.fs index 7aa09fb9..1f4e30ec 100644 --- a/src/ROCrate/ISAProfile/Data.fs +++ b/src/ROCrate/ISAProfile/Data.fs @@ -13,7 +13,7 @@ type Data( ?encodingFormat, ?disambiguatingDescription ) as this = - inherit ROCrateObject(id = id, schemaType = "schema.org/MediaObject", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/MediaObject", ?additionalType = additionalType) do DynObj.setProperty (nameof name) name this @@ -21,3 +21,5 @@ type Data( DynObj.setOptionalProperty (nameof encodingFormat) encodingFormat this DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this + member this.GetName() = DynObj.getMandatoryDynamicPropertyOrThrow "Data" (nameof name) this + static member getName = fun (d: Data) -> d.GetName() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Dataset.fs b/src/ROCrate/ISAProfile/Dataset.fs index 8fb712ca..52ce4779 100644 --- a/src/ROCrate/ISAProfile/Dataset.fs +++ b/src/ROCrate/ISAProfile/Dataset.fs @@ -6,4 +6,4 @@ open Fable.Core /// [] type Dataset (id: string, ?additionalType: string) = - inherit ROCrateObject(id = id, schemaType = "schema.org/Dataset", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/Dataset", ?additionalType = additionalType) diff --git a/src/ROCrate/ISAProfile/Investigation.fs b/src/ROCrate/ISAProfile/Investigation.fs index 607170fa..8e08aff7 100644 --- a/src/ROCrate/ISAProfile/Investigation.fs +++ b/src/ROCrate/ISAProfile/Investigation.fs @@ -6,8 +6,8 @@ open Fable.Core /// [] type Investigation( - id, - identifier, + id: string, + identifier: string, ?citation, ?comment, ?creator, @@ -24,14 +24,17 @@ type Investigation( do DynObj.setProperty (nameof identifier) identifier this - DynObj.setOptionalProperty (nameof citation) citation this - DynObj.setOptionalProperty (nameof comment) comment this - DynObj.setOptionalProperty (nameof creator) creator this - DynObj.setOptionalProperty (nameof dateCreated) dateCreated this - DynObj.setOptionalProperty (nameof dateModified) dateModified this - DynObj.setOptionalProperty (nameof datePublished) datePublished this - DynObj.setOptionalProperty (nameof hasPart) hasPart this - DynObj.setOptionalProperty (nameof headline) headline this - DynObj.setOptionalProperty (nameof mentions) mentions this - DynObj.setOptionalProperty (nameof url) url this - DynObj.setOptionalProperty (nameof description) description this + DynObj.setOptionalProperty (nameof citation) citation this + DynObj.setOptionalProperty (nameof comment) comment this + DynObj.setOptionalProperty (nameof creator) creator this + DynObj.setOptionalProperty (nameof dateCreated) dateCreated this + DynObj.setOptionalProperty (nameof dateModified) dateModified this + DynObj.setOptionalProperty (nameof datePublished) datePublished this + DynObj.setOptionalProperty (nameof hasPart) hasPart this + DynObj.setOptionalProperty (nameof headline) headline this + DynObj.setOptionalProperty (nameof mentions) mentions this + DynObj.setOptionalProperty (nameof url) url this + DynObj.setOptionalProperty (nameof description) description this + + member this.GetIdentifier() = DynObj.getMandatoryDynamicPropertyOrThrow "Investigation" (nameof identifier) this + static member getIdentifier = fun (inv: Investigation) -> inv.GetIdentifier() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/LabProcess.fs b/src/ROCrate/ISAProfile/LabProcess.fs index a891ff30..9abb4fdc 100644 --- a/src/ROCrate/ISAProfile/LabProcess.fs +++ b/src/ROCrate/ISAProfile/LabProcess.fs @@ -6,7 +6,7 @@ open Fable.Core /// [] type LabProcess( - id, + id: string, name, agent, object, @@ -17,14 +17,26 @@ type LabProcess( ?endTime, ?disambiguatingDescription ) as this = - inherit ROCrateObject(id = id, schemaType = "bioschemas.org/LabProcess", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "bioschemas.org/LabProcess", ?additionalType = additionalType) do DynObj.setProperty (nameof name) name this DynObj.setProperty (nameof agent) agent this DynObj.setProperty (nameof object) object this DynObj.setProperty (nameof result) result this - DynObj.setOptionalProperty (nameof executesLabProtocol) executesLabProtocol this - DynObj.setOptionalProperty (nameof parameterValue) parameterValue this - DynObj.setOptionalProperty (nameof endTime) endTime this - DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this \ No newline at end of file + DynObj.setOptionalProperty (nameof executesLabProtocol) executesLabProtocol this + DynObj.setOptionalProperty (nameof parameterValue) parameterValue this + DynObj.setOptionalProperty (nameof endTime) endTime this + DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this + + member this.GetName() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof name) this + static member getName = fun (lp: LabProcess) -> lp.GetName() + + member this.GetAgent() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof agent) this + static member getAgent = fun (lp: LabProcess) -> lp.GetAgent() + + member this.GetObject() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof object) this + static member getObject = fun (lp: LabProcess) -> lp.GetObject() + + member this.GetResult() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof result) this + static member getResult = fun (lp: LabProcess) -> lp.GetResult() diff --git a/src/ROCrate/ISAProfile/LabProtocol.fs b/src/ROCrate/ISAProfile/LabProtocol.fs index bee27aeb..db6a66d4 100644 --- a/src/ROCrate/ISAProfile/LabProtocol.fs +++ b/src/ROCrate/ISAProfile/LabProtocol.fs @@ -18,7 +18,7 @@ type LabProtocol( ?reagent, ?computationalTool ) as this = - inherit ROCrateObject(id = id, schemaType = "bioschemas.org/LabProtocol", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "bioschemas.org/LabProtocol", ?additionalType = additionalType) do DynObj.setOptionalProperty (nameof name) name this DynObj.setOptionalProperty (nameof intendedUse) intendedUse this diff --git a/src/ROCrate/ISAProfile/Person.fs b/src/ROCrate/ISAProfile/Person.fs index baabb839..b3076813 100644 --- a/src/ROCrate/ISAProfile/Person.fs +++ b/src/ROCrate/ISAProfile/Person.fs @@ -20,7 +20,7 @@ type Person( ?faxNumber, ?disambiguatingDescription ) as this= - inherit ROCrateObject(id = id, schemaType = "schema.org/Person", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/Person", ?additionalType = additionalType) do DynObj.setProperty (nameof givenName) givenName this @@ -35,3 +35,6 @@ type Person( DynObj.setOptionalProperty (nameof telephone) telephone this DynObj.setOptionalProperty (nameof faxNumber) faxNumber this DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this + + member this.GetGivenName() = DynObj.getMandatoryDynamicPropertyOrThrow "Person" (nameof givenName) this + static member getGivenName = fun (p: Person) -> p.GetGivenName() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/PropertyValue.fs b/src/ROCrate/ISAProfile/PropertyValue.fs index 650aab8f..730ad7a7 100644 --- a/src/ROCrate/ISAProfile/PropertyValue.fs +++ b/src/ROCrate/ISAProfile/PropertyValue.fs @@ -15,7 +15,7 @@ type PropertyValue( ?valueReference, ?additionalType ) as this = - inherit ROCrateObject(id = id, schemaType = "schema.org/PropertyValue", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/PropertyValue", ?additionalType = additionalType) do DynObj.setProperty (nameof name) name this @@ -25,3 +25,9 @@ type PropertyValue( DynObj.setOptionalProperty (nameof unitCode) unitCode this DynObj.setOptionalProperty (nameof unitText) unitText this DynObj.setOptionalProperty (nameof valueReference) valueReference this + + member this.GetName() = DynObj.getMandatoryDynamicPropertyOrThrow "PropertyValue" (nameof name) this + static member getName = fun (lp: PropertyValue) -> lp.GetName() + + member this.GetValue() = DynObj.getMandatoryDynamicPropertyOrThrow "PropertyValue" (nameof name) this + static member getValue = fun (lp: PropertyValue) -> lp.GetValue() diff --git a/src/ROCrate/ISAProfile/Sample.fs b/src/ROCrate/ISAProfile/Sample.fs index a1f2a45f..a607ce56 100644 --- a/src/ROCrate/ISAProfile/Sample.fs +++ b/src/ROCrate/ISAProfile/Sample.fs @@ -12,9 +12,12 @@ type Sample( ?additionalProperty, ?derivesFrom ) as this = - inherit ROCrateObject(id = id, schemaType = "bioschemas.org/Sample", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "bioschemas.org/Sample", ?additionalType = additionalType) do DynObj.setProperty (nameof name) name this DynObj.setOptionalProperty (nameof additionalProperty) additionalProperty this DynObj.setOptionalProperty (nameof derivesFrom) derivesFrom this + + member this.GetName() = DynObj.getMandatoryDynamicPropertyOrThrow "Sample" (nameof name) this + static member getName = fun (s: Sample) -> s.GetName() diff --git a/src/ROCrate/ISAProfile/ScholarlyArticle.fs b/src/ROCrate/ISAProfile/ScholarlyArticle.fs index 06c72e50..cb4905a5 100644 --- a/src/ROCrate/ISAProfile/ScholarlyArticle.fs +++ b/src/ROCrate/ISAProfile/ScholarlyArticle.fs @@ -16,7 +16,7 @@ type ScholarlyArticle( ?disambiguatingDescription ) as this = - inherit ROCrateObject(id = id, schemaType = "schema.org/ScholarlyArticle", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/ScholarlyArticle", ?additionalType = additionalType) do DynObj.setProperty (nameof headline) headline this @@ -25,4 +25,10 @@ type ScholarlyArticle( DynObj.setOptionalProperty (nameof author) author this DynObj.setOptionalProperty (nameof url) url this DynObj.setOptionalProperty (nameof creativeWorkStatus) creativeWorkStatus this - DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this \ No newline at end of file + DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this + + member this.GetHeadline() = DynObj.getMandatoryDynamicPropertyOrThrow "ScholarlyArticle" (nameof headline) this + static member getHeadline = fun (s: ScholarlyArticle) -> s.GetHeadline() + + member this.GetIdentifier() = DynObj.getMandatoryDynamicPropertyOrThrow "ScholarlyArticle" (nameof identifier) this + static member getIdentifier = fun (s: ScholarlyArticle) -> s.GetIdentifier() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Study.fs b/src/ROCrate/ISAProfile/Study.fs index d2463da7..41bbd82e 100644 --- a/src/ROCrate/ISAProfile/Study.fs +++ b/src/ROCrate/ISAProfile/Study.fs @@ -6,8 +6,8 @@ open Fable.Core /// [] type Study( - id, - identifier, + id: string, + identifier: string, ?about, ?citation, ?comment, @@ -23,7 +23,6 @@ type Study( inherit Dataset(id, "Study") do DynObj.setProperty (nameof identifier) identifier this - DynObj.setOptionalProperty (nameof about) about this DynObj.setOptionalProperty (nameof citation) citation this DynObj.setOptionalProperty (nameof comment) comment this @@ -36,3 +35,5 @@ type Study( DynObj.setOptionalProperty (nameof headline) headline this DynObj.setOptionalProperty (nameof url) url this + member this.GetIdentifier() = DynObj.getMandatoryDynamicPropertyOrThrow "Study" (nameof identifier) this + static member getIdentifier = fun (inv: Investigation) -> inv.GetIdentifier() diff --git a/src/ROCrate/LDObject.fs b/src/ROCrate/LDObject.fs new file mode 100644 index 00000000..bf001ba7 --- /dev/null +++ b/src/ROCrate/LDObject.fs @@ -0,0 +1,59 @@ +namespace ARCtrl.ROCrate + +open DynamicObj +open Thoth.Json.Core +open Fable.Core +open System + +type LDContext() = inherit DynamicObj() + +/// Base interface implemented by all explicitly known objects in our ROCrate profiles. +type ILDObject = + abstract member SchemaType : string with get, set + abstract member Id: string + abstract member AdditionalType: string option with get, set + +/// Base class for all explicitly known objects in our ROCrate profiles to inherit from. +/// Basically a DynamicObj that implements the ILDObject interface. +[] +type LDObject(id:string, schemaType: string, ?additionalType) = + inherit DynamicObj() + + let mutable schemaType = schemaType + let mutable additionalType = additionalType + + member this.Id + with get() = id + + member this.SchemaType + with get() = schemaType + and set(value) = schemaType <- value + + member this.AdditionalType + with get() = additionalType + and set(value) = additionalType <- value + + interface ILDObject with + + member this.SchemaType + with get() = schemaType + and set(value) = schemaType <- value + + member this.Id = id + + member this.AdditionalType + with get() = additionalType + and set(value) = additionalType <- value + + member this.SetContext (context: LDContext) = + this.SetProperty("@context", context) + + static member setContext (context: LDContext) = fun (roc: #LDObject) -> roc.SetContext(context) + + member this.TryGetContext() = DynObj.tryGetTypedPropertyValue("@context") this + + static member tryGetContext () = fun (roc: #LDObject) -> roc.TryGetContext() + + member this.RemoveContext() = this.RemoveProperty("@context") + + static member removeContext () = fun (roc: #LDObject) -> roc.RemoveContext() \ No newline at end of file diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs deleted file mode 100644 index 35d18f0f..00000000 --- a/src/ROCrate/ROCrateObject.fs +++ /dev/null @@ -1,42 +0,0 @@ -namespace ARCtrl.ROCrate - -open DynamicObj -open Thoth.Json.Core -open System - -/// Base interface implemented by all explicitly known objects in our ROCrate profiles. -type IROCrateObject = - abstract member SchemaType : string with get, set - abstract member Id: string - abstract member AdditionalType: string option with get, set - -/// Base class for all explicitly known objects in our ROCrate profiles to inherit from. -/// Basically a DynamicObj that implements the IROPCrateObject interface. -type ROCrateObject(id:string, schemaType: string, ?additionalType) = - inherit DynamicObj() - - let mutable _schemaType = schemaType - let mutable _additionalType = additionalType - - member this.Id - with get() = id - - member this.SchemaType - with get() = _schemaType - and set(value) = _schemaType <- value - - member this.AdditionalType - with get() = _additionalType - and set(value) = _additionalType <- value - - interface IROCrateObject with - - member this.SchemaType - with get() = _schemaType - and set(value) = _schemaType <- value - - member this.Id = id - - member this.AdditionalType - with get() = _additionalType - and set(value) = _additionalType <- value \ No newline at end of file diff --git a/src/ROCrate/packages.lock.json b/src/ROCrate/packages.lock.json deleted file mode 100644 index e074dd87..00000000 --- a/src/ROCrate/packages.lock.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "DynamicObj": { - "type": "Direct", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Thoth.Json.Core": { - "type": "Direct", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - } - } - } -} \ No newline at end of file diff --git a/src/ROCrate/playground.fsx b/src/ROCrate/playground.fsx index c999a0b3..b910c322 100644 --- a/src/ROCrate/playground.fsx +++ b/src/ROCrate/playground.fsx @@ -2,12 +2,12 @@ open DynamicObj -type IROCrateObject = +type ILDObject = abstract member SchemaType : string abstract member Id: string abstract member AdditionalType: string option -type ROCrateObject(id:string, schemaType: string, ?additionalType) = +type LDObject(id:string, schemaType: string, ?additionalType) = inherit DynamicObj() let mutable _schemaType = "schema.org/Dataset" @@ -24,16 +24,16 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = with get() = _additionalType and set(value) = _additionalType <- value - interface IROCrateObject with + interface ILDObject with member this.SchemaType = schemaType member this.Id = id member this.AdditionalType = additionalType type Dataset (id: string, ?additionalType: string) = - inherit ROCrateObject(id = id, schemaType = "schema.org/Dataset", ?additionalType = additionalType) + inherit LDObject(id = id, schemaType = "schema.org/Dataset", ?additionalType = additionalType) //interface implementations - interface IROCrateObject with + interface ILDObject with member this.Id with get () = this.Id member this.SchemaType with get (): string = this.SchemaType member this.AdditionalType with get (): string option = this.AdditionalType diff --git a/src/Spreadsheet/packages.lock.json b/src/Spreadsheet/packages.lock.json deleted file mode 100644 index 14a73b11..00000000 --- a/src/Spreadsheet/packages.lock.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "FsSpreadsheet": { - "type": "Direct", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "6.0.7", - "contentHash": "e6wGrq5smV3Yk2fBE/Y0nBG5oFyF59k5Je0a0QDydUpg6liyaafGjD3xvutciKepCP2knspZ/sWViC/F1OyyQQ==" - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - } - } - } -} \ No newline at end of file diff --git a/src/ValidationPackages/packages.lock.json b/src/ValidationPackages/packages.lock.json deleted file mode 100644 index 4db96136..00000000 --- a/src/ValidationPackages/packages.lock.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - } - } - } -} \ No newline at end of file diff --git a/src/Yaml/packages.lock.json b/src/Yaml/packages.lock.json deleted file mode 100644 index 2e8682d6..00000000 --- a/src/Yaml/packages.lock.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Fable.Package.SDK": { - "type": "Direct", - "requested": "[1.1.0, )", - "resolved": "1.1.0", - "contentHash": "YEMSyiB/HCpBgDSZUr0LHaTa9vYH+xj8Fvd/AvzUAVbLQ3Bc2l9xHOI9g4+Bh1wGsLFrhMwFW+U39D7m5a6oOw==" - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "YAMLicious": { - "type": "Direct", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.300", - "contentHash": "Jv44fV7TNglyMku89lQcA4Q6mFKLyHb2bs1Yb72nvSVc+cHplEnoZ4XQUaaTLJGUTx/iMqcrkYGtaLzkkIhpaA==" - } - } - } -} \ No newline at end of file diff --git a/tests/ARCtrl/packages.lock.json b/tests/ARCtrl/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/ARCtrl/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Contract/packages.lock.json b/tests/Contract/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/Contract/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Core/packages.lock.json b/tests/Core/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/Core/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/FileSystem/packages.lock.json b/tests/FileSystem/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/FileSystem/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Json/ARCtrl.Json.Tests.fsproj b/tests/Json/ARCtrl.Json.Tests.fsproj index 4a4db2d8..2800691e 100644 --- a/tests/Json/ARCtrl.Json.Tests.fsproj +++ b/tests/Json/ARCtrl.Json.Tests.fsproj @@ -33,6 +33,7 @@ + diff --git a/tests/Json/LDObject.Tests.fs b/tests/Json/LDObject.Tests.fs new file mode 100644 index 00000000..ad053dc7 --- /dev/null +++ b/tests/Json/LDObject.Tests.fs @@ -0,0 +1,122 @@ +module Tests.LDObject + +open TestingUtils +open TestObjects.Json.ROCrate +open ARCtrl +open ARCtrl.ROCrate +open ARCtrl.Json +open DynamicObj + +let private test_read = testList "Read" [ + testCase "onlyIDAndType" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.onlyIDAndType) + Expect.equal json.Id "MyIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + testCase "onlyID" <| fun _ -> + let f = fun _ -> LDObject.fromROCrateJsonString(GenericObjects.onlyID) |> ignore + Expect.throws f "Should fail if Type is missing" + testCase "onlyType" <| fun _ -> + let f = fun _ -> LDObject.fromROCrateJsonString(GenericObjects.onlyType) |> ignore + Expect.throws f "Should fail if ID is missing" + testCase "withStringFields" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withStringFields) + Expect.equal json.Id "MyIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let name = Expect.wantSome (DynObj.tryGetTypedPropertyValue "name" json) "field name was not parsed" + Expect.equal name "MyName" "field name was not parsed correctly" + let description = Expect.wantSome (DynObj.tryGetTypedPropertyValue "description" json) "field description was not parsed" + Expect.equal description "MyDescription" "field description was not parsed correctly" + testCase "withIntFields" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withIntFields) + Expect.equal json.Id "MyIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let number = Expect.wantSome (DynObj.tryGetTypedPropertyValue "number" json) "field number was not parsed" + Expect.equal number 42 "field number was not parsed correctly" + let anotherNumber = Expect.wantSome (DynObj.tryGetTypedPropertyValue "anotherNumber" json) "field anotherNumber was not parsed" + Expect.equal anotherNumber 1337 "field anotherNumber was not parsed correctly" + testCase "withStringArray" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withStringArray) + Expect.equal json.Id "MyIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let names = Expect.wantSome (DynObj.tryGetTypedPropertyValue> "names" json) "field names was not parsed" + Expect.equal names.Count 2 "ResizeArray length is wrong" + Expect.equal names.[0] "MyName" "First name was not parsed correctly" + Expect.equal names.[1] "MySecondName" "Second name was not parsed correctly" + testCase "withNestedObject" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withNestedObject) + Expect.equal json.Id "OuterIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let nested = Expect.wantSome (DynObj.tryGetTypedPropertyValue "nested" json) "field nested was not parsed" + Expect.equal nested.Id "MyIdentifier" "nested id was not parsed correctly" + Expect.equal nested.SchemaType "MyType" "nested type was not parsed correctly" + testCase "withObjectArray" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withObjectArray) + Expect.equal json.Id "OuterIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let nested = Expect.wantSome (DynObj.tryGetTypedPropertyValue> "nested" json) "field nested was not parsed" + Expect.equal nested.Count 2 "ResizeArray length is wrong" + let o1 = nested.[0] :?> LDObject + Expect.equal o1.Id "MyIdentifier" "First nested id was not parsed correctly" + Expect.equal o1.SchemaType "MyType" "First nested type was not parsed correctly" + let o2 = nested.[1] :?> LDObject + Expect.equal o2.Id "MyIdentifier" "Second nested id was not parsed correctly" + Expect.equal o2.SchemaType "MyType" "Second nested type was not parsed correctly" + testCase "withMixedArray" <| fun _ -> + let json = LDObject.fromROCrateJsonString(GenericObjects.withMixedArray) + Expect.equal json.Id "OuterIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + let nested = Expect.wantSome (DynObj.tryGetTypedPropertyValue> "nested" json) "field nested was not parsed" + Expect.equal nested.Count 3 "ResizeArray length is wrong" + let o1 = nested.[0] :?> LDObject + Expect.equal o1.Id "MyIdentifier" "First nested id of object was not parsed correctly" + Expect.equal o1.SchemaType "MyType" "First nested type of object was not parsed correctly" + let o2 = nested.[1] :?> string + Expect.equal o2 "Value2" "Second nested string was not parsed correctly" + let o3 = nested.[2] :?> int + Expect.equal o3 42 "Third nested int was not parsed correctly" +] + +let test_write = testList "write" [ + testCase "onlyIDAndType" <| fun _ -> + let json = GenericObjects.onlyIDAndType + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withStringFields" <| fun _ -> + let json = GenericObjects.withStringFields + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withIntFields" <| fun _ -> + let json = GenericObjects.withIntFields + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withStringArray" <| fun _ -> + let json = GenericObjects.withStringArray + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withNestedObject" <| fun _ -> + let json = GenericObjects.withNestedObject + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withObjectArray" <| fun _ -> + let json = GenericObjects.withObjectArray + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + testCase "withMixedArray" <| fun _ -> + let json = GenericObjects.withMixedArray + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + + +] + +let main = testList "LDObject" [ + test_read + test_write +] \ No newline at end of file diff --git a/tests/Json/Main.fs b/tests/Json/Main.fs index f41e6665..ffec170f 100644 --- a/tests/Json/Main.fs +++ b/tests/Json/Main.fs @@ -21,6 +21,7 @@ let all = testSequenced <| testList "Json" [ Tests.Process.ProcessInput.main Tests.Process.Protocol.main Tests.Process.Process.main + Tests.LDObject.main Tests.SchemaValidation.main ] diff --git a/tests/Json/packages.lock.json b/tests/Json/packages.lock.json deleted file mode 100644 index 9008a83f..00000000 --- a/tests/Json/packages.lock.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "NJsonSchema": { - "type": "Direct", - "requested": "[10.8.0, )", - "resolved": "10.8.0", - "contentHash": "lChjsLWaxyvElh4WJjVhdIiCtx7rimYGFTxtSi2pAkZf0ZnKaXYIX484HCVyzbDDHejDZPgOrcfAJ3kqNSTONw==", - "dependencies": { - "Namotion.Reflection": "2.1.0", - "Newtonsoft.Json": "9.0.1" - } - }, - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Microsoft.CSharp": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Dynamic.Runtime": "4.3.0", - "System.Globalization": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Runtime.InteropServices": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "Microsoft.NETCore.Targets": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==" - }, - "Namotion.Reflection": { - "type": "Transitive", - "resolved": "2.1.0", - "contentHash": "9t63RauDp+CWzMCcCRAGXLRqEVIw0djYisGaDWhgHuXSaz/Djjpp9gpumCWVLpuDHLNf4HUmYWJeBt4AUyJSWA==", - "dependencies": { - "Microsoft.CSharp": "4.3.0" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "System.Collections": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3Dcj85/TBdVpL5Zr+gEEBUuFe2icOnLalmEh9hfck1PTYbbyWuZgh4fmm2ysCLTrqLQw6t3TgTyJ+VLp+Qb+Lw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Diagnostics.Debug": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "ZUhUOdqmaG5Jk3Xdb8xi5kIyQYAA4PnTNlHx1mu9ZY3qv4ELIdKbnL/akbGaKi2RnNUWaZsAs31rvzFdewTj2g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Dynamic.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "SNVi1E/vfWUAs/WYKhE9+qlS6KqK0YVhnlT0HQtr8pMIA8YX3lwy3uPMownDwdYISBdmAF/2holEIldVp85Wag==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Linq": "4.3.0", - "System.Linq.Expressions": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Globalization": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "kYdVd2f2PAdFGblzFswE4hkNANJBKRmsfa2X5LG2AcWE1c7/4t0pYae1L8vfZ5xvE2nK/R9JprtToA61OSHWIg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.IO": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0", - "System.Text.Encoding": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Linq": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5DbqIUpsDp0dFftytzuMmc0oeMdQwjcP/EWxsksIz/w1TcFRkZ3yKKz0PqiYFMmEwPSWw+qNVqD7PJ889JzHbw==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0" - } - }, - "System.Linq.Expressions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "PGKkrd2khG4CnlyJwxwwaWWiSiWFNBGlgXvJpeO0xCXrZ89ODrQ6tjEWS/kOqZ8GwEOUATtKtzp1eRgmYNfclg==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Globalization": "4.3.0", - "System.IO": "4.3.0", - "System.Linq": "4.3.0", - "System.ObjectModel": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Emit.Lightweight": "4.3.0", - "System.Reflection.Extensions": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Reflection.TypeExtensions": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Extensions": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.ObjectModel": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "bdX+80eKv9bN6K4N+d77OankKHGn6CH711a6fcOpMQu2Fckp/Ft4L/kW9WznHpyR0NRAvJutzOMHNNlBGvxQzQ==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Diagnostics.Debug": "4.3.0", - "System.Resources.ResourceManager": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading": "4.3.0" - } - }, - "System.Reflection": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.IO": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "228FG0jLcIwTVJyz8CLFKueVqQK36ANazUManGaJHkO0icjiIypKW7YLWLIWahyIkdh5M7mV2dJepllLyA1SKg==", - "dependencies": { - "System.IO": "4.3.0", - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.ILGeneration": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "59tBslAk9733NXLrUJrwNZEzbMAcu8k344OYo+wfSVygcgZ9lgBdGIzH/nrg3LYhXceynyvTc8t5/GD4Ri0/ng==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Emit.Lightweight": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "oadVHGSMsTmZsAF864QYN1t1QzZjIcuKU3l2S9cZOwDdDueNTrqq1yRj7koFfIGEnKpt6NjpL3rOzRhs4ryOgA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Reflection.Emit.ILGeneration": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "rJkrJD3kBI5B712aRu4DpSIiHRtr6QlfZSQsb0hYHrDCZORXCFjQfoipo2LaMUHoT9i1B7j7MnfaEKWDFmFQNQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.Primitives": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "7u6ulLcZbyxB5Gq0nMkQttcdBTx57ibzw+4IOXEfR+sXYQoHvjW5LTLyNr8O22UIMrqYbchJQJnos4eooYzYJA==", - "dependencies": { - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Resources.ResourceManager": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "/zrcPkkWdZmI4F92gL/TPumP98AVDu/Wxr3CSJGQQ+XN6wbRZcyfSKVoPo17ilb3iOr0cCRqJInGwNMolqhS8A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Globalization": "4.3.0", - "System.Reflection": "4.3.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0" - } - }, - "System.Runtime.Extensions": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "guW0uK0fn5fcJJ1tJVXYd7/1h5F+pea1r7FLSOz/f8vPEqbR2ZAknuRDvTQ8PzAilDveOxNjSfr0CHfIQfFk8g==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.Handles": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "OKiSUN7DmTWeYb3l51A7EYaeNMnvxwE249YtZz7yooT4gOZhmTjIn48KgSsw2k2lYdLgTKNJw/ZIfSElwDRVgg==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Runtime.InteropServices": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "uv1ynXqiMK8mp1GM3jDqPCFN66eJ5w5XNomaK2XD+TuCroNTLFGeZ+WCmBMcBDyTFKou3P6cR6J/QsaqDp7fGQ==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Reflection": "4.3.0", - "System.Reflection.Primitives": "4.3.0", - "System.Runtime": "4.3.0", - "System.Runtime.Handles": "4.3.0" - } - }, - "System.Text.Encoding": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "System.Threading": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "VkUS0kOBcUf3Wwm0TSbrevDDZ6BlM+b/HRiapRFWjM5O0NS0LviG0glKmFK+hhPDd1XFeSdU1GmlLhb2CoVpIw==", - "dependencies": { - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } - }, - "System.Threading.Tasks": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0", - "Microsoft.NETCore.Targets": "1.1.0", - "System.Runtime": "4.3.0" - } - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/ROCrate/ARCtrl.ROCrate.Tests.fsproj b/tests/ROCrate/ARCtrl.ROCrate.Tests.fsproj index bc69e92f..4d439667 100644 --- a/tests/ROCrate/ARCtrl.ROCrate.Tests.fsproj +++ b/tests/ROCrate/ARCtrl.ROCrate.Tests.fsproj @@ -7,7 +7,7 @@ - + diff --git a/tests/ROCrate/Common.fs b/tests/ROCrate/Common.fs index 350659bd..0c56cc5f 100644 --- a/tests/ROCrate/Common.fs +++ b/tests/ROCrate/Common.fs @@ -7,32 +7,32 @@ open TestingUtils module Expect = - let inline ROCrateObjectHasId (expectedId:string) (roc:#ROCrateObject) = + let inline LDObjectHasId (expectedId:string) (roc:#LDObject) = Expect.equal roc.Id expectedId "object did not contain correct @id" - let inline ROCrateObjectHasType (expectedType:string) (roc:#ROCrateObject) = + let inline LDObjectHasType (expectedType:string) (roc:#LDObject) = Expect.equal roc.SchemaType expectedType "object did not contain correct @type" - let inline ROCrateObjectHasAdditionalType (expectedAdditionalType:string) (roc:#ROCrateObject) = + let inline LDObjectHasAdditionalType (expectedAdditionalType:string) (roc:#LDObject) = Expect.isSome roc.AdditionalType "additionalType was None" Expect.equal roc.AdditionalType (Some expectedAdditionalType) "object did not contain correct additionalType" - let inline ROCrateObjectHasDynamicProperty (expectedPropertyName:string) (expectedPropertyValue:'P) (roc:#ROCrateObject) = + let inline LDObjectHasDynamicProperty (expectedPropertyName:string) (expectedPropertyValue:'P) (roc:#LDObject) = Expect.isSome (roc.TryGetDynamicPropertyHelper(expectedPropertyName)) $"object did not contain the dynamic property '{expectedPropertyName}'" Expect.equal (DynObj.tryGetTypedPropertyValue<'P> expectedPropertyName roc) (Some expectedPropertyValue) $"property value of '{expectedPropertyName}' was not correct" - let inline ROCrateObjectHasStaticProperty (expectedPropertyName:string) (expectedPropertyValue:'P) (roc:#ROCrateObject) = + let inline LDObjectHasStaticProperty (expectedPropertyName:string) (expectedPropertyValue:'P) (roc:#LDObject) = Expect.isSome (roc.TryGetDynamicPropertyHelper(expectedPropertyName)) $"object did not contain the dynamic property '{expectedPropertyName}'" Expect.equal (DynObj.tryGetTypedPropertyValue<'P> expectedPropertyName roc) (Some expectedPropertyValue) $"property value of '{expectedPropertyName}' was not correct" - let inline ROCrateObjectHasExpectedInterfaceMembers (expectedType:string) (expectedId:string) (expectedAdditionalType:string option) (roc:#ROCrateObject) = - let interfacerino = roc :> IROCrateObject + let inline LDObjectHasExpectedInterfaceMembers (expectedType:string) (expectedId:string) (expectedAdditionalType:string option) (roc:#LDObject) = + let interfacerino = roc :> ILDObject Expect.equal interfacerino.SchemaType expectedType "object did not contain correct @type via interface access" Expect.equal interfacerino.Id expectedId "object did not contain correct @id via interface access" Expect.equal interfacerino.AdditionalType expectedAdditionalType "object did not contain correct additionalType via interface access" diff --git a/tests/ROCrate/ISAProfile/Assay.Tests.fs b/tests/ROCrate/ISAProfile/Assay.Tests.fs index 7017443d..70eb7a86 100644 --- a/tests/ROCrate/ISAProfile/Assay.Tests.fs +++ b/tests/ROCrate/ISAProfile/Assay.Tests.fs @@ -26,30 +26,30 @@ let all_properties = Assay( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "assay_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Assay" mandatory_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "assay_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Assay" mandatory_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "assay_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Assay" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties - testCase "about" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "about" "about" all_properties - testCase "comment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "comment" "comment" all_properties - testCase "creator" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "creator" "creator" all_properties - testCase "hasPart" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "hasPart" "hasPart" all_properties - testCase "measurementMethod" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "measurementMethod" "measurementMethod" all_properties - testCase "measurementTechnique" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "measurementTechnique" "measurementTechnique" all_properties - testCase "url" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "url" "url" all_properties - testCase "variableMeasured" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "variableMeasured" "variableMeasured" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "assay_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Assay" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "about" <| fun _ -> Expect.LDObjectHasDynamicProperty "about" "about" all_properties + testCase "comment" <| fun _ -> Expect.LDObjectHasDynamicProperty "comment" "comment" all_properties + testCase "creator" <| fun _ -> Expect.LDObjectHasDynamicProperty "creator" "creator" all_properties + testCase "hasPart" <| fun _ -> Expect.LDObjectHasDynamicProperty "hasPart" "hasPart" all_properties + testCase "measurementMethod" <| fun _ -> Expect.LDObjectHasDynamicProperty "measurementMethod" "measurementMethod" all_properties + testCase "measurementTechnique" <| fun _ -> Expect.LDObjectHasDynamicProperty "measurementTechnique" "measurementTechnique" all_properties + testCase "url" <| fun _ -> Expect.LDObjectHasDynamicProperty "url" "url" all_properties + testCase "variableMeasured" <| fun _ -> Expect.LDObjectHasDynamicProperty "variableMeasured" "variableMeasured" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "assay_mandatory_properties_id" (Some "Assay") mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "assay_all_properties_id" (Some "Assay") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "assay_mandatory_properties_id" (Some "Assay") mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "assay_all_properties_id" (Some "Assay") all_properties ] let tests_dynamic_members = testSequenced ( @@ -57,15 +57,72 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + testCase "can get identifier" <| fun _ -> + let identifier = mandatory_properties.GetIdentifier() + Expect.equal identifier "identifier" "identifier was not retrieved correctly" + testCase "unset identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Assay("id", "identifier") + tmp.RemoveProperty("identifier") |> ignore + tmp.GetIdentifier() |> ignore + ) + "unset identifier did not throw" + testCase "incorrectly typed identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Assay("id", "identifier") + tmp.SetProperty("identifier", 42) |> ignore + tmp.GetIdentifier() |> ignore + ) + "incorrectly typed identifier did not throw" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Assay" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Data.Tests.fs b/tests/ROCrate/ISAProfile/Data.Tests.fs index 50df419e..bbeb6716 100644 --- a/tests/ROCrate/ISAProfile/Data.Tests.fs +++ b/tests/ROCrate/ISAProfile/Data.Tests.fs @@ -22,24 +22,24 @@ let all_properties = Data( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "data_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/MediaObject" mandatory_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "data_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/MediaObject" mandatory_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "data_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/MediaObject" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "comment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "comment" "comment" all_properties - testCase "encodingFormat" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "encodingFormat" "encodingFormat" all_properties - testCase "disambiguatingDescription" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "data_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/MediaObject" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "comment" <| fun _ -> Expect.LDObjectHasDynamicProperty "comment" "comment" all_properties + testCase "encodingFormat" <| fun _ -> Expect.LDObjectHasDynamicProperty "encodingFormat" "encodingFormat" all_properties + testCase "disambiguatingDescription" <| fun _ -> Expect.LDObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/MediaObject" "data_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/MediaObject" "data_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/MediaObject" "data_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/MediaObject" "data_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -47,15 +47,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Data" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Dataset.Tests.fs b/tests/ROCrate/ISAProfile/Dataset.Tests.fs index 86dd30c5..f4468679 100644 --- a/tests/ROCrate/ISAProfile/Dataset.Tests.fs +++ b/tests/ROCrate/ISAProfile/Dataset.Tests.fs @@ -11,19 +11,19 @@ let all_properties = Dataset("dataset_all_properties_id", additionalType = "addi let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "dataset_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "dataset_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "dataset_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "dataset_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "dataset_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "dataset_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "dataset_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "dataset_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -31,15 +31,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Dataset" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Investigation.Tests.fs b/tests/ROCrate/ISAProfile/Investigation.Tests.fs index 48da23ab..8e051460 100644 --- a/tests/ROCrate/ISAProfile/Investigation.Tests.fs +++ b/tests/ROCrate/ISAProfile/Investigation.Tests.fs @@ -29,33 +29,33 @@ let all_properties = Investigation( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "investigation_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Investigation" mandatory_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "investigation_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Investigation" mandatory_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "investigation_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Investigation" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties - testCase "citation" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "citation" "citation" all_properties - testCase "comment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "comment" "comment" all_properties - testCase "creator" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "creator" "creator" all_properties - testCase "dateCreated" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "dateCreated" "dateCreated" all_properties - testCase "dateModified" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "dateModified" "dateModified" all_properties - testCase "datePublished" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "datePublished" "datePublished" all_properties - testCase "hasPart" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "hasPart" "hasPart" all_properties - testCase "headline" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "headline" "headline" all_properties - testCase "mentions" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "mentions" "mentions" all_properties - testCase "url" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "url" "url" all_properties - testCase "description" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "description" "description" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "investigation_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Investigation" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "citation" <| fun _ -> Expect.LDObjectHasDynamicProperty "citation" "citation" all_properties + testCase "comment" <| fun _ -> Expect.LDObjectHasDynamicProperty "comment" "comment" all_properties + testCase "creator" <| fun _ -> Expect.LDObjectHasDynamicProperty "creator" "creator" all_properties + testCase "dateCreated" <| fun _ -> Expect.LDObjectHasDynamicProperty "dateCreated" "dateCreated" all_properties + testCase "dateModified" <| fun _ -> Expect.LDObjectHasDynamicProperty "dateModified" "dateModified" all_properties + testCase "datePublished" <| fun _ -> Expect.LDObjectHasDynamicProperty "datePublished" "datePublished" all_properties + testCase "hasPart" <| fun _ -> Expect.LDObjectHasDynamicProperty "hasPart" "hasPart" all_properties + testCase "headline" <| fun _ -> Expect.LDObjectHasDynamicProperty "headline" "headline" all_properties + testCase "mentions" <| fun _ -> Expect.LDObjectHasDynamicProperty "mentions" "mentions" all_properties + testCase "url" <| fun _ -> Expect.LDObjectHasDynamicProperty "url" "url" all_properties + testCase "description" <| fun _ -> Expect.LDObjectHasDynamicProperty "description" "description" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "investigation_mandatory_properties_id" (Some "Investigation") mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "investigation_all_properties_id" (Some "Investigation") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "investigation_mandatory_properties_id" (Some "Investigation") mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "investigation_all_properties_id" (Some "Investigation") all_properties ] let tests_dynamic_members = testSequenced ( @@ -63,15 +63,72 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + testCase "can get identifier" <| fun _ -> + let identifier = mandatory_properties.GetIdentifier() + Expect.equal identifier "identifier" "identifier was not retrieved correctly" + testCase "unset identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Investigation("id", "identifier") + tmp.RemoveProperty("identifier") |> ignore + tmp.GetIdentifier() |> ignore + ) + "unset identifier did not throw" + testCase "incorrectly typed identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Investigation("id", "identifier") + tmp.SetProperty("identifier", 42) |> ignore + tmp.GetIdentifier() |> ignore + ) + "incorrectly typed identifier did not throw" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Investigation" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/LabProcess.tests.fs b/tests/ROCrate/ISAProfile/LabProcess.tests.fs index 7ba286e7..23971baf 100644 --- a/tests/ROCrate/ISAProfile/LabProcess.tests.fs +++ b/tests/ROCrate/ISAProfile/LabProcess.tests.fs @@ -29,32 +29,32 @@ let all_properties = LabProcess( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "labprocess_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/LabProcess" mandatory_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" mandatory_properties - testCase "agent" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "agent" "agent" mandatory_properties - testCase "object" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "object" "object" mandatory_properties - testCase "result" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "result" "result" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "labprocess_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/LabProcess" mandatory_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" mandatory_properties + testCase "agent" <| fun _ -> Expect.LDObjectHasDynamicProperty "agent" "agent" mandatory_properties + testCase "object" <| fun _ -> Expect.LDObjectHasDynamicProperty "object" "object" mandatory_properties + testCase "result" <| fun _ -> Expect.LDObjectHasDynamicProperty "result" "result" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "labprocess_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/LabProcess" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "agent" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "agent" "agent" all_properties - testCase "object" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "object" "object" all_properties - testCase "result" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "result" "result" all_properties - testCase "executesLabProtocol" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "executesLabProtocol" "executesLabProtocol" all_properties - testCase "parameterValue" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "parameterValue" "parameterValue" all_properties - testCase "endTime" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "endTime" "endTime" all_properties - testCase "disambiguatingDescription" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "labprocess_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/LabProcess" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "agent" <| fun _ -> Expect.LDObjectHasDynamicProperty "agent" "agent" all_properties + testCase "object" <| fun _ -> Expect.LDObjectHasDynamicProperty "object" "object" all_properties + testCase "result" <| fun _ -> Expect.LDObjectHasDynamicProperty "result" "result" all_properties + testCase "executesLabProtocol" <| fun _ -> Expect.LDObjectHasDynamicProperty "executesLabProtocol" "executesLabProtocol" all_properties + testCase "parameterValue" <| fun _ -> Expect.LDObjectHasDynamicProperty "parameterValue" "parameterValue" all_properties + testCase "endTime" <| fun _ -> Expect.LDObjectHasDynamicProperty "endTime" "endTime" all_properties + testCase "disambiguatingDescription" <| fun _ -> Expect.LDObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/LabProcess" "labprocess_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/LabProcess" "labprocess_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/LabProcess" "labprocess_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/LabProcess" "labprocess_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -62,15 +62,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "LabProcess" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs index 55559c39..588036c0 100644 --- a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs +++ b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs @@ -26,28 +26,28 @@ let all_properties = LabProtocol( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "labprotocol_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/LabProtocol" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "labprotocol_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/LabProtocol" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "labprotocol_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/LabProtocol" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "intendedUse" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "intendedUse" "intendedUse" all_properties - testCase "description" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "description" "description" all_properties - testCase "url" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "url" "url" all_properties - testCase "comment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "comment" "comment" all_properties - testCase "version" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "version" "version" all_properties - testCase "labEquipment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "labEquipment" "labEquipment" all_properties - testCase "reagent" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "reagent" "reagent" all_properties - testCase "computationalTool" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "computationalTool" "computationalTool" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "labprotocol_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/LabProtocol" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "intendedUse" <| fun _ -> Expect.LDObjectHasDynamicProperty "intendedUse" "intendedUse" all_properties + testCase "description" <| fun _ -> Expect.LDObjectHasDynamicProperty "description" "description" all_properties + testCase "url" <| fun _ -> Expect.LDObjectHasDynamicProperty "url" "url" all_properties + testCase "comment" <| fun _ -> Expect.LDObjectHasDynamicProperty "comment" "comment" all_properties + testCase "version" <| fun _ -> Expect.LDObjectHasDynamicProperty "version" "version" all_properties + testCase "labEquipment" <| fun _ -> Expect.LDObjectHasDynamicProperty "labEquipment" "labEquipment" all_properties + testCase "reagent" <| fun _ -> Expect.LDObjectHasDynamicProperty "reagent" "reagent" all_properties + testCase "computationalTool" <| fun _ -> Expect.LDObjectHasDynamicProperty "computationalTool" "computationalTool" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/LabProtocol" "labprotocol_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/LabProtocol" "labprotocol_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/LabProtocol" "labprotocol_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/LabProtocol" "labprotocol_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -55,15 +55,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "LabProtocol" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Person.Tests.fs b/tests/ROCrate/ISAProfile/Person.Tests.fs index 67a4de84..107dfb28 100644 --- a/tests/ROCrate/ISAProfile/Person.Tests.fs +++ b/tests/ROCrate/ISAProfile/Person.Tests.fs @@ -29,31 +29,31 @@ let all_properties = Person( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "person_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Person" mandatory_properties - testCase "givenName" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "givenName" "givenName" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "person_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Person" mandatory_properties + testCase "givenName" <| fun _ -> Expect.LDObjectHasDynamicProperty "givenName" "givenName" all_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "person_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Person" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "givenName" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "givenName" "givenName" all_properties - testCase "familyName" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "familyName" "familyName" all_properties - testCase "email" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "email" "email" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties - testCase "affiliation" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "affiliation" "affiliation" all_properties - testCase "jobTitle" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "jobTitle" "jobTitle" all_properties - testCase "additionalName" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "additionalName" "additionalName" all_properties - testCase "address" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "address" "address" all_properties - testCase "telephone" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "telephone" "telephone" all_properties - testCase "faxNumber" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "faxNumber" "faxNumber" all_properties - testCase "disambiguatingDescription" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "person_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Person" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "givenName" <| fun _ -> Expect.LDObjectHasDynamicProperty "givenName" "givenName" all_properties + testCase "familyName" <| fun _ -> Expect.LDObjectHasDynamicProperty "familyName" "familyName" all_properties + testCase "email" <| fun _ -> Expect.LDObjectHasDynamicProperty "email" "email" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "affiliation" <| fun _ -> Expect.LDObjectHasDynamicProperty "affiliation" "affiliation" all_properties + testCase "jobTitle" <| fun _ -> Expect.LDObjectHasDynamicProperty "jobTitle" "jobTitle" all_properties + testCase "additionalName" <| fun _ -> Expect.LDObjectHasDynamicProperty "additionalName" "additionalName" all_properties + testCase "address" <| fun _ -> Expect.LDObjectHasDynamicProperty "address" "address" all_properties + testCase "telephone" <| fun _ -> Expect.LDObjectHasDynamicProperty "telephone" "telephone" all_properties + testCase "faxNumber" <| fun _ -> Expect.LDObjectHasDynamicProperty "faxNumber" "faxNumber" all_properties + testCase "disambiguatingDescription" <| fun _ -> Expect.LDObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Person" "person_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Person" "person_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Person" "person_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Person" "person_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -61,15 +61,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Person" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs index 10400219..c44ec118 100644 --- a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs +++ b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs @@ -25,27 +25,27 @@ let all_properties = PropertyValue( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "propertyvalue_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/PropertyValue" mandatory_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "value" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "value" "value" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "propertyvalue_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/PropertyValue" mandatory_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "value" <| fun _ -> Expect.LDObjectHasDynamicProperty "value" "value" all_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "propertyvalue_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/PropertyValue" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "value" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "value" "value" all_properties - testCase "propertyID" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "propertyID" "propertyID" all_properties - testCase "unitCode" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "unitCode" "unitCode" all_properties - testCase "unitText" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "unitText" "unitText" all_properties - testCase "valueReference" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "valueReference" "valueReference" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "propertyvalue_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/PropertyValue" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "value" <| fun _ -> Expect.LDObjectHasDynamicProperty "value" "value" all_properties + testCase "propertyID" <| fun _ -> Expect.LDObjectHasDynamicProperty "propertyID" "propertyID" all_properties + testCase "unitCode" <| fun _ -> Expect.LDObjectHasDynamicProperty "unitCode" "unitCode" all_properties + testCase "unitText" <| fun _ -> Expect.LDObjectHasDynamicProperty "unitText" "unitText" all_properties + testCase "valueReference" <| fun _ -> Expect.LDObjectHasDynamicProperty "valueReference" "valueReference" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/PropertyValue" "propertyvalue_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/PropertyValue" "propertyvalue_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/PropertyValue" "propertyvalue_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/PropertyValue" "propertyvalue_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -53,15 +53,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "PropertyValue" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Sample.tests.fs b/tests/ROCrate/ISAProfile/Sample.tests.fs index 0396e829..659cb47d 100644 --- a/tests/ROCrate/ISAProfile/Sample.tests.fs +++ b/tests/ROCrate/ISAProfile/Sample.tests.fs @@ -21,23 +21,23 @@ let all_properties = Sample( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "sample_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/Sample" mandatory_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "sample_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/Sample" mandatory_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "sample_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "bioschemas.org/Sample" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "name" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "name" "name" all_properties - testCase "additionalProperty" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "additionalProperty" "additionalProperty" all_properties - testCase "derivesFrom" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "derivesFrom" "derivesFrom" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "sample_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "bioschemas.org/Sample" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "name" <| fun _ -> Expect.LDObjectHasDynamicProperty "name" "name" all_properties + testCase "additionalProperty" <| fun _ -> Expect.LDObjectHasDynamicProperty "additionalProperty" "additionalProperty" all_properties + testCase "derivesFrom" <| fun _ -> Expect.LDObjectHasDynamicProperty "derivesFrom" "derivesFrom" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/Sample" "sample_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "bioschemas.org/Sample" "sample_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/Sample" "sample_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "bioschemas.org/Sample" "sample_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -45,15 +45,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Sample" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs index 9e7534ef..ea2c1168 100644 --- a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs +++ b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs @@ -25,27 +25,27 @@ let all_properties = ScholarlyArticle( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "scholarlyarticle_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/ScholarlyArticle" mandatory_properties - testCase "headline" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "headline" "headline" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "scholarlyarticle_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/ScholarlyArticle" mandatory_properties + testCase "headline" <| fun _ -> Expect.LDObjectHasDynamicProperty "headline" "headline" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "scholarlyarticle_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/ScholarlyArticle" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - testCase "headline" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "headline" "headline" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties - testCase "author" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "author" "author" all_properties - testCase "url" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "url" "url" all_properties - testCase "creativeWorkStatus" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "creativeWorkStatus" "creativeWorkStatus" all_properties - testCase "disambiguatingDescription" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "scholarlyarticle_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/ScholarlyArticle" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + testCase "headline" <| fun _ -> Expect.LDObjectHasDynamicProperty "headline" "headline" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "author" <| fun _ -> Expect.LDObjectHasDynamicProperty "author" "author" all_properties + testCase "url" <| fun _ -> Expect.LDObjectHasDynamicProperty "url" "url" all_properties + testCase "creativeWorkStatus" <| fun _ -> Expect.LDObjectHasDynamicProperty "creativeWorkStatus" "creativeWorkStatus" all_properties + testCase "disambiguatingDescription" <| fun _ -> Expect.LDObjectHasDynamicProperty "disambiguatingDescription" "disambiguatingDescription" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/ScholarlyArticle" "scholarlyarticle_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/ScholarlyArticle" "scholarlyarticle_all_properties_id" (Some "additionalType") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/ScholarlyArticle" "scholarlyarticle_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/ScholarlyArticle" "scholarlyarticle_all_properties_id" (Some "additionalType") all_properties ] let tests_dynamic_members = testSequenced ( @@ -53,15 +53,53 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "ScholarlyArticle" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Study.Tests.fs b/tests/ROCrate/ISAProfile/Study.Tests.fs index b6ce52de..b987aef2 100644 --- a/tests/ROCrate/ISAProfile/Study.Tests.fs +++ b/tests/ROCrate/ISAProfile/Study.Tests.fs @@ -29,33 +29,33 @@ let all_properties = Study( let tests_profile_object_is_valid = testList "constructed properties" [ testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "study_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" mandatory_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Study" mandatory_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" mandatory_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "study_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" mandatory_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Study" mandatory_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" mandatory_properties ] testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "study_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "schema.org/Dataset" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "Study" all_properties - testCase "identifier" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "identifier" "identifier" all_properties - testCase "about" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "about" "about" all_properties - testCase "citation" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "citation" "citation" all_properties - testCase "comment" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "comment" "comment" all_properties - testCase "creator" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "creator" "creator" all_properties - testCase "dateCreated" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "dateCreated" "dateCreated" all_properties - testCase "dateModified" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "dateModified" "dateModified" all_properties - testCase "datePublished" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "datePublished" "datePublished" all_properties - testCase "description" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "description" "description" all_properties - testCase "hasPart" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "hasPart" "hasPart" all_properties - testCase "headline" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "headline" "headline" all_properties - testCase "url" <| fun _ -> Expect.ROCrateObjectHasDynamicProperty "url" "url" all_properties + testCase "Id" <| fun _ -> Expect.LDObjectHasId "study_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "schema.org/Dataset" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "Study" all_properties + testCase "identifier" <| fun _ -> Expect.LDObjectHasDynamicProperty "identifier" "identifier" all_properties + testCase "about" <| fun _ -> Expect.LDObjectHasDynamicProperty "about" "about" all_properties + testCase "citation" <| fun _ -> Expect.LDObjectHasDynamicProperty "citation" "citation" all_properties + testCase "comment" <| fun _ -> Expect.LDObjectHasDynamicProperty "comment" "comment" all_properties + testCase "creator" <| fun _ -> Expect.LDObjectHasDynamicProperty "creator" "creator" all_properties + testCase "dateCreated" <| fun _ -> Expect.LDObjectHasDynamicProperty "dateCreated" "dateCreated" all_properties + testCase "dateModified" <| fun _ -> Expect.LDObjectHasDynamicProperty "dateModified" "dateModified" all_properties + testCase "datePublished" <| fun _ -> Expect.LDObjectHasDynamicProperty "datePublished" "datePublished" all_properties + testCase "description" <| fun _ -> Expect.LDObjectHasDynamicProperty "description" "description" all_properties + testCase "hasPart" <| fun _ -> Expect.LDObjectHasDynamicProperty "hasPart" "hasPart" all_properties + testCase "headline" <| fun _ -> Expect.LDObjectHasDynamicProperty "headline" "headline" all_properties + testCase "url" <| fun _ -> Expect.LDObjectHasDynamicProperty "url" "url" all_properties ] ] let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "study_mandatory_properties_id" (Some "Study") mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "schema.org/Dataset" "study_all_properties_id" (Some "Study") all_properties + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "study_mandatory_properties_id" (Some "Study") mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "schema.org/Dataset" "study_all_properties_id" (Some "Study") all_properties ] let tests_dynamic_members = testSequenced ( @@ -63,15 +63,72 @@ let tests_dynamic_members = testSequenced ( testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" testCase "Set dynamic property" <| fun _ -> mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties testCase "Remove dynamic property" <| fun _ -> mandatory_properties.RemoveProperty("yes") |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + testCase "can get identifier" <| fun _ -> + let identifier = mandatory_properties.GetIdentifier() + Expect.equal identifier "identifier" "identifier was not retrieved correctly" + testCase "unset identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Study("id", "identifier") + tmp.RemoveProperty("identifier") |> ignore + tmp.GetIdentifier() |> ignore + ) + "unset identifier did not throw" + testCase "incorrectly typed identifier throws" <| fun _ -> + Expect.throws + (fun () -> + let tmp = new Study("id", "identifier") + tmp.SetProperty("identifier", 42) |> ignore + tmp.GetIdentifier() |> ignore + ) + "incorrectly typed identifier did not throw" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "Study" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file diff --git a/tests/ROCrate/LDObject.Tests.fs b/tests/ROCrate/LDObject.Tests.fs new file mode 100644 index 00000000..658c7e1d --- /dev/null +++ b/tests/ROCrate/LDObject.Tests.fs @@ -0,0 +1,83 @@ +module Tests.LDObject + +open ARCtrl.ROCrate +open DynamicObj + +open TestingUtils +open Common + +let mandatory_properties = LDObject("LDObject_mandatory_properties_id", "someType") +let all_properties = LDObject("LDObject_all_properties_id", "someType", additionalType = "additionalType") + +let tests_profile_object_is_valid = testList "constructed properties" [ + testList "mandatory properties" [ + testCase "Id" <| fun _ -> Expect.LDObjectHasId "LDObject_mandatory_properties_id" mandatory_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "someType" mandatory_properties + ] + testList "all properties" [ + testCase "Id" <| fun _ -> Expect.LDObjectHasId "LDObject_all_properties_id" all_properties + testCase "SchemaType" <| fun _ -> Expect.LDObjectHasType "someType" all_properties + testCase "AdditionalType" <| fun _ -> Expect.LDObjectHasAdditionalType "additionalType" all_properties + ] +] + +let tests_interface_members = testList "interface members" [ + testCase "mandatoryProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "someType" "LDObject_mandatory_properties_id" None mandatory_properties + testCase "allProperties" <| fun _ -> Expect.LDObjectHasExpectedInterfaceMembers "someType" "LDObject_all_properties_id" (Some "additionalType") all_properties +] + +let tests_dynamic_members = testSequenced ( + testList "dynamic members" [ + testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" + testCase "Set dynamic property" <| fun _ -> + mandatory_properties.SetProperty("yes",42) + Expect.LDObjectHasDynamicProperty "yes" 42 mandatory_properties + testCase "Remove dynamic property" <| fun _ -> + mandatory_properties.RemoveProperty("yes") |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" + ] +) + +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = mandatory_properties.TryGetContext() + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new LDContext() + context.SetProperty("more", "context") + + testCase "can set context" <| fun _ -> + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = LDObject.tryGetContext() mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + LDObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let main = testList "LDObject" [ + tests_profile_object_is_valid + tests_interface_members + tests_dynamic_members + tests_instance_methods + tests_static_methods +] \ No newline at end of file diff --git a/tests/ROCrate/Main.fs b/tests/ROCrate/Main.fs index 910e1aca..6f6df3c7 100644 --- a/tests/ROCrate/Main.fs +++ b/tests/ROCrate/Main.fs @@ -3,7 +3,7 @@ module ARCtrl.ROCrate.Tests open Fable.Pyxpecto let all = testSequenced <| testList "ROCrate" [ - Tests.ROCrateObject.main + Tests.LDObject.main Tests.Dataset.main Tests.Investigation.main Tests.Study.main diff --git a/tests/ROCrate/ROCrateObject.Tests.fs b/tests/ROCrate/ROCrateObject.Tests.fs deleted file mode 100644 index 08ebaa97..00000000 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ /dev/null @@ -1,45 +0,0 @@ -module Tests.ROCrateObject - -open ARCtrl.ROCrate -open DynamicObj - -open TestingUtils -open Common - -let mandatory_properties = ROCrateObject("rocrateobject_mandatory_properties_id", "someType") -let all_properties = ROCrateObject("rocrateobject_all_properties_id", "someType", additionalType = "additionalType") - -let tests_profile_object_is_valid = testList "constructed properties" [ - testList "mandatory properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "rocrateobject_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "someType" mandatory_properties - ] - testList "all properties" [ - testCase "Id" <| fun _ -> Expect.ROCrateObjectHasId "rocrateobject_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "someType" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" all_properties - ] -] - -let tests_interface_members = testList "interface members" [ - testCase "mandatoryProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "someType" "rocrateobject_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "someType" "rocrateobject_all_properties_id" (Some "additionalType") all_properties -] - -let tests_dynamic_members = testSequenced ( - testList "dynamic members" [ - testCase "property not present before setting" <| fun _ -> Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be set" - testCase "Set dynamic property" <| fun _ -> - mandatory_properties.SetProperty("yes",42) - Expect.ROCrateObjectHasDynamicProperty "yes" 42 mandatory_properties - testCase "Remove dynamic property" <| fun _ -> - mandatory_properties.RemoveProperty("yes") |> ignore - Expect.isNone (DynObj.tryGetTypedPropertyValue "yes" mandatory_properties) "dynamic property 'yes' was set although it was expected not to be removed" - ] -) - -let main = testList "ROCrateObject" [ - tests_profile_object_is_valid - tests_interface_members - tests_dynamic_members -] \ No newline at end of file diff --git a/tests/ROCrate/packages.lock.json b/tests/ROCrate/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/ROCrate/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Speedtest/packages.lock.json b/tests/Speedtest/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/Speedtest/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Spreadsheet/packages.lock.json b/tests/Spreadsheet/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/Spreadsheet/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/TestingUtils/TestObjects.Json/ROCrate.fs b/tests/TestingUtils/TestObjects.Json/ROCrate.fs index e58744b2..4d403ca6 100644 --- a/tests/TestingUtils/TestObjects.Json/ROCrate.fs +++ b/tests/TestingUtils/TestObjects.Json/ROCrate.fs @@ -199,4 +199,66 @@ let publication = """{ "authorList": "sdo:author", "comments": "sdo:disambiguatingDescription" } -}""" \ No newline at end of file +}""" + +module GenericObjects = + + let onlyIDAndType = + """{ + "@id": "MyIdentifier", + "@type": "MyType" + }""" + + let onlyID = + """{ + "@id": "OnlyIdentifier" + }""" + + let onlyType = + """{ + "@type": "MyType" + }""" + + let withStringFields = + """{ + "@id": "MyIdentifier", + "@type": "MyType", + "name": "MyName", + "description": "MyDescription" + }""" + + let withIntFields = + """{ + "@id": "MyIdentifier", + "@type": "MyType", + "number": 42, + "anotherNumber": 1337 + }""" + + let withStringArray = + """{ + "@id": "MyIdentifier", + "@type": "MyType", + "names": ["MyName", "MySecondName"] + }""" + + let withNestedObject = + sprintf """{ + "@id": "OuterIdentifier", + "@type": "MyType", + "nested": %s + }""" onlyIDAndType + + let withObjectArray = + sprintf """{ + "@id": "OuterIdentifier", + "@type": "MyType", + "nested": [%s, %s] + }""" onlyIDAndType onlyIDAndType + + let withMixedArray = + sprintf """{ + "@id": "OuterIdentifier", + "@type": "MyType", + "nested": [%s, "Value2", 42] + }""" onlyIDAndType \ No newline at end of file diff --git a/tests/TestingUtils/packages.lock.json b/tests/TestingUtils/packages.lock.json deleted file mode 100644 index 85b7e769..00000000 --- a/tests/TestingUtils/packages.lock.json +++ /dev/null @@ -1,305 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Node": { - "type": "Direct", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "Direct", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.2.0", - "contentHash": "bM4zbtIeycTFFCH7o4WuN28W70dTxNTMZiMvR70XUTYrBnbz7GpS5XxzUy5caDB4l7s2l7wiuVDhh52t7NXxDg==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.5.0", - "contentHash": "Bx2AOOASIG1Eq1Pe8869H8baMePte6STmKGccGuOYMT2p6nWVS8G6ZBZb5encQ0tAL2/0vhA4KJOl4bYwUaQqg==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Browser.Gamepad": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Gamepad": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "8m/Ae/mrH2Hb2ue435rTPEeVb2FhfWsRJJLpCxMvk+5EUOO2+IIjIkLq4thUfRL98uQVt9V5cQd14h2aBf2XJA==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Promise": { - "type": "Transitive", - "resolved": "2.2.2", - "contentHash": "yHFSo7GCY0l/Wjskh/HESuFoGzXIoRM22UlrARA5ewnX736Y1wM27kcqCWeGcIzaEsgJnZcDkp093M0gQyMcWA==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "3.1.5" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.javascript": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.Fetch": "[2.6.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Javascript": "[0.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Fetch": { - "type": "CentralTransitive", - "requested": "[2.6.0, )", - "resolved": "2.6.0", - "contentHash": "zhCl95EYeuKcc7bk2jGHLSuLhkPqvRcrlwC91GqgX51BlQ7WJF2IQ7mUxW2n1mg74M1D2VOwEKqQpTAZDCVa8Q==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Browser.Blob": "1.2.0", - "Fable.Browser.Event": "1.5.0", - "Fable.Core": "3.7.1", - "Fable.Promise": "2.2.2" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.JavaScript": { - "type": "CentralTransitive", - "requested": "[0.3.0, )", - "resolved": "0.3.0", - "contentHash": "A4Cwv+RigC52/OdcrU2woEvjd6rsiDlQGDNTqwXYe3Yh6cdzcLWTfmmwTuCOXgV8SMbcSkviqiS2AG5BS42ayg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/ValidationPackages/packages.lock.json b/tests/ValidationPackages/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/ValidationPackages/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file diff --git a/tests/Yaml/packages.lock.json b/tests/Yaml/packages.lock.json deleted file mode 100644 index c9cf6a9a..00000000 --- a/tests/Yaml/packages.lock.json +++ /dev/null @@ -1,255 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net8.0": { - "Fable.Browser.Blob": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "xMX7hPFwBUGuj75xLlH6VsVThZjRlGW4zOqXb1X+byRPLSBE91vtn9EueNUB+YpGhE9LfrtakIPNGy+dkoMkjg==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Dom": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZodpIKYuKnUnqN71Fi103mh0joFYrRPGwpYOrpbZ149PkVAW7DNKXgxad5lsi9df7vAe5+sBhhO71TPREZaWlw==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Blob": "1.0.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Browser.WebStorage": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.Event": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "T1bGrlRJ4A2fxOfAVPzJpxanR6lkzPgJroPdSN1IU5CLdKtvRakWmYq6QKqu4dz6ZV9Z3fIPTWLZkoGKEOEo3w==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.WebStorage": { - "type": "Transitive", - "resolved": "1.0.0", - "contentHash": "ZqnZKYkhPO+wmJPxQqtiwSc3zCC/mB37SPlVi4ZLiHoPFnra7SQ3qaRn4/ENYTeaVtVq92eVaYbTyAOnFn+GPA==", - "dependencies": { - "FSharp.Core": "4.5.2", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Browser.XMLHttpRequest": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "27p/F8781NrnV9vQ23RhX10ww9MDkX+Yi3yTiV9s8U8Bufi/VCCjS4swX0LXvgKQANN3k87CwaNeiO75r2U7gw==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Blob": "1.1.0", - "Fable.Browser.Event": "1.0.0", - "Fable.Core": "3.0.0" - } - }, - "Fable.Python": { - "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "KT5PI4NyMtVLDcmDkf5SeqwtFjVO17u27xr45qXfYWG12UePHxGjQJoI16OafIzlEQ6cHfAuRljhZGKIlvOJNQ==", - "dependencies": { - "FSharp.Core": "4.7.2", - "Fable.Core": "[4.1.0, 5.0.0)" - } - }, - "Newtonsoft.Json": { - "type": "Transitive", - "resolved": "13.0.1", - "contentHash": "ppPFpBcvxdsfUonNcvITKqLl3bqxWbDCZIzDWHzjpdAHRFfZe0Dw9HmA0+za13IdyrgJwpkDTDA9fHaxOrt20A==" - }, - "arctrl": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.Contract": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "Fable.SimpleHttp": "[3.5.0, )", - "Thoth.Json.Newtonsoft": "[0.2.0, )" - } - }, - "arctrl.contract": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.Json": "[1.0.0, )", - "ARCtrl.Spreadsheet": "[1.0.0, )", - "ARCtrl.Yaml": "[1.0.0, )" - } - }, - "arctrl.core": { - "type": "Project", - "dependencies": { - "ARCtrl.CWL": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )" - } - }, - "arctrl.cwl": { - "type": "Project" - }, - "arctrl.filesystem": { - "type": "Project", - "dependencies": { - "Fable.Core": "[4.3.0, )" - } - }, - "arctrl.json": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ROCrate": "[1.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.rocrate": { - "type": "Project", - "dependencies": { - "DynamicObj": "[4.0.0, )", - "Thoth.Json.Core": "[0.4.0, )" - } - }, - "arctrl.spreadsheet": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.FileSystem": "[1.0.0, )", - "FsSpreadsheet": "[6.3.0-alpha.4, )" - } - }, - "arctrl.validationpackages": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )" - } - }, - "arctrl.yaml": { - "type": "Project", - "dependencies": { - "ARCtrl.Core": "[1.0.0, )", - "ARCtrl.ValidationPackages": "[1.0.0, )", - "YAMLicious": "[0.0.1, )" - } - }, - "testingutils": { - "type": "Project", - "dependencies": { - "ARCtrl": "[1.0.0, )", - "Fable.Node": "[1.2.0, )", - "Fable.Pyxpecto": "[1.2.0, )" - } - }, - "DynamicObj": { - "type": "CentralTransitive", - "requested": "[4.0.0, )", - "resolved": "4.0.0", - "contentHash": "BoJawULfNYty61v2F5ZRY/DSUTA9TEZrUBR823ggHGZgV1AXbGlZIeFgTJ3rF8+R96bIyXqNOTiQNbcvzEhNfQ==", - "dependencies": { - "FSharp.Core": "8.0.400", - "Fable.Core": "4.3.0" - } - }, - "Fable.Core": { - "type": "CentralTransitive", - "requested": "[4.3.0, )", - "resolved": "4.3.0", - "contentHash": "sbK+hYs7H7I3b3sbgttI4GlvQfNPcIqSz1qPSagF3QbVA46KJ/pWSXC/Dwv0s9M6AeRGmoqcIeD7GUaLn41zkA==" - }, - "Fable.Node": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "FVUFFcryE6pldYopULB+mpRtE6cmlG1evvVE9wDB0O8JKWLGrStHmNF4fqn7cyN1j2ufsvlPcw88PqoCt2OGuQ==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "3.1.2" - } - }, - "Fable.Pyxpecto": { - "type": "CentralTransitive", - "requested": "[1.2.0, )", - "resolved": "1.2.0", - "contentHash": "I6jt1fCXXOipJ9tocdBstBK/LFOXa74e6v1GzeiqyWS+v0Lk4xH4NuD2f9g1todETt7A20ib7hvQigMNKqN0Aw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Python": "4.3.0" - } - }, - "Fable.SimpleHttp": { - "type": "CentralTransitive", - "requested": "[3.5.0, )", - "resolved": "3.5.0", - "contentHash": "SWYshvAI90JcdGLsUmTWBG9eaazY6ihdIk/uehrEz/VqMx9qX+e7+PzYaw31DMwGYSva9/mpq9s69T/z8Ubl5Q==", - "dependencies": { - "FSharp.Core": "4.6.2", - "Fable.Browser.Dom": "1.0.0", - "Fable.Browser.XMLHttpRequest": "1.1.0", - "Fable.Core": "3.0.0" - } - }, - "FSharp.Core": { - "type": "CentralTransitive", - "requested": "[8.0.1, )", - "resolved": "8.0.400", - "contentHash": "kHMdDDmlZl98tujgHCmL8/HNH9VKbxsRMC9s7wbwr4noR40SSa5D4d00yF8cMK52s8jabVuiLLcrUw9r+PkKDQ==" - }, - "FsSpreadsheet": { - "type": "CentralTransitive", - "requested": "[6.3.0-alpha.4, )", - "resolved": "6.3.0-alpha.4", - "contentHash": "XBjvsfQ3aC3q7W2BcoMJ9Wo6DkH1FLmuAmsGa4CSWmIcDSXPu/Gsg3cl7kDQfdOKonAe1uEnb5KPqEHdjGkNQg==", - "dependencies": { - "FSharp.Core": "6.0.7", - "Fable.Package.SDK": "1.0.0", - "Thoth.Json.Core": "0.4.0" - } - }, - "Thoth.Json.Core": { - "type": "CentralTransitive", - "requested": "[0.4.0, )", - "resolved": "0.4.0", - "contentHash": "+9ECg/XDpLHsa5pPW8x9ZsZL4bWZqhgTScHHuhxqgjxYRwwoi41oushdfEHZ8WoQwmNdCPCljSkX1nTZ91muVw==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "1.0.0" - } - }, - "Thoth.Json.Newtonsoft": { - "type": "CentralTransitive", - "requested": "[0.2.0, )", - "resolved": "0.2.0", - "contentHash": "dMQOT6TJftO97c8gHWFegfSw/0/E+VdhGaSkf3e1Ba+DjrAESLA9HMlYyE30x7nhn7w5SfH1WO9YyzSRTV4Ysg==", - "dependencies": { - "FSharp.Core": "5.0.0", - "Fable.Core": "4.1.0", - "Fable.Package.SDK": "0.1.0", - "Newtonsoft.Json": "13.0.1", - "Thoth.Json.Core": "0.3.0" - } - }, - "YAMLicious": { - "type": "CentralTransitive", - "requested": "[0.0.1, )", - "resolved": "0.0.1", - "contentHash": "3QQH1VxkTdtU/RZgrzZwNNLAt8zg2Di65wh1dgS2OB1IT3NqFGyjhU+A60siB1+8rxXUe4Ou5nOVGvgDtydYug==", - "dependencies": { - "FSharp.Core": "8.0.300", - "Fable.Core": "4.3.0" - } - } - } - } -} \ No newline at end of file