diff --git a/CHANGELOG.md b/CHANGELOG.md index dc67f2f0..0491c8e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p Please see [here](https://github.com/hrntsm/Tunny/releases) for the data released for each version. +## [v0.9.1] -2023-12-30 + +### Fixed + +- Error generated due to missing path in settings on first startup. + ## [v0.9.0] -2023-12-30 ### Added diff --git a/Tunny/Settings/TunnySettings.cs b/Tunny/Settings/TunnySettings.cs index 8bd9f4af..15c8230a 100644 --- a/Tunny/Settings/TunnySettings.cs +++ b/Tunny/Settings/TunnySettings.cs @@ -1,3 +1,4 @@ +using System.IO; using System.Reflection; using Newtonsoft.Json; @@ -16,7 +17,12 @@ public class TunnySettings public void Serialize(string path) { string json = JsonConvert.SerializeObject(this, Formatting.Indented); - System.IO.File.WriteAllText(path, json); + string dirPath = Path.GetDirectoryName(path); + if (!Directory.Exists(dirPath)) + { + Directory.CreateDirectory(dirPath); + } + File.WriteAllText(path, json); } public static TunnySettings Deserialize(string json) diff --git a/Tunny/Tunny.csproj b/Tunny/Tunny.csproj index e6838e77..94943f57 100644 --- a/Tunny/Tunny.csproj +++ b/Tunny/Tunny.csproj @@ -2,7 +2,7 @@ net48 - 0.9.0 + 0.9.1 Tunny Tunny is an optimization component wrapped in optuna. .gha diff --git a/Tunny/TunnyInfo.cs b/Tunny/TunnyInfo.cs index 8476e197..50eccd88 100644 --- a/Tunny/TunnyInfo.cs +++ b/Tunny/TunnyInfo.cs @@ -10,7 +10,7 @@ namespace Tunny public class Tunny : GH_AssemblyInfo { public override string Name => "Tunny"; - public override string Version => "0.9.0"; + public override string Version => "0.9.1"; public override Bitmap Icon => Resource.TunnyIcon; public override string Description => "Tunny is an optimization component wrapped in optuna."; public override Guid Id => new Guid("01E58960-AFAA-48FF-BC90-174FDC4A9D64"); diff --git a/Yak/manifest.yml b/Yak/manifest.yml index cd758d0c..7e341c3f 100644 --- a/Yak/manifest.yml +++ b/Yak/manifest.yml @@ -1,8 +1,8 @@ --- name: Tunny -version: 0.9.0 +version: 0.9.1 authors: -- hrntsm + - hrntsm description: 🐟Tunny🐟 is Grasshopper's optimization component using Optuna, an open source hyperparameter auto-optimization framework. Tunny includes some features such as multi-objective optimization with constraint, Quasi-MonteCarlo sampling and dashboards for results analysis etc. url: https://tunny-docs.deno.dev/ keywords: