Skip to content

Commit c4b20a7

Browse files
authored
9.1 Deployment (#340)
2 parents c065c9b + 767db4b commit c4b20a7

140 files changed

Lines changed: 3214 additions & 3026 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LadybugTools_Adapter/AdapterActions/Execute.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -89,3 +89,4 @@ private List<object> RunCommand(IExecuteCommand command, ActionConfig actionConf
8989
}
9090

9191

92+

LadybugTools_Adapter/AdapterActions/Execute/DiurnalPlotCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -109,3 +109,4 @@ private List<object> RunCommand(DiurnalPlotCommand command, ActionConfig actionC
109109
}
110110
}
111111
}
112+

LadybugTools_Adapter/AdapterActions/Execute/EPWToCSVCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -96,3 +96,4 @@ private List<object> RunCommand(EPWToCSVCommand command, ActionConfig actionConf
9696
}
9797
}
9898
}
99+

LadybugTools_Adapter/AdapterActions/Execute/FacadeCondensationRiskCommand.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -64,7 +64,6 @@ private List<object> RunCommand(FacadeCondensationRiskCommand command, ActionCon
6464
{
6565
thresholds = command.Thresholds;
6666
}
67-
string thresholdsStr = string.Join(" ", thresholds);
6867

6968
string epwFile = System.IO.Path.GetFullPath(command.EPWFile.GetFullFileName());
7069

@@ -74,9 +73,11 @@ private List<object> RunCommand(FacadeCondensationRiskCommand command, ActionCon
7473
else
7574
commandArg = "plot/facade_condensation_risk_chart";
7675

77-
// run the process
78-
List<string> args = new List<string>() { "-command", commandArg, "-e", epwFile.Replace('\\', '/'), "-t", thresholdsStr, "-p", command.OutputLocation.Replace('\\', '/') };
76+
//construct args: insert thresholds as a range as concatenating them into a space delimited string causes the numbers to be wrapped in quotes which breaks the python argument parser
77+
List<string> args = new List<string>() { "-command", commandArg, "-e", epwFile.Replace('\\', '/'), "-t", "-p", command.OutputLocation.Replace('\\', '/') };
78+
args.InsertRange(args.IndexOf("-t") + 1, thresholds.Select(x => x.ToString()));
7979

80+
// run the process
8081
string result = "";
8182
bool success;
8283

@@ -110,3 +111,4 @@ private List<object> RunCommand(FacadeCondensationRiskCommand command, ActionCon
110111
}
111112
}
112113
}
114+

LadybugTools_Adapter/AdapterActions/Execute/GEMToHBJSONCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -95,3 +95,4 @@ public List<object> RunCommand(GEMToHBJSONCommand command, ActionConfig actionCo
9595
}
9696
}
9797
}
98+

LadybugTools_Adapter/AdapterActions/Execute/GetMaterialCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -86,3 +86,4 @@ private List<object> RunCommand(GetMaterialCommand command, ActionConfig actionC
8686
}
8787
}
8888
}
89+

LadybugTools_Adapter/AdapterActions/Execute/GetTypologyCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -87,3 +87,4 @@ private List<object> RunCommand(GetTypologyCommand command, ActionConfig actionC
8787
}
8888
}
8989
}
90+

LadybugTools_Adapter/AdapterActions/Execute/HBJSONToGEMCommand.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -79,19 +79,20 @@ public List<object> RunCommand(HBJSONToGEMCommand command, ActionConfig actionCo
7979
}
8080

8181
//as the file output is hard to verify by itself, check that no errors got output to stderr log
82-
success &= !result.Contains("Traceback (most recent call last):");
82+
success &= (!result.Contains("Traceback (most recent call last):") || result.Length == 0);
8383

8484
if (!success)
8585
{
8686
BH.Engine.Base.Compute.RecordError($"An error occurred while converting the file to gem.\nPython output: {result}.");
8787
return new List<object>();
8888
}
8989

90-
string outputFileName = Path.Combine(command.OutputDirectory, Path.GetFileNameWithoutExtension(command.HBJSONFile.FileName) + ".hbjson");
90+
string outputFileName = Path.Combine(command.OutputDirectory, Path.GetFileNameWithoutExtension(command.HBJSONFile.FileName) + ".gem");
9191
File.WriteAllText(outputFileName, result);
9292

9393
m_executeSuccess = success;
9494
return new List<object> { outputFileName };
9595
}
9696
}
9797
}
98+

LadybugTools_Adapter/AdapterActions/Execute/HeatPlotCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -98,3 +98,4 @@ private List<object> RunCommand(HeatPlotCommand command, ActionConfig actionConf
9898
}
9999
}
100100
}
101+

LadybugTools_Adapter/AdapterActions/Execute/RunExternalComfortCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/*
1+
/*
22
* This file is part of the Buildings and Habitats object Model (BHoM)
3-
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
3+
* Copyright (c) 2015 - 2026, the respective contributors. All rights reserved.
44
*
55
* Each contributor holds copyright over their respective contributions.
66
* The project versioning (Git) records all such contribution source information.
@@ -85,3 +85,4 @@ private List<object> RunCommand(RunExternalComfortCommand command, ActionConfig
8585
}
8686
}
8787
}
88+

0 commit comments

Comments
 (0)