From 46045623254ec8eabccb744da7eed51449b4178d Mon Sep 17 00:00:00 2001 From: spsarras Date: Fri, 1 Nov 2024 13:36:14 +0000 Subject: [PATCH] test: removed unecessary code and clarified helper for tests project --- AdSecGH/Helpers/BusinessExtensions.cs | 22 --------- codecov.yml | 65 ++++++++++++++------------- 2 files changed, 33 insertions(+), 54 deletions(-) diff --git a/AdSecGH/Helpers/BusinessExtensions.cs b/AdSecGH/Helpers/BusinessExtensions.cs index 3f236bb..4672723 100644 --- a/AdSecGH/Helpers/BusinessExtensions.cs +++ b/AdSecGH/Helpers/BusinessExtensions.cs @@ -2,8 +2,6 @@ using System.Collections; using System.Collections.Generic; -using AdSecGH.Parameters; - using Grasshopper.Kernel; using Grasshopper.Kernel.Data; using Grasshopper.Kernel.Parameters; @@ -20,12 +18,6 @@ public static class BusinessExtensions { private static readonly Dictionary> ToGhParam = new Dictionary> { { - typeof(DoubleParameter), a => new Param_Number { - Name = a.Name, - NickName = a.NickName, - Description = a.Description, - } - }, { typeof(DoubleArrayParameter), a => new Param_Number { Name = a.Name, NickName = a.NickName, @@ -44,26 +36,12 @@ private static readonly Dictionary> ToGhParam private static readonly Dictionary> ToGoo = new Dictionary> { { - typeof(PointAttribute), a => new GH_ObjectWrapper { - Value = new AdSecPointGoo((a as PointAttribute)?.Value), - } - }, { typeof(DoubleParameter), a => new GH_Number((a as DoubleParameter).Value) }, { typeof(DoubleArrayParameter), a => (a as DoubleArrayParameter).Value }, }; - private static GH_Structure ToTree(DoubleArrayParameter doubleArrayParameter) { - var structure = new GH_Structure(); - foreach (double value in doubleArrayParameter.Value) { - var branch = new GH_Path(0); - structure.Append(new GH_Number(value), branch); - } - - return structure; - } - public static void SetDefaultValues(this IBusinessComponent businessComponent) { foreach (var attribute in businessComponent.GetAllInputAttributes()) { if (attribute is IDefault @default) { diff --git a/codecov.yml b/codecov.yml index a7e403a..53328ac 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,32 +1,33 @@ -codecov: - notify: - after_n_builds: 2 -comment: - behavior: new - layout: reach, diff, tree - show_carryforward_flags: false -coverage: - precision: 1 - range: - - 30.0 - - 75.0 - round: down - status: - changes: false - default_rules: - flag_coverage_not_uploaded_behavior: include - patch: true - project: - default: - target: auto - threshold: 1% -flags: - adsecgh: - carryforward: false - integration: - carryforward: false -ignore: - - "AdSecGHTests" # ignore project (as it is referenced by Integration test) - - "AdSecGH/Components/GraveyardComp" # ignore old versions of components in graveyard folder - - "AdSecGH/Properties" # ignore icons and Resources.Designer.cs file auto-generated by visual studio - - "AdSecGH/Resources" # ignore icons etc +codecov: + notify: + after_n_builds: 2 +comment: + behavior: new + layout: reach, diff, tree + show_carryforward_flags: false +coverage: + precision: 1 + range: + - 30.0 + - 75.0 + round: down + status: + changes: false + default_rules: + flag_coverage_not_uploaded_behavior: include + patch: true + project: + default: + target: auto + threshold: 1% +flags: + adsecgh: + carryforward: false + integration: + carryforward: false +ignore: + - "AdSecGHTests" # ignore project (as it is referenced by Integration test) + - "TestGrasshopperObjects" # ignore project (as it is referenced by Integration test) + - "AdSecGH/Components/GraveyardComp" # ignore old versions of components in graveyard folder + - "AdSecGH/Properties" # ignore icons and Resources.Designer.cs file auto-generated by visual studio + - "AdSecGH/Resources" # ignore icons etc