From b038cfc1fd26c9bcca559c898d20e2f4943e4722 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Fri, 6 Sep 2024 15:25:04 +0200 Subject: [PATCH 01/10] Add '@context' support: - instance methods and static methods for set/tryGet/remove - tests for all classes --- src/ROCrate/ROCrateObject.fs | 18 ++++++++- tests/ROCrate/ISAProfile/Assay.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/Data.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/Dataset.Tests.fs | 38 +++++++++++++++++++ .../ROCrate/ISAProfile/Investigation.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/LabProcess.tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/LabProtocol.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/Person.Tests.fs | 38 +++++++++++++++++++ .../ROCrate/ISAProfile/PropertyValue.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/Sample.tests.fs | 38 +++++++++++++++++++ .../ISAProfile/ScholarlyArticle.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ISAProfile/Study.Tests.fs | 38 +++++++++++++++++++ tests/ROCrate/ROCrateObject.Tests.fs | 38 +++++++++++++++++++ 13 files changed, 473 insertions(+), 1 deletion(-) diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs index 35d18f0f..9e3cb8f5 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/ROCrateObject.fs @@ -39,4 +39,20 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = member this.AdditionalType with get() = _additionalType - and set(value) = _additionalType <- value \ No newline at end of file + and set(value) = _additionalType <- value + + member this.SetContext (context: #DynamicObj) = + this.SetValue("@context", context) + + static member setContext (context: #DynamicObj) = + fun (roc: #ROCrateObject) -> roc.SetContext(context) + + member this.TryGetContext() = + DynObj.tryGetTypedValue("@context") this + + static member tryGetContext (roc: #ROCrateObject) = roc.TryGetContext() + + member this.RemoveContext() = + this.Remove("@context") + + static member removeContext (roc: #ROCrateObject) = roc.RemoveContext() \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Assay.Tests.fs b/tests/ROCrate/ISAProfile/Assay.Tests.fs index 7017443d..6dbf61ff 100644 --- a/tests/ROCrate/ISAProfile/Assay.Tests.fs +++ b/tests/ROCrate/ISAProfile/Assay.Tests.fs @@ -64,8 +64,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..93280fe9 100644 --- a/tests/ROCrate/ISAProfile/Data.Tests.fs +++ b/tests/ROCrate/ISAProfile/Data.Tests.fs @@ -54,8 +54,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..79a955d7 100644 --- a/tests/ROCrate/ISAProfile/Dataset.Tests.fs +++ b/tests/ROCrate/ISAProfile/Dataset.Tests.fs @@ -38,8 +38,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..66749a47 100644 --- a/tests/ROCrate/ISAProfile/Investigation.Tests.fs +++ b/tests/ROCrate/ISAProfile/Investigation.Tests.fs @@ -70,8 +70,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..9774e04c 100644 --- a/tests/ROCrate/ISAProfile/LabProcess.tests.fs +++ b/tests/ROCrate/ISAProfile/LabProcess.tests.fs @@ -69,8 +69,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..efb84eb9 100644 --- a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs +++ b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs @@ -62,8 +62,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..46e3fb6f 100644 --- a/tests/ROCrate/ISAProfile/Person.Tests.fs +++ b/tests/ROCrate/ISAProfile/Person.Tests.fs @@ -68,8 +68,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..568e3549 100644 --- a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs +++ b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs @@ -60,8 +60,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..ca5083a0 100644 --- a/tests/ROCrate/ISAProfile/Sample.tests.fs +++ b/tests/ROCrate/ISAProfile/Sample.tests.fs @@ -52,8 +52,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..c90f2363 100644 --- a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs +++ b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs @@ -60,8 +60,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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..0d40bc43 100644 --- a/tests/ROCrate/ISAProfile/Study.Tests.fs +++ b/tests/ROCrate/ISAProfile/Study.Tests.fs @@ -70,8 +70,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@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/ROCrateObject.Tests.fs b/tests/ROCrate/ROCrateObject.Tests.fs index 08ebaa97..a0747e11 100644 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ b/tests/ROCrate/ROCrateObject.Tests.fs @@ -38,8 +38,46 @@ let tests_dynamic_members = testSequenced ( ] ) +let tests_instance_methods = testSequenced ( + testList "instance methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + mandatory_properties.SetContext context + Expect.ROCrateObjectHasDynamicProperty "@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() + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + +let tests_static_methods = testSequenced ( + testList "static methods" [ + + let context = new DynamicObj() + context.SetValue("more", "context") + + testCase "can set context" <| fun _ -> + ROCrateObject.setContext context mandatory_properties + Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + testCase "can get context" <| fun _ -> + let ctx = ROCrateObject.tryGetContext mandatory_properties + Expect.equal ctx (Some context) "context was not set correctly" + testCase "can remove context" <| fun _ -> + ROCrateObject.removeContext mandatory_properties + Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ] +) + let main = testList "ROCrateObject" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members + tests_instance_methods + tests_static_methods ] \ No newline at end of file From d5d5201898cdfe9bb365c902d6f33129a2f3e19a Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Fri, 6 Sep 2024 17:09:11 +0200 Subject: [PATCH 02/10] #433: Add api functions for mandatory dynamic props on some classes --- src/ROCrate/ISAProfile/Assay.fs | 23 ++++++++------- src/ROCrate/ISAProfile/Investigation.fs | 29 ++++++++++--------- src/ROCrate/ISAProfile/LabProcess.fs | 22 ++++++++++---- src/ROCrate/ISAProfile/Study.fs | 6 ++-- src/ROCrate/ROCrateObject.fs | 7 ++--- tests/ROCrate/ISAProfile/Assay.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Data.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Dataset.Tests.fs | 4 +-- .../ROCrate/ISAProfile/Investigation.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/LabProcess.tests.fs | 4 +-- tests/ROCrate/ISAProfile/LabProtocol.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Person.Tests.fs | 4 +-- .../ROCrate/ISAProfile/PropertyValue.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Sample.tests.fs | 4 +-- .../ISAProfile/ScholarlyArticle.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Study.Tests.fs | 4 +-- tests/ROCrate/ROCrateObject.Tests.fs | 4 +-- 17 files changed, 77 insertions(+), 58 deletions(-) diff --git a/src/ROCrate/ISAProfile/Assay.fs b/src/ROCrate/ISAProfile/Assay.fs index 525433ff..b1148a01 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.setValueOpt this (nameof measurementMethod) measurementMethod + DynObj.setValueOpt this (nameof measurementTechnique) measurementTechnique + DynObj.setValueOpt this (nameof variableMeasured) variableMeasured + DynObj.setValueOpt this (nameof about) about + DynObj.setValueOpt this (nameof comment) comment + DynObj.setValueOpt this (nameof creator) creator + DynObj.setValueOpt this (nameof hasPart) hasPart + DynObj.setValueOpt this (nameof url) url + + member this.GetIdentifier() = DynObj.tryGetTypedValue (nameof identifier) this |> Option.get + static member getIdentifier = fun (ass: Assay) -> ass.GetIdentifier() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Investigation.fs b/src/ROCrate/ISAProfile/Investigation.fs index 607170fa..ed466d03 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.setValueOpt this (nameof citation) citation + DynObj.setValueOpt this (nameof comment) comment + DynObj.setValueOpt this (nameof creator) creator + DynObj.setValueOpt this (nameof dateCreated) dateCreated + DynObj.setValueOpt this (nameof dateModified) dateModified + DynObj.setValueOpt this (nameof datePublished) datePublished + DynObj.setValueOpt this (nameof hasPart) hasPart + DynObj.setValueOpt this (nameof headline) headline + DynObj.setValueOpt this (nameof mentions) mentions + DynObj.setValueOpt this (nameof url) url + DynObj.setValueOpt this (nameof description) description + + member this.GetIdentifier() = DynObj.tryGetTypedValue (nameof identifier) this |> Option.get + 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..168558fb 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, @@ -24,7 +24,19 @@ type LabProcess( 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.setValueOpt this (nameof executesLabProtocol) executesLabProtocol + DynObj.setValueOpt this (nameof parameterValue) parameterValue + DynObj.setValueOpt this (nameof endTime) endTime + DynObj.setValueOpt this (nameof disambiguatingDescription) disambiguatingDescription + + member this.GetName() = DynObj.tryGetValue this (nameof name) |> Option.get + static member getName = fun (lp: LabProcess) -> lp.GetName() + + member this.GetAgent() = DynObj.tryGetTypedValue (nameof agent) this |> Option.get + static member getAgent = fun (lp: LabProcess) -> lp.GetAgent() + + member this.GetObject() = DynObj.tryGetTypedValue (nameof object) this |> Option.get + static member getObject = fun (lp: LabProcess) -> lp.GetObject() + + member this.GetResult() = DynObj.tryGetTypedValue (nameof result) this |> Option.get + static member getResult = fun (lp: LabProcess) -> lp.GetResult() diff --git a/src/ROCrate/ISAProfile/Study.fs b/src/ROCrate/ISAProfile/Study.fs index d2463da7..bf1c8f27 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, @@ -36,3 +36,5 @@ type Study( DynObj.setOptionalProperty (nameof headline) headline this DynObj.setOptionalProperty (nameof url) url this + member this.GetIdentifier() = DynObj.tryGetTypedValue (nameof identifier) this |> Option.get + static member getIdentifier = fun (inv: Investigation) -> inv.GetIdentifier() diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs index 9e3cb8f5..aee848d6 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/ROCrateObject.fs @@ -44,15 +44,14 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = member this.SetContext (context: #DynamicObj) = this.SetValue("@context", context) - static member setContext (context: #DynamicObj) = - fun (roc: #ROCrateObject) -> roc.SetContext(context) + static member setContext (context: #DynamicObj) = fun (roc: #ROCrateObject) -> roc.SetContext(context) member this.TryGetContext() = DynObj.tryGetTypedValue("@context") this - static member tryGetContext (roc: #ROCrateObject) = roc.TryGetContext() + static member tryGetContext () = fun (roc: #ROCrateObject) -> roc.TryGetContext() member this.RemoveContext() = this.Remove("@context") - static member removeContext (roc: #ROCrateObject) = roc.RemoveContext() \ No newline at end of file + static member removeContext () = fun (roc: #ROCrateObject) -> roc.RemoveContext() \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Assay.Tests.fs b/tests/ROCrate/ISAProfile/Assay.Tests.fs index 6dbf61ff..181436cb 100644 --- a/tests/ROCrate/ISAProfile/Assay.Tests.fs +++ b/tests/ROCrate/ISAProfile/Assay.Tests.fs @@ -92,10 +92,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Data.Tests.fs b/tests/ROCrate/ISAProfile/Data.Tests.fs index 93280fe9..de9e0c3b 100644 --- a/tests/ROCrate/ISAProfile/Data.Tests.fs +++ b/tests/ROCrate/ISAProfile/Data.Tests.fs @@ -82,10 +82,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Dataset.Tests.fs b/tests/ROCrate/ISAProfile/Dataset.Tests.fs index 79a955d7..8dd691b3 100644 --- a/tests/ROCrate/ISAProfile/Dataset.Tests.fs +++ b/tests/ROCrate/ISAProfile/Dataset.Tests.fs @@ -66,10 +66,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Investigation.Tests.fs b/tests/ROCrate/ISAProfile/Investigation.Tests.fs index 66749a47..c45328ac 100644 --- a/tests/ROCrate/ISAProfile/Investigation.Tests.fs +++ b/tests/ROCrate/ISAProfile/Investigation.Tests.fs @@ -98,10 +98,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProcess.tests.fs b/tests/ROCrate/ISAProfile/LabProcess.tests.fs index 9774e04c..431d95ef 100644 --- a/tests/ROCrate/ISAProfile/LabProcess.tests.fs +++ b/tests/ROCrate/ISAProfile/LabProcess.tests.fs @@ -97,10 +97,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs index efb84eb9..89f3bd12 100644 --- a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs +++ b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs @@ -90,10 +90,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Person.Tests.fs b/tests/ROCrate/ISAProfile/Person.Tests.fs index 46e3fb6f..a35b0f9f 100644 --- a/tests/ROCrate/ISAProfile/Person.Tests.fs +++ b/tests/ROCrate/ISAProfile/Person.Tests.fs @@ -96,10 +96,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs index 568e3549..feb42dd4 100644 --- a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs +++ b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs @@ -88,10 +88,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Sample.tests.fs b/tests/ROCrate/ISAProfile/Sample.tests.fs index ca5083a0..9669d5d0 100644 --- a/tests/ROCrate/ISAProfile/Sample.tests.fs +++ b/tests/ROCrate/ISAProfile/Sample.tests.fs @@ -80,10 +80,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs index c90f2363..4f464e08 100644 --- a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs +++ b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs @@ -88,10 +88,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Study.Tests.fs b/tests/ROCrate/ISAProfile/Study.Tests.fs index 0d40bc43..0f73eb22 100644 --- a/tests/ROCrate/ISAProfile/Study.Tests.fs +++ b/tests/ROCrate/ISAProfile/Study.Tests.fs @@ -98,10 +98,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ROCrateObject.Tests.fs b/tests/ROCrate/ROCrateObject.Tests.fs index a0747e11..6f3dc820 100644 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ b/tests/ROCrate/ROCrateObject.Tests.fs @@ -66,10 +66,10 @@ let tests_static_methods = testSequenced ( ROCrateObject.setContext context mandatory_properties Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext mandatory_properties + let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext mandatory_properties + ROCrateObject.removeContext() mandatory_properties Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" ] ) From 55d360fff020aab8ec9b81a74ef8bdb0e8a67629 Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Fri, 18 Oct 2024 10:56:20 +0200 Subject: [PATCH 03/10] fix rebase conflicts, update to DynObj v4.0.3, remove Directory.Build.props --- ARCtrl.sln | 1 - Directory.Build.props | 20 - Directory.Packages.props | 2 +- src/ARCtrl/packages.lock.json | 165 ----- src/CWL/packages.lock.json | 27 - src/Contract/packages.lock.json | 134 ---- src/Core/packages.lock.json | 42 -- src/FileSystem/packages.lock.json | 33 - src/Json/packages.lock.json | 83 --- src/ROCrate/ISAProfile/Assay.fs | 18 +- src/ROCrate/ISAProfile/Investigation.fs | 24 +- src/ROCrate/ISAProfile/LabProcess.fs | 16 +- src/ROCrate/ISAProfile/Study.fs | 3 +- src/ROCrate/ROCrateObject.fs | 6 +- src/ROCrate/packages.lock.json | 60 -- src/Spreadsheet/packages.lock.json | 77 --- src/ValidationPackages/packages.lock.json | 49 -- src/Yaml/packages.lock.json | 71 --- tests/ARCtrl/packages.lock.json | 255 -------- tests/Contract/packages.lock.json | 255 -------- tests/Core/packages.lock.json | 255 -------- tests/FileSystem/packages.lock.json | 255 -------- tests/Json/packages.lock.json | 575 ------------------ tests/ROCrate/ISAProfile/Assay.Tests.fs | 12 +- tests/ROCrate/ISAProfile/Data.Tests.fs | 12 +- tests/ROCrate/ISAProfile/Dataset.Tests.fs | 12 +- .../ROCrate/ISAProfile/Investigation.Tests.fs | 12 +- tests/ROCrate/ISAProfile/LabProcess.tests.fs | 12 +- tests/ROCrate/ISAProfile/LabProtocol.Tests.fs | 12 +- tests/ROCrate/ISAProfile/Person.Tests.fs | 12 +- .../ROCrate/ISAProfile/PropertyValue.Tests.fs | 12 +- tests/ROCrate/ISAProfile/Sample.tests.fs | 12 +- .../ISAProfile/ScholarlyArticle.Tests.fs | 12 +- tests/ROCrate/ISAProfile/Study.Tests.fs | 10 +- tests/ROCrate/ROCrateObject.Tests.fs | 12 +- tests/ROCrate/packages.lock.json | 255 -------- tests/Speedtest/packages.lock.json | 255 -------- tests/Spreadsheet/packages.lock.json | 255 -------- tests/TestingUtils/packages.lock.json | 305 ---------- tests/ValidationPackages/packages.lock.json | 255 -------- tests/Yaml/packages.lock.json | 255 -------- 41 files changed, 105 insertions(+), 4043 deletions(-) delete mode 100644 Directory.Build.props delete mode 100644 src/ARCtrl/packages.lock.json delete mode 100644 src/CWL/packages.lock.json delete mode 100644 src/Contract/packages.lock.json delete mode 100644 src/Core/packages.lock.json delete mode 100644 src/FileSystem/packages.lock.json delete mode 100644 src/Json/packages.lock.json delete mode 100644 src/ROCrate/packages.lock.json delete mode 100644 src/Spreadsheet/packages.lock.json delete mode 100644 src/ValidationPackages/packages.lock.json delete mode 100644 src/Yaml/packages.lock.json delete mode 100644 tests/ARCtrl/packages.lock.json delete mode 100644 tests/Contract/packages.lock.json delete mode 100644 tests/Core/packages.lock.json delete mode 100644 tests/FileSystem/packages.lock.json delete mode 100644 tests/Json/packages.lock.json delete mode 100644 tests/ROCrate/packages.lock.json delete mode 100644 tests/Speedtest/packages.lock.json delete mode 100644 tests/Spreadsheet/packages.lock.json delete mode 100644 tests/TestingUtils/packages.lock.json delete mode 100644 tests/ValidationPackages/packages.lock.json delete mode 100644 tests/Yaml/packages.lock.json 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/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/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/ISAProfile/Assay.fs b/src/ROCrate/ISAProfile/Assay.fs index b1148a01..4e0e7d79 100644 --- a/src/ROCrate/ISAProfile/Assay.fs +++ b/src/ROCrate/ISAProfile/Assay.fs @@ -21,14 +21,14 @@ type Assay( do DynObj.setProperty (nameof identifier) identifier this - DynObj.setValueOpt this (nameof measurementMethod) measurementMethod - DynObj.setValueOpt this (nameof measurementTechnique) measurementTechnique - DynObj.setValueOpt this (nameof variableMeasured) variableMeasured - DynObj.setValueOpt this (nameof about) about - DynObj.setValueOpt this (nameof comment) comment - DynObj.setValueOpt this (nameof creator) creator - DynObj.setValueOpt this (nameof hasPart) hasPart - DynObj.setValueOpt this (nameof url) url + 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.tryGetTypedValue (nameof identifier) this |> Option.get + member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get static member getIdentifier = fun (ass: Assay) -> ass.GetIdentifier() \ No newline at end of file diff --git a/src/ROCrate/ISAProfile/Investigation.fs b/src/ROCrate/ISAProfile/Investigation.fs index ed466d03..cfa52ea6 100644 --- a/src/ROCrate/ISAProfile/Investigation.fs +++ b/src/ROCrate/ISAProfile/Investigation.fs @@ -24,17 +24,17 @@ type Investigation( do DynObj.setProperty (nameof identifier) identifier this - DynObj.setValueOpt this (nameof citation) citation - DynObj.setValueOpt this (nameof comment) comment - DynObj.setValueOpt this (nameof creator) creator - DynObj.setValueOpt this (nameof dateCreated) dateCreated - DynObj.setValueOpt this (nameof dateModified) dateModified - DynObj.setValueOpt this (nameof datePublished) datePublished - DynObj.setValueOpt this (nameof hasPart) hasPart - DynObj.setValueOpt this (nameof headline) headline - DynObj.setValueOpt this (nameof mentions) mentions - DynObj.setValueOpt this (nameof url) url - DynObj.setValueOpt this (nameof description) description + 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.tryGetTypedValue (nameof identifier) this |> Option.get + member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get 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 168558fb..3f0f997f 100644 --- a/src/ROCrate/ISAProfile/LabProcess.fs +++ b/src/ROCrate/ISAProfile/LabProcess.fs @@ -24,19 +24,19 @@ type LabProcess( DynObj.setProperty (nameof object) object this DynObj.setProperty (nameof result) result this - DynObj.setValueOpt this (nameof executesLabProtocol) executesLabProtocol - DynObj.setValueOpt this (nameof parameterValue) parameterValue - DynObj.setValueOpt this (nameof endTime) endTime - DynObj.setValueOpt this (nameof disambiguatingDescription) disambiguatingDescription + 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.tryGetValue this (nameof name) |> Option.get + member this.GetName() = DynObj.tryGetPropertyValue (nameof name) this |> Option.get static member getName = fun (lp: LabProcess) -> lp.GetName() - member this.GetAgent() = DynObj.tryGetTypedValue (nameof agent) this |> Option.get + member this.GetAgent() = DynObj.tryGetTypedPropertyValue (nameof agent) this |> Option.get static member getAgent = fun (lp: LabProcess) -> lp.GetAgent() - member this.GetObject() = DynObj.tryGetTypedValue (nameof object) this |> Option.get + member this.GetObject() = DynObj.tryGetTypedPropertyValue (nameof object) this |> Option.get static member getObject = fun (lp: LabProcess) -> lp.GetObject() - member this.GetResult() = DynObj.tryGetTypedValue (nameof result) this |> Option.get + member this.GetResult() = DynObj.tryGetTypedPropertyValue (nameof result) this |> Option.get static member getResult = fun (lp: LabProcess) -> lp.GetResult() diff --git a/src/ROCrate/ISAProfile/Study.fs b/src/ROCrate/ISAProfile/Study.fs index bf1c8f27..4ac95d42 100644 --- a/src/ROCrate/ISAProfile/Study.fs +++ b/src/ROCrate/ISAProfile/Study.fs @@ -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,5 +35,5 @@ type Study( DynObj.setOptionalProperty (nameof headline) headline this DynObj.setOptionalProperty (nameof url) url this - member this.GetIdentifier() = DynObj.tryGetTypedValue (nameof identifier) this |> Option.get + member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get static member getIdentifier = fun (inv: Investigation) -> inv.GetIdentifier() diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs index aee848d6..434a01da 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/ROCrateObject.fs @@ -42,16 +42,16 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = and set(value) = _additionalType <- value member this.SetContext (context: #DynamicObj) = - this.SetValue("@context", context) + this.SetProperty("@context", context) static member setContext (context: #DynamicObj) = fun (roc: #ROCrateObject) -> roc.SetContext(context) member this.TryGetContext() = - DynObj.tryGetTypedValue("@context") this + DynObj.tryGetTypedPropertyValue("@context") this static member tryGetContext () = fun (roc: #ROCrateObject) -> roc.TryGetContext() member this.RemoveContext() = - this.Remove("@context") + this.RemoveProperty("@context") static member removeContext () = fun (roc: #ROCrateObject) -> roc.RemoveContext() \ 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/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/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/ISAProfile/Assay.Tests.fs b/tests/ROCrate/ISAProfile/Assay.Tests.fs index 181436cb..56d7049b 100644 --- a/tests/ROCrate/ISAProfile/Assay.Tests.fs +++ b/tests/ROCrate/ISAProfile/Assay.Tests.fs @@ -68,7 +68,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -77,8 +77,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -86,7 +86,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -95,8 +95,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Data.Tests.fs b/tests/ROCrate/ISAProfile/Data.Tests.fs index de9e0c3b..8ce21863 100644 --- a/tests/ROCrate/ISAProfile/Data.Tests.fs +++ b/tests/ROCrate/ISAProfile/Data.Tests.fs @@ -58,7 +58,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -67,8 +67,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -76,7 +76,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -85,8 +85,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Dataset.Tests.fs b/tests/ROCrate/ISAProfile/Dataset.Tests.fs index 8dd691b3..609afb29 100644 --- a/tests/ROCrate/ISAProfile/Dataset.Tests.fs +++ b/tests/ROCrate/ISAProfile/Dataset.Tests.fs @@ -42,7 +42,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -51,8 +51,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -60,7 +60,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -69,8 +69,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Investigation.Tests.fs b/tests/ROCrate/ISAProfile/Investigation.Tests.fs index c45328ac..f0eba0bf 100644 --- a/tests/ROCrate/ISAProfile/Investigation.Tests.fs +++ b/tests/ROCrate/ISAProfile/Investigation.Tests.fs @@ -74,7 +74,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -83,8 +83,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -92,7 +92,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -101,8 +101,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProcess.tests.fs b/tests/ROCrate/ISAProfile/LabProcess.tests.fs index 431d95ef..3964ca32 100644 --- a/tests/ROCrate/ISAProfile/LabProcess.tests.fs +++ b/tests/ROCrate/ISAProfile/LabProcess.tests.fs @@ -73,7 +73,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -82,8 +82,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -91,7 +91,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -100,8 +100,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs index 89f3bd12..6c17cea3 100644 --- a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs +++ b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs @@ -66,7 +66,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -75,8 +75,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -84,7 +84,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -93,8 +93,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Person.Tests.fs b/tests/ROCrate/ISAProfile/Person.Tests.fs index a35b0f9f..7776daaf 100644 --- a/tests/ROCrate/ISAProfile/Person.Tests.fs +++ b/tests/ROCrate/ISAProfile/Person.Tests.fs @@ -72,7 +72,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -81,8 +81,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -90,7 +90,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -99,8 +99,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs index feb42dd4..8f26755e 100644 --- a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs +++ b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs @@ -64,7 +64,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -73,8 +73,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -82,7 +82,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -91,8 +91,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Sample.tests.fs b/tests/ROCrate/ISAProfile/Sample.tests.fs index 9669d5d0..3256c343 100644 --- a/tests/ROCrate/ISAProfile/Sample.tests.fs +++ b/tests/ROCrate/ISAProfile/Sample.tests.fs @@ -56,7 +56,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -65,8 +65,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -74,7 +74,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -83,8 +83,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs index 4f464e08..6cadb92b 100644 --- a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs +++ b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs @@ -64,7 +64,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -73,8 +73,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -82,7 +82,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -91,8 +91,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Study.Tests.fs b/tests/ROCrate/ISAProfile/Study.Tests.fs index 0f73eb22..741772fd 100644 --- a/tests/ROCrate/ISAProfile/Study.Tests.fs +++ b/tests/ROCrate/ISAProfile/Study.Tests.fs @@ -74,7 +74,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -83,8 +83,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -92,7 +92,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -102,7 +102,7 @@ let tests_static_methods = testSequenced ( Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ROCrateObject.Tests.fs b/tests/ROCrate/ROCrateObject.Tests.fs index 6f3dc820..b50bdfc7 100644 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ b/tests/ROCrate/ROCrateObject.Tests.fs @@ -42,7 +42,7 @@ let tests_instance_methods = testSequenced ( testList "instance methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> mandatory_properties.SetContext context @@ -51,8 +51,8 @@ let tests_instance_methods = testSequenced ( let ctx = mandatory_properties.TryGetContext() Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - mandatory_properties.RemoveContext() - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + mandatory_properties.RemoveContext() |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) @@ -60,7 +60,7 @@ let tests_static_methods = testSequenced ( testList "static methods" [ let context = new DynamicObj() - context.SetValue("more", "context") + context.SetProperty("more", "context") testCase "can set context" <| fun _ -> ROCrateObject.setContext context mandatory_properties @@ -69,8 +69,8 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties - Expect.isNone (DynObj.tryGetTypedValue "@context" mandatory_properties) "context was not removed correctly" + ROCrateObject.removeContext() mandatory_properties |> ignore + Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) 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/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 From 00c1ca7d49c70cab98deec118bd75dcef6ac20df Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Fri, 18 Oct 2024 13:28:54 +0200 Subject: [PATCH 04/10] add requested changes, add at least some tests --- src/ROCrate/ARCtrl.ROCrate.fsproj | 1 + src/ROCrate/DynObjExtensions.fs | 15 +++++++++++ src/ROCrate/ISAProfile/Assay.fs | 2 +- src/ROCrate/ISAProfile/Data.fs | 2 ++ src/ROCrate/ISAProfile/Investigation.fs | 2 +- src/ROCrate/ISAProfile/LabProcess.fs | 8 +++--- src/ROCrate/ISAProfile/Person.fs | 3 +++ src/ROCrate/ISAProfile/PropertyValue.fs | 6 +++++ src/ROCrate/ISAProfile/Sample.fs | 3 +++ src/ROCrate/ISAProfile/ScholarlyArticle.fs | 8 +++++- src/ROCrate/ISAProfile/Study.fs | 2 +- src/ROCrate/ROCrateObject.fs | 14 +++++------ tests/ROCrate/ISAProfile/Assay.Tests.fs | 23 +++++++++++++++-- tests/ROCrate/ISAProfile/Data.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Dataset.Tests.fs | 4 +-- .../ROCrate/ISAProfile/Investigation.Tests.fs | 23 +++++++++++++++-- tests/ROCrate/ISAProfile/LabProcess.tests.fs | 4 +-- tests/ROCrate/ISAProfile/LabProtocol.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Person.Tests.fs | 4 +-- .../ROCrate/ISAProfile/PropertyValue.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Sample.tests.fs | 4 +-- .../ISAProfile/ScholarlyArticle.Tests.fs | 4 +-- tests/ROCrate/ISAProfile/Study.Tests.fs | 25 ++++++++++++++++--- tests/ROCrate/ROCrateObject.Tests.fs | 4 +-- 24 files changed, 133 insertions(+), 40 deletions(-) create mode 100644 src/ROCrate/DynObjExtensions.fs diff --git a/src/ROCrate/ARCtrl.ROCrate.fsproj b/src/ROCrate/ARCtrl.ROCrate.fsproj index 45acca92..2d9e74d7 100644 --- a/src/ROCrate/ARCtrl.ROCrate.fsproj +++ b/src/ROCrate/ARCtrl.ROCrate.fsproj @@ -7,6 +7,7 @@ + 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 4e0e7d79..5532ada4 100644 --- a/src/ROCrate/ISAProfile/Assay.fs +++ b/src/ROCrate/ISAProfile/Assay.fs @@ -30,5 +30,5 @@ type Assay( DynObj.setOptionalProperty (nameof hasPart) hasPart this DynObj.setOptionalProperty (nameof url) url this - member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get + 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..f31dccd0 100644 --- a/src/ROCrate/ISAProfile/Data.fs +++ b/src/ROCrate/ISAProfile/Data.fs @@ -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/Investigation.fs b/src/ROCrate/ISAProfile/Investigation.fs index cfa52ea6..8e08aff7 100644 --- a/src/ROCrate/ISAProfile/Investigation.fs +++ b/src/ROCrate/ISAProfile/Investigation.fs @@ -36,5 +36,5 @@ type Investigation( DynObj.setOptionalProperty (nameof url) url this DynObj.setOptionalProperty (nameof description) description this - member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get + 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 3f0f997f..6b49e5fa 100644 --- a/src/ROCrate/ISAProfile/LabProcess.fs +++ b/src/ROCrate/ISAProfile/LabProcess.fs @@ -29,14 +29,14 @@ type LabProcess( DynObj.setOptionalProperty (nameof endTime) endTime this DynObj.setOptionalProperty (nameof disambiguatingDescription) disambiguatingDescription this - member this.GetName() = DynObj.tryGetPropertyValue (nameof name) this |> Option.get + member this.GetName() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof name) this static member getName = fun (lp: LabProcess) -> lp.GetName() - member this.GetAgent() = DynObj.tryGetTypedPropertyValue (nameof agent) this |> Option.get + member this.GetAgent() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof agent) this static member getAgent = fun (lp: LabProcess) -> lp.GetAgent() - member this.GetObject() = DynObj.tryGetTypedPropertyValue (nameof object) this |> Option.get + member this.GetObject() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof object) this static member getObject = fun (lp: LabProcess) -> lp.GetObject() - member this.GetResult() = DynObj.tryGetTypedPropertyValue (nameof result) this |> Option.get + member this.GetResult() = DynObj.getMandatoryDynamicPropertyOrThrow "LabProcess" (nameof result) this static member getResult = fun (lp: LabProcess) -> lp.GetResult() diff --git a/src/ROCrate/ISAProfile/Person.fs b/src/ROCrate/ISAProfile/Person.fs index baabb839..29fb0378 100644 --- a/src/ROCrate/ISAProfile/Person.fs +++ b/src/ROCrate/ISAProfile/Person.fs @@ -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..47454f46 100644 --- a/src/ROCrate/ISAProfile/PropertyValue.fs +++ b/src/ROCrate/ISAProfile/PropertyValue.fs @@ -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..0319de98 100644 --- a/src/ROCrate/ISAProfile/Sample.fs +++ b/src/ROCrate/ISAProfile/Sample.fs @@ -18,3 +18,6 @@ type Sample( 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..c1359b20 100644 --- a/src/ROCrate/ISAProfile/ScholarlyArticle.fs +++ b/src/ROCrate/ISAProfile/ScholarlyArticle.fs @@ -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 4ac95d42..41bbd82e 100644 --- a/src/ROCrate/ISAProfile/Study.fs +++ b/src/ROCrate/ISAProfile/Study.fs @@ -35,5 +35,5 @@ type Study( DynObj.setOptionalProperty (nameof headline) headline this DynObj.setOptionalProperty (nameof url) url this - member this.GetIdentifier() = DynObj.tryGetTypedPropertyValue (nameof identifier) this |> Option.get + member this.GetIdentifier() = DynObj.getMandatoryDynamicPropertyOrThrow "Study" (nameof identifier) this static member getIdentifier = fun (inv: Investigation) -> inv.GetIdentifier() diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs index 434a01da..ebfeec35 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/ROCrateObject.fs @@ -4,6 +4,8 @@ open DynamicObj open Thoth.Json.Core open System +type LDContext() = inherit DynamicObj() + /// Base interface implemented by all explicitly known objects in our ROCrate profiles. type IROCrateObject = abstract member SchemaType : string with get, set @@ -41,17 +43,15 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = with get() = _additionalType and set(value) = _additionalType <- value - member this.SetContext (context: #DynamicObj) = + member this.SetContext (context: LDContext) = this.SetProperty("@context", context) - static member setContext (context: #DynamicObj) = fun (roc: #ROCrateObject) -> roc.SetContext(context) + static member setContext (context: LDContext) = fun (roc: #ROCrateObject) -> roc.SetContext(context) - member this.TryGetContext() = - DynObj.tryGetTypedPropertyValue("@context") this + member this.TryGetContext() = DynObj.tryGetTypedPropertyValue("@context") this static member tryGetContext () = fun (roc: #ROCrateObject) -> roc.TryGetContext() - member this.RemoveContext() = - this.RemoveProperty("@context") + member this.RemoveContext() = this.RemoveProperty("@context") - static member removeContext () = fun (roc: #ROCrateObject) -> roc.RemoveContext() \ No newline at end of file + static member removeContext () = fun (roc: #ROCrateObject) -> roc.RemoveContext() \ No newline at end of file diff --git a/tests/ROCrate/ISAProfile/Assay.Tests.fs b/tests/ROCrate/ISAProfile/Assay.Tests.fs index 56d7049b..5bff5cf8 100644 --- a/tests/ROCrate/ISAProfile/Assay.Tests.fs +++ b/tests/ROCrate/ISAProfile/Assay.Tests.fs @@ -67,7 +67,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -79,13 +79,32 @@ let tests_instance_methods = testSequenced ( 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 DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Data.Tests.fs b/tests/ROCrate/ISAProfile/Data.Tests.fs index 8ce21863..7f4d25a4 100644 --- a/tests/ROCrate/ISAProfile/Data.Tests.fs +++ b/tests/ROCrate/ISAProfile/Data.Tests.fs @@ -57,7 +57,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -75,7 +75,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Dataset.Tests.fs b/tests/ROCrate/ISAProfile/Dataset.Tests.fs index 609afb29..a8bfaee3 100644 --- a/tests/ROCrate/ISAProfile/Dataset.Tests.fs +++ b/tests/ROCrate/ISAProfile/Dataset.Tests.fs @@ -41,7 +41,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -59,7 +59,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Investigation.Tests.fs b/tests/ROCrate/ISAProfile/Investigation.Tests.fs index f0eba0bf..b85ee704 100644 --- a/tests/ROCrate/ISAProfile/Investigation.Tests.fs +++ b/tests/ROCrate/ISAProfile/Investigation.Tests.fs @@ -73,7 +73,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -85,13 +85,32 @@ let tests_instance_methods = testSequenced ( 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 DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/LabProcess.tests.fs b/tests/ROCrate/ISAProfile/LabProcess.tests.fs index 3964ca32..c1d8fe17 100644 --- a/tests/ROCrate/ISAProfile/LabProcess.tests.fs +++ b/tests/ROCrate/ISAProfile/LabProcess.tests.fs @@ -72,7 +72,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -90,7 +90,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs index 6c17cea3..debfc77b 100644 --- a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs +++ b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs @@ -65,7 +65,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -83,7 +83,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Person.Tests.fs b/tests/ROCrate/ISAProfile/Person.Tests.fs index 7776daaf..1f32f046 100644 --- a/tests/ROCrate/ISAProfile/Person.Tests.fs +++ b/tests/ROCrate/ISAProfile/Person.Tests.fs @@ -71,7 +71,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -89,7 +89,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs index 8f26755e..210be90e 100644 --- a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs +++ b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs @@ -63,7 +63,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -81,7 +81,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Sample.tests.fs b/tests/ROCrate/ISAProfile/Sample.tests.fs index 3256c343..a4f6b142 100644 --- a/tests/ROCrate/ISAProfile/Sample.tests.fs +++ b/tests/ROCrate/ISAProfile/Sample.tests.fs @@ -55,7 +55,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -73,7 +73,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs index 6cadb92b..82fc2edb 100644 --- a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs +++ b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs @@ -63,7 +63,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -81,7 +81,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> diff --git a/tests/ROCrate/ISAProfile/Study.Tests.fs b/tests/ROCrate/ISAProfile/Study.Tests.fs index 741772fd..00a522dd 100644 --- a/tests/ROCrate/ISAProfile/Study.Tests.fs +++ b/tests/ROCrate/ISAProfile/Study.Tests.fs @@ -73,7 +73,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -85,13 +85,32 @@ let tests_instance_methods = testSequenced ( 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 DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -101,7 +120,7 @@ let tests_static_methods = testSequenced ( let ctx = ROCrateObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties + ROCrateObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ROCrateObject.Tests.fs b/tests/ROCrate/ROCrateObject.Tests.fs index b50bdfc7..27222bc5 100644 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ b/tests/ROCrate/ROCrateObject.Tests.fs @@ -41,7 +41,7 @@ let tests_dynamic_members = testSequenced ( let tests_instance_methods = testSequenced ( testList "instance methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> @@ -59,7 +59,7 @@ let tests_instance_methods = testSequenced ( let tests_static_methods = testSequenced ( testList "static methods" [ - let context = new DynamicObj() + let context = new LDContext() context.SetProperty("more", "context") testCase "can set context" <| fun _ -> From d35c76a83596ddf0df924dbae12e0e98675a5124 Mon Sep 17 00:00:00 2001 From: HLWeil Date: Fri, 11 Oct 2024 12:54:57 +0200 Subject: [PATCH 05/10] start working in potential typed ro-crate-json parser --- src/Json/ROCrateObject.fs | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/Json/ROCrateObject.fs b/src/Json/ROCrateObject.fs index 3d128634..db8f5e05 100644 --- a/src/Json/ROCrateObject.fs +++ b/src/Json/ROCrateObject.fs @@ -53,7 +53,7 @@ module rec ROCrateObject = |> Encode.object - let rec decoder : Decoder = + let rec decoderWith (constructorByTypeFunc : string -> (string -> string -> string option -> #ROCrateObject)) : Decoder = let rec decode() = let decodeObject : Decoder = { new Decoder with @@ -63,10 +63,11 @@ module rec ROCrateObject = 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 additionalType = get.Optional.Field "@additionalType" Decode.string + let f = constructorByTypeFunc t + let o = f t id additionalType :> ROCrateObject for property in properties do if property <> "@id" && property <> "@type" then o.SetProperty(property,get.Required.Field property (decode())) @@ -120,4 +121,15 @@ module rec ROCrateObject = Decode.map box (Decode.decimal) ] - decode() \ No newline at end of file + decode() + + let untypedDecoder = decoderWith (fun _ -> + fun id t additionalType -> ROCrateObject(id,t,?additionalType = additionalType) + ) + + let typings : (string*(string->string->string option->#ROCrateObject)) list= + [ + ROCrate.Assay + + + ] From 9f9b9c7119a5d0eedc97b8c6a8f6543fcd13064f Mon Sep 17 00:00:00 2001 From: HLWeil Date: Thu, 17 Oct 2024 16:21:54 +0200 Subject: [PATCH 06/10] finish up first version of ROCrateObject serialization --- src/ARCtrl/JsonIO/ROCrateObject.fs | 124 +++-------------------------- src/Json/ROCrateObject.fs | 44 +++++----- 2 files changed, 33 insertions(+), 135 deletions(-) diff --git a/src/ARCtrl/JsonIO/ROCrateObject.fs b/src/ARCtrl/JsonIO/ROCrateObject.fs index 3d128634..3bdd08d5 100644 --- a/src/ARCtrl/JsonIO/ROCrateObject.fs +++ b/src/ARCtrl/JsonIO/ROCrateObject.fs @@ -1,123 +1,25 @@ namespace ARCtrl.Json open ARCtrl +open ARCtrl.ROCrate 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 - +[] +module ROCrateObjectExtensions = - 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() + type ROCrateObject with - (Ok arr, tokens) - ||> Array.fold (fun acc value -> - i <- i + 1 + static member fromROCrateJsonString (s:string) = + Decode.fromJsonString ROCrateObject.decoder s - 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) + /// exports in json-ld format + static member toROCrateJsonString(?spaces) = + fun (obj:ROCrateObject) -> + ROCrateObject.encoder obj + |> Encode.toJsonString (Encode.defaultSpaces spaces) - ] - decode() \ No newline at end of file + member this.ToROCrateJsonString(?spaces) = + ROCrateObject.toROCrateJsonString(?spaces=spaces) this \ No newline at end of file diff --git a/src/Json/ROCrateObject.fs b/src/Json/ROCrateObject.fs index db8f5e05..e6db7fed 100644 --- a/src/Json/ROCrateObject.fs +++ b/src/Json/ROCrateObject.fs @@ -52,9 +52,11 @@ module rec ROCrateObject = ) |> Encode.object - - let rec decoderWith (constructorByTypeFunc : string -> (string -> string -> string option -> #ROCrateObject)) : Decoder = - let rec decode() = + /// 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) = @@ -65,12 +67,10 @@ module rec ROCrateObject = fun (get : Decode.IGetters) -> let t = get.Required.Field "@type" Decode.string let id = get.Required.Field "@id" Decode.string - let additionalType = get.Optional.Field "@additionalType" Decode.string - let f = constructorByTypeFunc t - let o = f t id additionalType :> ROCrateObject + let o = ROCrateObject(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 @@ -98,7 +98,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 @@ -113,23 +113,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) - - ] - decode() - - let untypedDecoder = decoderWith (fun _ -> - fun id t additionalType -> ROCrateObject(id,t,?additionalType = additionalType) - ) + 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) - let typings : (string*(string->string->string option->#ROCrateObject)) list= - [ - ROCrate.Assay + ] + decode(expectObject) + let decoder : Decoder = Decode.map unbox (getDecoder(true)) - ] + let genericDecoder : Decoder = getDecoder(false) From d9fbb33f95e46e3d505e3c1d6404b437c592bf36 Mon Sep 17 00:00:00 2001 From: HLWeil Date: Thu, 17 Oct 2024 16:22:19 +0200 Subject: [PATCH 07/10] add ROCrateObject decoder tests --- tests/Json/ARCtrl.Json.Tests.fsproj | 1 + tests/Json/Main.fs | 1 + tests/Json/ROCrateObject.Tests.fs | 82 +++++++++++++++++++ .../TestingUtils/TestObjects.Json/ROCrate.fs | 64 ++++++++++++++- 4 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 tests/Json/ROCrateObject.Tests.fs diff --git a/tests/Json/ARCtrl.Json.Tests.fsproj b/tests/Json/ARCtrl.Json.Tests.fsproj index 4a4db2d8..18821623 100644 --- a/tests/Json/ARCtrl.Json.Tests.fsproj +++ b/tests/Json/ARCtrl.Json.Tests.fsproj @@ -33,6 +33,7 @@ + diff --git a/tests/Json/Main.fs b/tests/Json/Main.fs index f41e6665..82e64fa2 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.ROCrateObject.main Tests.SchemaValidation.main ] diff --git a/tests/Json/ROCrateObject.Tests.fs b/tests/Json/ROCrateObject.Tests.fs new file mode 100644 index 00000000..6f7eb427 --- /dev/null +++ b/tests/Json/ROCrateObject.Tests.fs @@ -0,0 +1,82 @@ +module Tests.ROCrateObject + +open TestingUtils +open TestObjects.Json.ROCrate +open ARCtrl +open ARCtrl.ROCrate +open ARCtrl.Json +open DynamicObj + +let private test_read = testList "Read" [ + ftestCase "onlyIDAndType" <| fun _ -> + let json = ROCrateObject.fromROCrateJsonString(GenericObjects.onlyIDAndType) + Expect.equal json.Id "MyIdentifier" "id was not parsed correctly" + Expect.equal json.SchemaType "MyType" "type was not parsed correctly" + ftestCase "onlyID" <| fun _ -> + let f = fun _ -> ROCrateObject.fromROCrateJsonString(GenericObjects.onlyID) |> ignore + Expect.throws f "Should fail if Type is missing" + ftestCase "onlyType" <| fun _ -> + let f = fun _ -> ROCrateObject.fromROCrateJsonString(GenericObjects.onlyType) |> ignore + Expect.throws f "Should fail if ID is missing" + ftestCase "withStringFields" <| fun _ -> + let json = ROCrateObject.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" + ftestCase "withIntFields" <| fun _ -> + let json = ROCrateObject.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" + ftestCase "withStringArray" <| fun _ -> + let json = ROCrateObject.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" + ftestCase "withNestedObject" <| fun _ -> + let json = ROCrateObject.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" + ftestCase "withObjectArray" <| fun _ -> + let json = ROCrateObject.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] :?> ROCrateObject + 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] :?> ROCrateObject + Expect.equal o2.Id "MyIdentifier" "Second nested id was not parsed correctly" + Expect.equal o2.SchemaType "MyType" "Second nested type was not parsed correctly" + ftestCase "withMixedArray" <| fun _ -> + let json = ROCrateObject.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] :?> ROCrateObject + 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 main = testList "ROCrateObject" [ + test_read +] \ 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 From 96231bce5763421edde1d6dd0600ad35410956a9 Mon Sep 17 00:00:00 2001 From: HLWeil Date: Thu, 17 Oct 2024 17:25:59 +0200 Subject: [PATCH 08/10] add ROCrateObject writer tests and fix accordingly --- src/Json/ROCrateObject.fs | 15 +++++++++--- tests/Json/ROCrateObject.Tests.fs | 40 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/Json/ROCrateObject.fs b/src/Json/ROCrateObject.fs index e6db7fed..aa7a8988 100644 --- a/src/Json/ROCrateObject.fs +++ b/src/Json/ROCrateObject.fs @@ -46,10 +46,19 @@ module rec ROCrateObject = let rec encoder(obj: ROCrateObject) = obj.GetProperties true - |> Seq.map (fun kv -> - kv.Key, - genericEncoder obj + |> Seq.choose (fun kv -> + if kv.Key <> "Id" && kv.Key <> "SchemaType" && kv.Key <> "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 /// Returns a decoder diff --git a/tests/Json/ROCrateObject.Tests.fs b/tests/Json/ROCrateObject.Tests.fs index 6f7eb427..01ebfc8f 100644 --- a/tests/Json/ROCrateObject.Tests.fs +++ b/tests/Json/ROCrateObject.Tests.fs @@ -74,9 +74,49 @@ let private test_read = testList "Read" [ 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" [ + ftestCase "onlyIDAndType" <| fun _ -> + let json = GenericObjects.onlyIDAndType + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withStringFields" <| fun _ -> + let json = GenericObjects.withStringFields + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withIntFields" <| fun _ -> + let json = GenericObjects.withIntFields + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withStringArray" <| fun _ -> + let json = GenericObjects.withStringArray + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withNestedObject" <| fun _ -> + let json = GenericObjects.withNestedObject + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withObjectArray" <| fun _ -> + let json = GenericObjects.withObjectArray + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ftestCase "withMixedArray" <| fun _ -> + let json = GenericObjects.withMixedArray + let object = ROCrateObject.fromROCrateJsonString(json) + let output = ROCrateObject.toROCrateJsonString() object + Expect.stringEqual output json "Output string is not correct" + ] let main = testList "ROCrateObject" [ test_read + test_write ] \ No newline at end of file From cc77790d27c4466aed5af8b4bd781d8d989b1514 Mon Sep 17 00:00:00 2001 From: Heinrich Lukas Weil Date: Fri, 18 Oct 2024 00:06:44 +0200 Subject: [PATCH 09/10] hotfix ROCrateObject json writer writing internal keys as fields in json --- src/Json/ROCrateObject.fs | 3 ++- src/ROCrate/ROCrateObject.fs | 22 ++++++++++++---------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Json/ROCrateObject.fs b/src/Json/ROCrateObject.fs index aa7a8988..00e6adc2 100644 --- a/src/Json/ROCrateObject.fs +++ b/src/Json/ROCrateObject.fs @@ -47,7 +47,8 @@ module rec ROCrateObject = let rec encoder(obj: ROCrateObject) = obj.GetProperties true |> Seq.choose (fun kv -> - if kv.Key <> "Id" && kv.Key <> "SchemaType" && kv.Key <> "AdditionalType" then + let l = kv.Key.ToLower() + if l <> "id" && l <> "schematype" && l <> "additionaltype" then Some(kv.Key, genericEncoder kv.Value) else None diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/ROCrateObject.fs index ebfeec35..96b6fa84 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/ROCrateObject.fs @@ -2,6 +2,7 @@ namespace ARCtrl.ROCrate open DynamicObj open Thoth.Json.Core +open Fable.Core open System type LDContext() = inherit DynamicObj() @@ -14,34 +15,35 @@ type IROCrateObject = /// 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 + 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 + with get() = schemaType + and set(value) = schemaType <- value member this.AdditionalType - with get() = _additionalType - and set(value) = _additionalType <- value + with get() = additionalType + and set(value) = additionalType <- value interface IROCrateObject with member this.SchemaType - with get() = _schemaType - and set(value) = _schemaType <- value + with get() = schemaType + and set(value) = schemaType <- value member this.Id = id member this.AdditionalType - with get() = _additionalType - and set(value) = _additionalType <- value + with get() = additionalType + and set(value) = additionalType <- value member this.SetContext (context: LDContext) = this.SetProperty("@context", context) From fc2f7d92924b9357bbf000665a50061c2170e636 Mon Sep 17 00:00:00 2001 From: Heinrich Lukas Weil Date: Fri, 18 Oct 2024 14:07:22 +0200 Subject: [PATCH 10/10] rename ROCrateObject to LDObject --- RELEASE_NOTES.md | 8 +- src/ARCtrl/ARCtrl.Common.props | 2 +- src/ARCtrl/ARCtrl.Javascript.fsproj | 2 +- src/ARCtrl/ARCtrl.Python.fsproj | 2 +- src/ARCtrl/ARCtrl.fsproj | 2 +- .../JsonIO/{ROCrateObject.fs => LDObject.fs} | 12 +-- src/Json/ARCtrl.Json.fsproj | 2 +- src/Json/{ROCrateObject.fs => LDObject.fs} | 14 +-- src/ROCrate/ARCtrl.ROCrate.fsproj | 3 +- src/ROCrate/ArcROCrateMetadata.fs | 24 +++++ src/ROCrate/ISAProfile/Data.fs | 2 +- src/ROCrate/ISAProfile/Dataset.fs | 2 +- src/ROCrate/ISAProfile/LabProcess.fs | 2 +- src/ROCrate/ISAProfile/LabProtocol.fs | 2 +- src/ROCrate/ISAProfile/Person.fs | 2 +- src/ROCrate/ISAProfile/PropertyValue.fs | 2 +- src/ROCrate/ISAProfile/Sample.fs | 2 +- src/ROCrate/ISAProfile/ScholarlyArticle.fs | 2 +- src/ROCrate/{ROCrateObject.fs => LDObject.fs} | 14 +-- src/ROCrate/playground.fsx | 10 +-- tests/Json/ARCtrl.Json.Tests.fsproj | 2 +- ...CrateObject.Tests.fs => LDObject.Tests.fs} | 90 +++++++++---------- tests/Json/Main.fs | 2 +- tests/ROCrate/ARCtrl.ROCrate.Tests.fsproj | 2 +- tests/ROCrate/Common.fs | 14 +-- tests/ROCrate/ISAProfile/Assay.Tests.fs | 48 +++++----- tests/ROCrate/ISAProfile/Data.Tests.fs | 36 ++++---- tests/ROCrate/ISAProfile/Dataset.Tests.fs | 26 +++--- .../ROCrate/ISAProfile/Investigation.Tests.fs | 54 +++++------ tests/ROCrate/ISAProfile/LabProcess.tests.fs | 50 +++++------ tests/ROCrate/ISAProfile/LabProtocol.Tests.fs | 44 ++++----- tests/ROCrate/ISAProfile/Person.Tests.fs | 50 +++++------ .../ROCrate/ISAProfile/PropertyValue.Tests.fs | 42 ++++----- tests/ROCrate/ISAProfile/Sample.tests.fs | 34 +++---- .../ISAProfile/ScholarlyArticle.Tests.fs | 42 ++++----- tests/ROCrate/ISAProfile/Study.Tests.fs | 54 +++++------ ...CrateObject.Tests.fs => LDObject.Tests.fs} | 34 +++---- tests/ROCrate/Main.fs | 2 +- 38 files changed, 381 insertions(+), 356 deletions(-) rename src/ARCtrl/JsonIO/{ROCrateObject.fs => LDObject.fs} (60%) rename src/Json/{ROCrateObject.fs => LDObject.fs} (93%) create mode 100644 src/ROCrate/ArcROCrateMetadata.fs rename src/ROCrate/{ROCrateObject.fs => LDObject.fs} (74%) rename tests/Json/{ROCrateObject.Tests.fs => LDObject.Tests.fs} (64%) rename tests/ROCrate/{ROCrateObject.Tests.fs => LDObject.Tests.fs} (59%) 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/ROCrateObject.fs b/src/ARCtrl/JsonIO/LDObject.fs similarity index 60% rename from src/ARCtrl/JsonIO/ROCrateObject.fs rename to src/ARCtrl/JsonIO/LDObject.fs index 3bdd08d5..1a4fe343 100644 --- a/src/ARCtrl/JsonIO/ROCrateObject.fs +++ b/src/ARCtrl/JsonIO/LDObject.fs @@ -8,18 +8,18 @@ open Thoth.Json.Core open DynamicObj [] -module ROCrateObjectExtensions = +module LDObjectExtensions = - type ROCrateObject with + type LDObject with static member fromROCrateJsonString (s:string) = - Decode.fromJsonString ROCrateObject.decoder s + Decode.fromJsonString LDObject.decoder s /// exports in json-ld format static member toROCrateJsonString(?spaces) = - fun (obj:ROCrateObject) -> - ROCrateObject.encoder obj + fun (obj:LDObject) -> + LDObject.encoder obj |> Encode.toJsonString (Encode.defaultSpaces spaces) member this.ToROCrateJsonString(?spaces) = - ROCrateObject.toROCrateJsonString(?spaces=spaces) this \ No newline at end of file + LDObject.toROCrateJsonString(?spaces=spaces) this \ 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 93% rename from src/Json/ROCrateObject.fs rename to src/Json/LDObject.fs index 00e6adc2..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,7 +44,7 @@ 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.choose (fun kv -> let l = kv.Key.ToLower() @@ -67,8 +67,8 @@ module rec ROCrateObject = /// 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 + let decodeObject : Decoder = + { new Decoder with member _.Decode(helpers, value) = if helpers.isObject value then let getters = Decode.Getters(helpers, value) @@ -77,7 +77,7 @@ module rec ROCrateObject = fun (get : Decode.IGetters) -> let t = get.Required.Field "@type" Decode.string let id = get.Required.Field "@id" Decode.string - let o = ROCrateObject(id,t) + let o = LDObject(id,t) for property in properties do if property <> "@id" && property <> "@type" then o.SetProperty(property,get.Required.Field property (decode(false))) @@ -136,6 +136,6 @@ module rec ROCrateObject = ] decode(expectObject) - let decoder : Decoder = Decode.map unbox (getDecoder(true)) + let decoder : Decoder = Decode.map unbox (getDecoder(true)) let genericDecoder : Decoder = getDecoder(false) diff --git a/src/ROCrate/ARCtrl.ROCrate.fsproj b/src/ROCrate/ARCtrl.ROCrate.fsproj index 2d9e74d7..e5dfc51f 100644 --- a/src/ROCrate/ARCtrl.ROCrate.fsproj +++ b/src/ROCrate/ARCtrl.ROCrate.fsproj @@ -8,7 +8,7 @@ - + @@ -20,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/ISAProfile/Data.fs b/src/ROCrate/ISAProfile/Data.fs index f31dccd0..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 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/LabProcess.fs b/src/ROCrate/ISAProfile/LabProcess.fs index 6b49e5fa..9abb4fdc 100644 --- a/src/ROCrate/ISAProfile/LabProcess.fs +++ b/src/ROCrate/ISAProfile/LabProcess.fs @@ -17,7 +17,7 @@ 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 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 29fb0378..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 diff --git a/src/ROCrate/ISAProfile/PropertyValue.fs b/src/ROCrate/ISAProfile/PropertyValue.fs index 47454f46..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 diff --git a/src/ROCrate/ISAProfile/Sample.fs b/src/ROCrate/ISAProfile/Sample.fs index 0319de98..a607ce56 100644 --- a/src/ROCrate/ISAProfile/Sample.fs +++ b/src/ROCrate/ISAProfile/Sample.fs @@ -12,7 +12,7 @@ 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 diff --git a/src/ROCrate/ISAProfile/ScholarlyArticle.fs b/src/ROCrate/ISAProfile/ScholarlyArticle.fs index c1359b20..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 diff --git a/src/ROCrate/ROCrateObject.fs b/src/ROCrate/LDObject.fs similarity index 74% rename from src/ROCrate/ROCrateObject.fs rename to src/ROCrate/LDObject.fs index 96b6fa84..bf001ba7 100644 --- a/src/ROCrate/ROCrateObject.fs +++ b/src/ROCrate/LDObject.fs @@ -8,15 +8,15 @@ open System type LDContext() = inherit DynamicObj() /// Base interface implemented by all explicitly known objects in our ROCrate profiles. -type IROCrateObject = +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 IROPCrateObject interface. +/// Basically a DynamicObj that implements the ILDObject interface. [] -type ROCrateObject(id:string, schemaType: string, ?additionalType) = +type LDObject(id:string, schemaType: string, ?additionalType) = inherit DynamicObj() let mutable schemaType = schemaType @@ -33,7 +33,7 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = with get() = additionalType and set(value) = additionalType <- value - interface IROCrateObject with + interface ILDObject with member this.SchemaType with get() = schemaType @@ -48,12 +48,12 @@ type ROCrateObject(id:string, schemaType: string, ?additionalType) = member this.SetContext (context: LDContext) = this.SetProperty("@context", context) - static member setContext (context: LDContext) = fun (roc: #ROCrateObject) -> roc.SetContext(context) + static member setContext (context: LDContext) = fun (roc: #LDObject) -> roc.SetContext(context) member this.TryGetContext() = DynObj.tryGetTypedPropertyValue("@context") this - static member tryGetContext () = fun (roc: #ROCrateObject) -> roc.TryGetContext() + static member tryGetContext () = fun (roc: #LDObject) -> roc.TryGetContext() member this.RemoveContext() = this.RemoveProperty("@context") - static member removeContext () = fun (roc: #ROCrateObject) -> roc.RemoveContext() \ No newline at end of file + static member removeContext () = fun (roc: #LDObject) -> roc.RemoveContext() \ 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/tests/Json/ARCtrl.Json.Tests.fsproj b/tests/Json/ARCtrl.Json.Tests.fsproj index 18821623..2800691e 100644 --- a/tests/Json/ARCtrl.Json.Tests.fsproj +++ b/tests/Json/ARCtrl.Json.Tests.fsproj @@ -33,7 +33,7 @@ - + diff --git a/tests/Json/ROCrateObject.Tests.fs b/tests/Json/LDObject.Tests.fs similarity index 64% rename from tests/Json/ROCrateObject.Tests.fs rename to tests/Json/LDObject.Tests.fs index 01ebfc8f..ad053dc7 100644 --- a/tests/Json/ROCrateObject.Tests.fs +++ b/tests/Json/LDObject.Tests.fs @@ -1,4 +1,4 @@ -module Tests.ROCrateObject +module Tests.LDObject open TestingUtils open TestObjects.Json.ROCrate @@ -8,66 +8,66 @@ open ARCtrl.Json open DynamicObj let private test_read = testList "Read" [ - ftestCase "onlyIDAndType" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.onlyIDAndType) + 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" - ftestCase "onlyID" <| fun _ -> - let f = fun _ -> ROCrateObject.fromROCrateJsonString(GenericObjects.onlyID) |> ignore + testCase "onlyID" <| fun _ -> + let f = fun _ -> LDObject.fromROCrateJsonString(GenericObjects.onlyID) |> ignore Expect.throws f "Should fail if Type is missing" - ftestCase "onlyType" <| fun _ -> - let f = fun _ -> ROCrateObject.fromROCrateJsonString(GenericObjects.onlyType) |> ignore + testCase "onlyType" <| fun _ -> + let f = fun _ -> LDObject.fromROCrateJsonString(GenericObjects.onlyType) |> ignore Expect.throws f "Should fail if ID is missing" - ftestCase "withStringFields" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withStringFields) + 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" - ftestCase "withIntFields" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withIntFields) + 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" - ftestCase "withStringArray" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withStringArray) + 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" - ftestCase "withNestedObject" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withNestedObject) + 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" + 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" - ftestCase "withObjectArray" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withObjectArray) + 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] :?> ROCrateObject + 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] :?> ROCrateObject + 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" - ftestCase "withMixedArray" <| fun _ -> - let json = ROCrateObject.fromROCrateJsonString(GenericObjects.withMixedArray) + 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] :?> ROCrateObject + 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 @@ -77,46 +77,46 @@ let private test_read = testList "Read" [ ] let test_write = testList "write" [ - ftestCase "onlyIDAndType" <| fun _ -> + testCase "onlyIDAndType" <| fun _ -> let json = GenericObjects.onlyIDAndType - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withStringFields" <| fun _ -> + testCase "withStringFields" <| fun _ -> let json = GenericObjects.withStringFields - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withIntFields" <| fun _ -> + testCase "withIntFields" <| fun _ -> let json = GenericObjects.withIntFields - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withStringArray" <| fun _ -> + testCase "withStringArray" <| fun _ -> let json = GenericObjects.withStringArray - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withNestedObject" <| fun _ -> + testCase "withNestedObject" <| fun _ -> let json = GenericObjects.withNestedObject - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withObjectArray" <| fun _ -> + testCase "withObjectArray" <| fun _ -> let json = GenericObjects.withObjectArray - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" - ftestCase "withMixedArray" <| fun _ -> + testCase "withMixedArray" <| fun _ -> let json = GenericObjects.withMixedArray - let object = ROCrateObject.fromROCrateJsonString(json) - let output = ROCrateObject.toROCrateJsonString() object + let object = LDObject.fromROCrateJsonString(json) + let output = LDObject.toROCrateJsonString() object Expect.stringEqual output json "Output string is not correct" ] -let main = testList "ROCrateObject" [ +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 82e64fa2..ffec170f 100644 --- a/tests/Json/Main.fs +++ b/tests/Json/Main.fs @@ -21,7 +21,7 @@ let all = testSequenced <| testList "Json" [ Tests.Process.ProcessInput.main Tests.Process.Protocol.main Tests.Process.Process.main - Tests.ROCrateObject.main + Tests.LDObject.main Tests.SchemaValidation.main ] 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 5bff5cf8..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,7 +57,7 @@ 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" @@ -72,7 +72,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -108,13 +108,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Data.Tests.fs b/tests/ROCrate/ISAProfile/Data.Tests.fs index 7f4d25a4..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,7 +47,7 @@ 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" @@ -62,7 +62,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -79,13 +79,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Dataset.Tests.fs b/tests/ROCrate/ISAProfile/Dataset.Tests.fs index a8bfaee3..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,7 +31,7 @@ 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" @@ -46,7 +46,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -63,13 +63,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Investigation.Tests.fs b/tests/ROCrate/ISAProfile/Investigation.Tests.fs index b85ee704..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,7 +63,7 @@ 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" @@ -78,7 +78,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -114,13 +114,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProcess.tests.fs b/tests/ROCrate/ISAProfile/LabProcess.tests.fs index c1d8fe17..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,7 +62,7 @@ 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" @@ -77,7 +77,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -94,13 +94,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs b/tests/ROCrate/ISAProfile/LabProtocol.Tests.fs index debfc77b..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,7 +55,7 @@ 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" @@ -70,7 +70,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -87,13 +87,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Person.Tests.fs b/tests/ROCrate/ISAProfile/Person.Tests.fs index 1f32f046..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,7 +61,7 @@ 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" @@ -76,7 +76,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -93,13 +93,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs b/tests/ROCrate/ISAProfile/PropertyValue.Tests.fs index 210be90e..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,7 +53,7 @@ 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" @@ -68,7 +68,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -85,13 +85,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Sample.tests.fs b/tests/ROCrate/ISAProfile/Sample.tests.fs index a4f6b142..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,7 +45,7 @@ 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" @@ -60,7 +60,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -77,13 +77,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs b/tests/ROCrate/ISAProfile/ScholarlyArticle.Tests.fs index 82fc2edb..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,7 +53,7 @@ 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" @@ -68,7 +68,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -85,13 +85,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ISAProfile/Study.Tests.fs b/tests/ROCrate/ISAProfile/Study.Tests.fs index 00a522dd..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,7 +63,7 @@ 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" @@ -78,7 +78,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -114,13 +114,13 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) diff --git a/tests/ROCrate/ROCrateObject.Tests.fs b/tests/ROCrate/LDObject.Tests.fs similarity index 59% rename from tests/ROCrate/ROCrateObject.Tests.fs rename to tests/ROCrate/LDObject.Tests.fs index 27222bc5..658c7e1d 100644 --- a/tests/ROCrate/ROCrateObject.Tests.fs +++ b/tests/ROCrate/LDObject.Tests.fs @@ -1,4 +1,4 @@ -module Tests.ROCrateObject +module Tests.LDObject open ARCtrl.ROCrate open DynamicObj @@ -6,24 +6,24 @@ 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 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.ROCrateObjectHasId "rocrateobject_mandatory_properties_id" mandatory_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "someType" 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.ROCrateObjectHasId "rocrateobject_all_properties_id" all_properties - testCase "SchemaType" <| fun _ -> Expect.ROCrateObjectHasType "someType" all_properties - testCase "AdditionalType" <| fun _ -> Expect.ROCrateObjectHasAdditionalType "additionalType" 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.ROCrateObjectHasExpectedInterfaceMembers "someType" "rocrateobject_mandatory_properties_id" None mandatory_properties - testCase "allProperties" <| fun _ -> Expect.ROCrateObjectHasExpectedInterfaceMembers "someType" "rocrateobject_all_properties_id" (Some "additionalType") all_properties + 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 ( @@ -31,7 +31,7 @@ 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" @@ -46,7 +46,7 @@ let tests_instance_methods = testSequenced ( testCase "can set context" <| fun _ -> mandatory_properties.SetContext context - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + 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" @@ -63,18 +63,18 @@ let tests_static_methods = testSequenced ( context.SetProperty("more", "context") testCase "can set context" <| fun _ -> - ROCrateObject.setContext context mandatory_properties - Expect.ROCrateObjectHasDynamicProperty "@context" context mandatory_properties + LDObject.setContext context mandatory_properties + Expect.LDObjectHasDynamicProperty "@context" context mandatory_properties testCase "can get context" <| fun _ -> - let ctx = ROCrateObject.tryGetContext() mandatory_properties + let ctx = LDObject.tryGetContext() mandatory_properties Expect.equal ctx (Some context) "context was not set correctly" testCase "can remove context" <| fun _ -> - ROCrateObject.removeContext() mandatory_properties |> ignore + LDObject.removeContext() mandatory_properties |> ignore Expect.isNone (DynObj.tryGetTypedPropertyValue "@context" mandatory_properties) "context was not removed correctly" ] ) -let main = testList "ROCrateObject" [ +let main = testList "LDObject" [ tests_profile_object_is_valid tests_interface_members tests_dynamic_members 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