From 8387a24e9ff654f4b3a669b581d208d06f15d77c Mon Sep 17 00:00:00 2001 From: Kevin Schneider Date: Thu, 26 Oct 2023 11:31:07 +0200 Subject: [PATCH] sort directory contents before zipping --- src/ARCTokenization/RELEASE_NOTES.md | 6 +++++- tests/ARCTokenization.Tests/ReferenceObjects.fs | 6 +++++- .../TokenizationTests/ParserFunctions.fs | 8 ++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/ARCTokenization/RELEASE_NOTES.md b/src/ARCTokenization/RELEASE_NOTES.md index 5117d8a..442b605 100644 --- a/src/ARCTokenization/RELEASE_NOTES.md +++ b/src/ARCTokenization/RELEASE_NOTES.md @@ -1,4 +1,8 @@ -### 1.1.0 - (Released 2023-8-21) +### 1.2.0 - (Released 2023-10-26) +- Additions: + - [Add file system tokenization](https://github.com/nfdi4plants/ARCTokenization/commit/57de162d50c918f1e245f1aa34db0a6b1660ba3b) + +### 1.1.0 - (Released 2023-10-25) - Additions: - [Add some temporary static modules representing structural ontologies](https://github.com/nfdi4plants/ARCTokenization/commit/7d37cfc8a52accbc37df63e95a39d2684e66535f) diff --git a/tests/ARCTokenization.Tests/ReferenceObjects.fs b/tests/ARCTokenization.Tests/ReferenceObjects.fs index c16956c..b2ed079 100644 --- a/tests/ARCTokenization.Tests/ReferenceObjects.fs +++ b/tests/ARCTokenization.Tests/ReferenceObjects.fs @@ -169,6 +169,7 @@ module Tokenization = v = v ) ) + |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) let referenceAbsoluteDirectoryPaths(root) = [ @@ -186,6 +187,7 @@ module Tokenization = v = v.Replace("\\", "/") ) ) + |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) let referenceRelativeFilePaths = [ @@ -199,6 +201,7 @@ module Tokenization = v = v ) ) + |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) let referenceAbsoluteFilePaths(root) = [ @@ -212,4 +215,5 @@ module Tokenization = cvTerm = CvTerm.create("AFSO:00000009","File Path","AFSO"), v = v.Replace("\\", "/") ) - ) \ No newline at end of file + ) + |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) \ No newline at end of file diff --git a/tests/ARCTokenization.Tests/TokenizationTests/ParserFunctions.fs b/tests/ARCTokenization.Tests/TokenizationTests/ParserFunctions.fs index de52deb..1ff6860 100644 --- a/tests/ARCTokenization.Tests/TokenizationTests/ParserFunctions.fs +++ b/tests/ARCTokenization.Tests/TokenizationTests/ParserFunctions.fs @@ -9,7 +9,7 @@ module FileSystem = open ReferenceObjects.Tokenization.FileSystem open System.IO - let parsedRelativeDirectoryPaths = FS.tokenizeRelativeDirectoryPaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq + let parsedRelativeDirectoryPaths = FS.tokenizeRelativeDirectoryPaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) [] let ``Relative directory paths are tokenized correctly`` () = @@ -20,7 +20,7 @@ module FileSystem = fun (e, a) -> Assert.True(e.Equals(a)) ) - let parsedRelativeFilePaths = FS.tokenizeRelativeFilePaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq + let parsedRelativeFilePaths = FS.tokenizeRelativeFilePaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) [] let ``Relative file paths are tokenized correctly`` () = @@ -31,7 +31,7 @@ module FileSystem = fun (e, a) -> Assert.True(e.Equals(a)) ) - let parsedAbsoluteDirectoryPaths = FS.tokenizeAbsoluteDirectoryPaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq + let parsedAbsoluteDirectoryPaths = FS.tokenizeAbsoluteDirectoryPaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) [] let ``Absolute directory paths are tokenized correctly`` () = @@ -42,7 +42,7 @@ module FileSystem = fun (e, a) -> Assert.True(e.Equals(a)) ) - let parsedAbsoluteFilePaths = FS.tokenizeAbsoluteFilePaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq + let parsedAbsoluteFilePaths = FS.tokenizeAbsoluteFilePaths (Path.GetFullPath("Fixtures/testPaths/")) |> List.ofSeq |> List.sortBy (fun cvp -> cvp.Value |> ParamValue.getValueAsString) [] let ``Absolute file paths are tokenized correctly`` () =