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

7.1 Deployment #487

Merged
merged 35 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
17d5848
Upgrade AssemblyFileVersion to 7.1.0.0
BHoMBot Dec 22, 2023
d5dabf4
Update AssemblyFileVersion to 7.1 (#476)
Dec 22, 2023
022657d
Uptick copyright headers to 2024
BHoMBot Jan 2, 2024
341a5b2
Update Copyright Headers to 2024 (#477)
Jan 2, 2024
69695c0
Solving the slow execution of CollectOutputTypes on Custom objects
adecler Jan 4, 2024
ae56ad7
Solving the slow execution of CollectOutputTypes on Custom objects (#…
Jan 4, 2024
c86ac03
Move IInitialisationSettings up to BHoM
Feb 14, 2024
80084ee
Promote UsageLogEntry to BHoM
Feb 14, 2024
bb94b45
Promote IInitialisationSettings interface to BHoM (#480)
Feb 15, 2024
1a661ae
Add calls to the before/after actions added in BHoM_Adapter
Feb 19, 2024
b40e1d0
Add calls to the before/after actions added in BHoM_Adapter (#481)
Feb 19, 2024
5ceec84
Add settings object for search settings within the UI
Feb 23, 2024
31d1d4f
Add objects for search settings
Feb 23, 2024
4d07764
Add Window UI project for containing and handling custom UIs for BHoM…
Feb 23, 2024
4955d62
Updates following testing. Change TypeList to be correct type list fo…
Feb 23, 2024
72d5849
Remove unnecessary headers
Feb 23, 2024
278d316
Tweaks following weekend testing
Feb 26, 2024
50d6d72
Restrict global search based on settings of unchecked toolkits
Feb 26, 2024
c4f86e8
Update project compliance
BHoMBot Feb 26, 2024
6f76fc4
Add option for selecting and unselecting all
Feb 26, 2024
3e50b16
Merge branch 'BHoM_UI-#215-Settings' of https://github.com/BHoM/BHoM_…
Feb 26, 2024
1bfe067
Resolve copyright compliance
BHoMBot Feb 26, 2024
0aabc92
Make window controlable with minimising and closing
Feb 26, 2024
8ed1988
Merge branch 'BHoM_UI-#215-Settings' of https://github.com/BHoM/BHoM_…
Feb 26, 2024
9d40804
Introduce settings options within the UI framework (#482)
Feb 27, 2024
cda75ec
Add ability to load settings
Feb 27, 2024
411b817
Ensure new items are created and null protection on existing items.
Feb 27, 2024
0f99220
Turn on recording errors as exceptions to help the loading of settings
Feb 27, 2024
e2b4e57
Update error message on exceptions being caught
Feb 27, 2024
ac8da09
Update method call for LoadSettingsFromFile
Feb 27, 2024
a353844
Add ability to load settings (#484)
Feb 27, 2024
d66e556
Update run to reset log suppression after running component
Mar 1, 2024
3981f2f
Changes following discussions with @isak-naslundbh and @tom-kingstone
Mar 1, 2024
6cda16d
Changes following discussions with @isak-naslundbh and @tom-kingstone
Mar 1, 2024
c49e518
Update run to reset log suppression after running component (#486)
Mar 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Helpers/InstantiateCaller.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -92,3 +92,4 @@ public static Caller InstantiateCaller(Type type)
}



3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Helpers/PossibleComponentItems.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -47,3 +47,4 @@ public static List<SearchItem> PossibleComponentItems()
}



3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Objects/DummyAccessor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -130,3 +130,4 @@ private T GetDummyObject<T>()




3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Objects/DummyCaller.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -76,3 +76,4 @@ public override object Run(List<object> inputs)




5 changes: 3 additions & 2 deletions .ci/code/UI_Test/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -55,5 +55,6 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.0.0.0")]
[assembly: AssemblyFileVersion("7.1.0.0")]


3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Verify/ComponentInstantiation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -87,3 +87,4 @@ public static TestResult ComponentInstantiation(SearchItem item)
}



3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Verify/ComponentReadWriteCycle.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -133,3 +133,4 @@ public static TestResult ComponentReadWriteCycle(SearchItem item)
}



3 changes: 2 additions & 1 deletion .ci/code/UI_Test/Verify/ComponentRunCycle.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -145,3 +145,4 @@ public static TestResult ComponentRunCycle(SearchItem item)
}



10 changes: 8 additions & 2 deletions BHoM_UI.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.1169
# Visual Studio Version 17
VisualStudioVersion = 17.9.34616.47
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BHoM_UI", "BHoM_UI\BHoM_UI.csproj", "{69F4F042-E23A-4673-AB32-3D787CFA976C}"
EndProject
Expand All @@ -12,6 +12,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UI_Engine", "UI_Engine\UI_E
{50D4C1ED-C16C-4365-A742-938BF49EC4B0} = {50D4C1ED-C16C-4365-A742-938BF49EC4B0}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BHoM_Windows_UI", "BHoM_Windows_UI\BHoM_Windows_UI.csproj", "{9BA156D1-851D-4267-A94F-6F238D17B634}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -30,6 +32,10 @@ Global
{565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{565DDBD0-5C04-4BE9-B57D-CE54C2124ABB}.Release|Any CPU.Build.0 = Release|Any CPU
{9BA156D1-851D-4267-A94F-6F238D17B634}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9BA156D1-851D-4267-A94F-6F238D17B634}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9BA156D1-851D-4267-A94F-6F238D17B634}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9BA156D1-851D-4267-A94F-6F238D17B634}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
3 changes: 2 additions & 1 deletion BHoM_UI/Caller/AddToMenu.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -82,3 +82,4 @@ public void SetSelectorMenu<M>(ItemSelectorMenu<M> selectorMenu)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/Compile.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -93,3 +93,4 @@ protected virtual void CompileMethod()




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/Core.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -189,3 +189,4 @@ protected void MarkAsModified(CallerUpdate update)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/IO_CRUD.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -197,3 +197,4 @@ public virtual bool CanUpdateInput(int index, string name)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/Read.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -222,3 +222,4 @@ protected object OldCreateMethodToType(string json, List<ParamInfo> inputParams,




22 changes: 19 additions & 3 deletions BHoM_UI/Caller/Run.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -78,7 +78,9 @@ public virtual object Run(List<object> inputs)
{
try
{
return m_CompiledFunc(inputs.ToArray());
var result = m_CompiledFunc(inputs.ToArray());
ResetLogSuppression();
return result;
}
catch (InvalidCastException e)
{
Expand All @@ -88,10 +90,15 @@ public virtual object Run(List<object> inputs)
// Try to update the generic method to fit the input types
MethodInfo method = Engine.Base.Compute.MakeGenericFromInputs(originalMethod, inputs.Select(x => x?.GetType()).ToList());
m_CompiledFunc = method.ToFunc();
return m_CompiledFunc(inputs.ToArray());
var result = m_CompiledFunc(inputs.ToArray());
ResetLogSuppression();
return result;
}
else
{
ResetLogSuppression();
throw e;
}
}
}
else if (InputParams.Count <= 0)
Expand Down Expand Up @@ -306,6 +313,14 @@ protected virtual bool ShouldCalculateNewResult(List<object> inputs, ref object
return true;
}

/*************************************/

protected void ResetLogSuppression()
{
BH.Engine.Base.Compute.StopSuppressRecordingEvents(); //Ensure suppression is reset in case the calling method forgot to do it
BH.Engine.Base.Compute.ThrowErrorsAsExceptions(false); //Reset throwing errors to whatever the user may have set it to prior to running this method
}


/*************************************/
/**** Private Fields ****/
Expand All @@ -320,3 +335,4 @@ protected virtual bool ShouldCalculateNewResult(List<object> inputs, ref object




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/SetComponentDetails.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -88,3 +88,4 @@ protected virtual void SetComponentDetails(object item)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/SetInputs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -116,3 +116,4 @@ protected virtual void SetInputs(object item)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/SetItem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -120,3 +120,4 @@ protected virtual object FromGeneric(object item)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/SetOutputs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -124,3 +124,4 @@ protected virtual void SetOutputs(object item)




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/SetParamSelectionMenu.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -89,3 +89,4 @@ protected virtual void SetOutputSelectionMenu()




3 changes: 2 additions & 1 deletion BHoM_UI/Caller/Write.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -64,3 +64,4 @@ public virtual string Write()




3 changes: 2 additions & 1 deletion BHoM_UI/CallerTemplates/MultiChoiceCaller.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -141,3 +141,4 @@ private void EnumValueSelected(object sender, object e)




3 changes: 2 additions & 1 deletion BHoM_UI/Components/Adapter/CreateAdapter.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -65,3 +65,4 @@ public CreateAdapterCaller() : base()




3 changes: 2 additions & 1 deletion BHoM_UI/Components/Adapter/CreateRequest.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of the Buildings and Habitats object Model (BHoM)
* Copyright (c) 2015 - 2023, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2024, the respective contributors. All rights reserved.
*
* Each contributor holds copyright over their respective contributions.
* The project versioning (Git) records all such contribution source information.
Expand Down Expand Up @@ -69,3 +69,4 @@ public CreateRequestCaller() : base()




Loading
Loading