Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROCrateObject json serialization #455

Merged
merged 10 commits into from
Oct 18, 2024
1 change: 0 additions & 1 deletion ARCtrl.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 0 additions & 20 deletions Directory.Build.props

This file was deleted.

2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageVersion Include="Thoth.Json.Newtonsoft" Version="0.2.0" />
<PackageVersion Include="FsSpreadsheet" Version="6.3.0-alpha.4" />
<PackageVersion Include="YAMLicious" Version="0.0.1" />
<PackageVersion Include="DynamicObj" Version="4.0.0" />
<PackageVersion Include="DynamicObj" Version="4.0.3" />
<PackageVersion Include="Fable.SimpleHttp" Version="3.5.0" />
<PackageVersion Include="Fable.Fetch" Version="2.6.0" />
<PackageVersion Include="Fable.Node" Version="1.2.0" />
Expand Down
8 changes: 4 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/ARCtrl/ARCtrl.Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<Compile Include="JsonIO\Assay.fs" />
<Compile Include="JsonIO\Study.fs" />
<Compile Include="JsonIO\Investigation.fs" />
<Compile Include="JsonIO\ROCrateObject.fs" />
<Compile Include="JsonIO\LDObject.fs" />
<Compile Include="JsonIO\ARC.fs" />
<None Include="README.md" />
</ItemGroup>-->
Expand Down
2 changes: 1 addition & 1 deletion src/ARCtrl/ARCtrl.Javascript.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<Compile Include="JsonIO\Assay.fs" />
<Compile Include="JsonIO\Study.fs" />
<Compile Include="JsonIO\Investigation.fs" />
<Compile Include="JsonIO\ROCrateObject.fs" />
<Compile Include="JsonIO\LDObject.fs" />
<Compile Include="JsonIO\ARC.fs" />
<None Include="README.md" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ARCtrl/ARCtrl.Python.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<Compile Include="JsonIO\Assay.fs" />
<Compile Include="JsonIO\Study.fs" />
<Compile Include="JsonIO\Investigation.fs" />
<Compile Include="JsonIO\ROCrateObject.fs" />
<Compile Include="JsonIO\LDObject.fs" />
<Compile Include="JsonIO\ARC.fs" />
<None Include="README.md" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ARCtrl/ARCtrl.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<Compile Include="JsonIO\Assay.fs" />
<Compile Include="JsonIO\Study.fs" />
<Compile Include="JsonIO\Investigation.fs" />
<Compile Include="JsonIO\ROCrateObject.fs" />
<Compile Include="JsonIO\LDObject.fs" />
<Compile Include="JsonIO\ARC.fs" />
<None Include="README.md" />
</ItemGroup>
Expand Down
25 changes: 25 additions & 0 deletions src/ARCtrl/JsonIO/LDObject.fs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
namespace ARCtrl.Json

open ARCtrl
open ARCtrl.ROCrate
open System
open ARCtrl.ROCrate
open Thoth.Json.Core
open DynamicObj

[<AutoOpen>]
module LDObjectExtensions =

type LDObject with

static member fromROCrateJsonString (s:string) =
Decode.fromJsonString LDObject.decoder s

/// exports in json-ld format
static member toROCrateJsonString(?spaces) =
fun (obj:LDObject) ->
LDObject.encoder obj
|> Encode.toJsonString (Encode.defaultSpaces spaces)

member this.ToROCrateJsonString(?spaces) =
LDObject.toROCrateJsonString(?spaces=spaces) this
123 changes: 0 additions & 123 deletions src/ARCtrl/JsonIO/ROCrateObject.fs

This file was deleted.

Loading
Loading