From adb777b548a6ac2b7c9b238f60a619245d656e47 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Tue, 29 Jan 2019 06:52:13 +0000 Subject: [PATCH] update NuGet packages and assembly info to 1.0 and. --- DeathSocket/DeathSocket.fsproj | 22 +-- DeathSocket/GridPainter.fs | 1 - DeathSocketCLI/DeathSocketCLI.fsproj | 4 +- DeathSocketCLI/packages.config | 4 +- TestCentre/Script.fsx | 227 +++++++++++++-------------- 5 files changed, 128 insertions(+), 130 deletions(-) diff --git a/DeathSocket/DeathSocket.fsproj b/DeathSocket/DeathSocket.fsproj index bb8c781..d007b0c 100644 --- a/DeathSocket/DeathSocket.fsproj +++ b/DeathSocket/DeathSocket.fsproj @@ -3,22 +3,22 @@ netstandard2.0 true - true - 0.7.1-alpha + false + 1.0.0 Craig Oates Death Socket - A .Net Standard library which you can plug into to project and draw gridded overlays onto you images. Please note, Death Socket uses System.Drawing brushes and not System.Media brushes. For futher information, visit the projects repository on GitHub. To get a sense of what Death Socket can do, there is a console program you can download seperately (on GitHub). - https://github.com/CraigOates/Death-Socket/tree/master - https://github.com/CraigOates/Death-Socket/blob/master/LICENSE + A .Net Standard library which you can plug into to project and draw gridded overlays onto you images. Please note, Death Socket uses System.Drawing brushes and not System.Media brushes. + https://gitlab.com/CraigOates/Death-Socket/tree/master + Craig Oates - https://github.com/CraigOates/Death-Socket/tree/master + https://gitlab.com/CraigOates/Death-Socket/tree/master Git - deathsocket craig oates image overlay f# - This release fixes the pen thickness scaling bugs in 0.7. - 0.7.1.0 - https://github.com/CraigOates/Death-Socket/blob/master/.github/Images/death-socket-logo.png - 0.7.1.0 + deathsocket grid image overlay f# + The 1.0 release of Death Socket + 1.0.0.0 + https://gitlab.com/CraigOates/Death-Socket/blob/master/.github/Images/death-socket-logo.png + 1.0.0.0 diff --git a/DeathSocket/GridPainter.fs b/DeathSocket/GridPainter.fs index 9045f8d..a155da0 100644 --- a/DeathSocket/GridPainter.fs +++ b/DeathSocket/GridPainter.fs @@ -56,7 +56,6 @@ namespace DeathSocket printfn "File could not be found at %s" ex.Message } - // NOT TESTED. /// /// Determines the current scale an image is viewed at (E.G. scaled /// preview in image viewer). The (pen) line thickness is then updated diff --git a/DeathSocketCLI/DeathSocketCLI.fsproj b/DeathSocketCLI/DeathSocketCLI.fsproj index cf3d00a..fd203e2 100644 --- a/DeathSocketCLI/DeathSocketCLI.fsproj +++ b/DeathSocketCLI/DeathSocketCLI.fsproj @@ -59,10 +59,10 @@ - ..\packages\Console.Waterworks.0.1.0.0-alpha1\lib\Console.Waterworks.dll + ..\packages\Console.Waterworks.1.0.1\lib\net47\Console.Waterworks.dll - ..\packages\FSharp.Core.4.5.4\lib\net45\FSharp.Core.dll + ..\packages\FSharp.Core.4.6.0\lib\net45\FSharp.Core.dll diff --git a/DeathSocketCLI/packages.config b/DeathSocketCLI/packages.config index d59a998..b73997e 100644 --- a/DeathSocketCLI/packages.config +++ b/DeathSocketCLI/packages.config @@ -1,7 +1,7 @@  - - + + diff --git a/TestCentre/Script.fsx b/TestCentre/Script.fsx index ecd9f26..5bd6ce6 100644 --- a/TestCentre/Script.fsx +++ b/TestCentre/Script.fsx @@ -1,114 +1,113 @@ -// These DLL's must be built before you can use them in this script. -#r "bin/Debug/System.Drawing.Common.dll" -#r "bin/Debug/SmoulderingBeachBall.dll" - -open System -open System.Drawing -open System.Reflection -open SmoulderingBeachBall.Domain -open SmoulderingBeachBall.Services -open System.Threading -open System.IO - -let loadLocation = __SOURCE_DIRECTORY__ + "/LoadingTestArea" -let saveLocation = __SOURCE_DIRECTORY__ + "/SavingTestArea" -let random = Random() - -(* Resetting the Testing Area Folders Scripts -=============================================================================== -The following scripts are for when you need to "manually" clear out the -LoadingTestArea and SavingTestArea folders. If you do not want to open up the -folder in Explorer and delete the files that way, just run the scripts in this -section. If you reset the LoadingTestArea, you will need to repopulate it using -the "Populating LoadingTestArea Folder Scripts" below. *) - -let resetSavingTestArea () = - let files = Directory.GetFileSystemEntries(saveLocation, "*.png") - match files.Length with - | 0 -> () - | _ -> - files - |> Array.iter (fun f -> File.Delete(f)) - -let resetLoadingTestArea () = - let files = Directory.GetFileSystemEntries(loadLocation, "*.png") - match files.Length with - | 0 -> () - | _ -> - files - |> Array.iter (fun f -> File.Delete(f)) - -// Run these when the above functions have been added to F# interactive. -resetSavingTestArea () -resetLoadingTestArea () - -(* Populating LoadingTestArea Folder Scripts -=============================================================================== -The following scripts are to help you populate a test folder with test images. -You can then use these images in LibraryTests.fs -- Property Tests. -The tests consists of loading images from LoadingTestArea, transforming them -and saving them in SavingTestArea. *) - -let allColours = - let properties = - typeof.GetProperties(BindingFlags.Public ||| BindingFlags.Static) - seq { for prop in properties -> prop} - |> Seq.toArray - -let randomBrush () = - let item = allColours.[random.Next(allColours.Length)] - item.GetValue(null, null) - -let generateDimensionSizes total = - List.init total (fun _ -> random.Next(3000)) - -let randomSize (sizes: int list) = - // (Sleep) Helps to reduce chance of picking the same item twice in quick succession. - Thread.Sleep 100 - sizes.Item (random.Next(sizes.Length)) - -let populateSpec sizes = - { width = randomSize (sizes) - height = randomSize (sizes) - colour = (randomBrush ()) :?> Brush - filePath = loadLocation - overlay = None } - -let generateSpecs amount = - let imageSizes = generateDimensionSizes amount - [for i in 0 .. amount -> (populateSpec (imageSizes)) ] - -let generateImage spec = - printfn "[INFO.] Creating image [Width: %i] [Height: %i] ..." (spec.width) (spec.height) - makeImage spec - -let populateLoadingTestArea () = - printfn "[INFO.] Populating LoadingTestArea..." - generateSpecs 100 - |> List.map generateImage - |> Async.Parallel - |> Async.RunSynchronously - |> ignore - printfn "[INFO.] Finishing populating /LoadingTestArea." - -// You should only need this once. -// Make sure you have passed the above into F# Interactive. -populateLoadingTestArea () - -(* Creating the Saving Test Area Script -============================================================================== -This bit of code is for creating the SavingTestArea folder which Test Centre -will use when it runs its tests. You will normally only need to run this code -when you have just cloned this repository or you accidently deleted said -folder. In other words, you should only need to use it once. *) - -let createSavingTestArea () = - match Directory.Exists saveLocation with - | false -> - Directory.CreateDirectory saveLocation |> ignore - printfn "SavingTestArea created." - | _ -> printfn "SavingTestArea already exists." - -(* Before calling this function, make sure the test checking to see if this -folder exists is failing first. *) -createSavingTestArea () \ No newline at end of file +//// These DLL's must be built before you can use them in this script. +//#r "bin/Debug/System.Drawing.Common.dll" +//#r "bin/Debug/SmoulderingBeachBall.dll" + +//open System +//open System.Drawing +//open System.Reflection +//open SmoulderingBeachBall.Domain +//open SmoulderingBeachBall.Services +//open System.Threading +//open System.IO + +//let loadLocation = __SOURCE_DIRECTORY__ + "/LoadingTestArea" +//let saveLocation = __SOURCE_DIRECTORY__ + "/SavingTestArea" +//let random = Random() + +//(* Resetting the Testing Area Folders Scripts +//=============================================================================== +//The following scripts are for when you need to "manually" clear out the +//LoadingTestArea and SavingTestArea folders. If you do not want to open up the +//folder in Explorer and delete the files that way, just run the scripts in this +//section. If you reset the LoadingTestArea, you will need to repopulate it using +//the "Populating LoadingTestArea Folder Scripts" below. *) + +//let resetSavingTestArea () = +// let files = Directory.GetFileSystemEntries(saveLocation, "*.png") +// match files.Length with +// | 0 -> () +// | _ -> +// files +// |> Array.iter (fun f -> File.Delete(f)) + +//let resetLoadingTestArea () = +// let files = Directory.GetFileSystemEntries(loadLocation, "*.png") +// match files.Length with +// | 0 -> () +// | _ -> +// files +// |> Array.iter (fun f -> File.Delete(f)) + +//// Run these when the above functions have been added to F# interactive. +//resetSavingTestArea () +//resetLoadingTestArea () + +//(* Populating LoadingTestArea Folder Scripts +//=============================================================================== +//The following scripts are to help you populate a test folder with test images. +//You can then use these images in LibraryTests.fs -- Property Tests. +//The tests consists of loading images from LoadingTestArea, transforming them +//and saving them in SavingTestArea. *) + +//let allColours = +// let properties = +// typeof.GetProperties(BindingFlags.Public ||| BindingFlags.Static) +// seq { for prop in properties -> prop} +// |> Seq.toArray + +//let randomBrush () = +// let item = allColours.[random.Next(allColours.Length)] +// item.GetValue(null, null) + +//let generateDimensionSizes total = +// List.init total (fun _ -> random.Next(3000)) + +//let randomSize (sizes: int list) = +// // (Sleep) Helps to reduce chance of picking the same item twice in quick succession. +// Thread.Sleep 100 +// sizes.Item (random.Next(sizes.Length)) + +//let populateSpec sizes = +// Brush ({ filePath = loadLocation +// height = randomSize (sizes) +// colour = (randomBrush ()) :?> Brush +// overlay = None }) + +//let generateSpecs amount = +// let imageSizes = generateDimensionSizes amount +// [for i in 0 .. amount -> (populateSpec (imageSizes)) ] + +//let generateImage spec = +// printfn "[INFO.] Creating image [Width: %i] [Height: %i] ..." (spec.width) (spec.height) +// makeImage spec + +//let populateLoadingTestArea () = +// printfn "[INFO.] Populating LoadingTestArea..." +// generateSpecs 100 +// |> List.map generateImage +// |> Async.Parallel +// |> Async.RunSynchronously +// |> ignore +// printfn "[INFO.] Finishing populating /LoadingTestArea." + +//// You should only need this once. +//// Make sure you have passed the above into F# Interactive. +//populateLoadingTestArea () + +//(* Creating the Saving Test Area Script +//============================================================================== +//This bit of code is for creating the SavingTestArea folder which Test Centre +//will use when it runs its tests. You will normally only need to run this code +//when you have just cloned this repository or you accidently deleted said +//folder. In other words, you should only need to use it once. *) + +//let createSavingTestArea () = +// match Directory.Exists saveLocation with +// | false -> +// Directory.CreateDirectory saveLocation |> ignore +// printfn "SavingTestArea created." +// | _ -> printfn "SavingTestArea already exists." + +//(* Before calling this function, make sure the test checking to see if this +//folder exists is failing first. *) +//createSavingTestArea () \ No newline at end of file