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 #176

Merged
merged 62 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
eb0a2d2
Upgrade AssemblyFileVersion to 7.1.0.0
BHoMBot Dec 22, 2023
eeeead6
Update AssemblyFileVersion to 7.1 (#162)
Dec 22, 2023
164c116
Remove 7.0 Versioning
BHoMBot Dec 22, 2023
4bffb18
Remove 7.0 PreviousVersion Attributes (#163)
Dec 22, 2023
de93ff0
Uptick copyright headers to 2024
BHoMBot Jan 2, 2024
4fd0934
Update Copyright Headers to 2024 (#164)
Jan 2, 2024
584a816
Update readme link
Jan 3, 2024
f596172
Update readme link (#165)
Jan 3, 2024
867dbe5
fixed openmeteo wind speed conversion
tg359 Jan 18, 2024
f0627c1
Fixed openmeteo wind speed conversion (#167)
Jan 25, 2024
b4aec62
made PythonEnvironment a private property
Tom-Kingstone Jan 31, 2024
893ae30
Python file and wrapper added, ready to move to adapter
jamesramsden-bh Jan 31, 2024
7f0779f
added an execute command that currently mirrors the heatplot compute …
Tom-Kingstone Jan 31, 2024
ab9097b
rebased to use m_environment
Tom-Kingstone Feb 1, 2024
22e53e2
added description attributes to the HeatPlot command
Tom-Kingstone Feb 1, 2024
e5cab4c
fix execute returning failure when successful
Tom-Kingstone Feb 1, 2024
9bdaa43
added colour map validation
Tom-Kingstone Feb 1, 2024
aafb455
fixed not importing matplotlib on heatmaps
Tom-Kingstone Feb 1, 2024
45cb1d9
Wrapper for windroses now added to compute
jamesramsden-bh Jan 31, 2024
a47ec0d
moved wind rose plot to adapter execute action
Tom-Kingstone Feb 1, 2024
0ea3b2e
fix execute returning false when actually successful.
Tom-Kingstone Feb 1, 2024
3a56ed8
changed windrose command to use AnalysisPeriod
Tom-Kingstone Feb 1, 2024
1b40ba6
made all args for windrose required args, as this method is only goin…
Tom-Kingstone Feb 1, 2024
43c0a85
added validation for colour maps
Tom-Kingstone Feb 1, 2024
c39f290
Adapter: made LBT PythonEnvironment a private property (#172)
Feb 1, 2024
e8d6ab7
Added UTCI wrapper and compute method
jamesramsden-bh Feb 2, 2024
8429b64
Bin colour count validation added
jamesramsden-bh Feb 2, 2024
77e45e4
initial conversion to adapter
Tom-Kingstone Feb 2, 2024
f0bc9c8
made compile and run
Tom-Kingstone Feb 5, 2024
4e87fbd
removed template compute method
Tom-Kingstone Feb 5, 2024
d16a626
fix energy materials to be the interface, rather than just EnergyMate…
Tom-Kingstone Feb 6, 2024
c5f2505
removed unnecessary wind multiplier and evaporative cooling effect, a…
Tom-Kingstone Feb 6, 2024
241ecf6
added back wind speed multiplier as it was not reftected in target_wi…
Tom-Kingstone Feb 6, 2024
0350f26
added description attributes to the UTCI command
Tom-Kingstone Feb 6, 2024
79044d2
Update LadybugTools_oM/ExecuteCommands/RunHeatPlotCommand.cs
Tom-Kingstone Feb 8, 2024
7db611a
renamed objects, added interface for simulations that enforces an EPW…
Tom-Kingstone Feb 8, 2024
bbd3ef6
renamed EpwKey to EPWKey, and added DisplayText attributes to enum va…
Tom-Kingstone Feb 8, 2024
eec70cc
fix for wind speed not being input correctly
Tom-Kingstone Feb 13, 2024
c46f308
added converter between System.Color and hex codes for a given colour…
Tom-Kingstone Feb 19, 2024
cac7eeb
changed to use System.Drawing.Color instead of strings for bin colour…
Tom-Kingstone Feb 19, 2024
6caffb0
made use of DisplayText attributes when sending EPW key to python
Tom-Kingstone Feb 19, 2024
b734a5f
added DisplayText attributes to colourmap enum
Tom-Kingstone Feb 20, 2024
c6e7b5c
added colourmap validity check to methods which use it.
Tom-Kingstone Feb 20, 2024
1611d07
better colour map enum, still to be ordered alphabetically
Tom-Kingstone Feb 20, 2024
6552a2d
enum must be alphabetised, @FraserGreenroyd says so
Tom-Kingstone Feb 20, 2024
68eff28
versioning for EpwFile to EPWFile
Tom-Kingstone Feb 20, 2024
575de4a
Resolve copyright compliance
BHoMBot Feb 20, 2024
f5c5454
renamed versioning file
Tom-Kingstone Feb 20, 2024
f3b9dc9
added descriptions to colour convert methods
Tom-Kingstone Feb 23, 2024
ac7970b
got colours to work for UTCI heat plot
Tom-Kingstone Feb 23, 2024
601b96a
added validation for AnalysisPeriod being null
Tom-Kingstone Feb 23, 2024
f178a01
suppress error logs when checking colour map validity
Tom-Kingstone Feb 29, 2024
1cbe54b
fixed issue when colour map input is null
Tom-Kingstone Feb 29, 2024
a71ca35
Apply suggestions from code review
Tom-Kingstone Feb 29, 2024
97a7a08
other suggestions from code review
Tom-Kingstone Feb 29, 2024
403ff90
final suggestions
Tom-Kingstone Feb 29, 2024
921641f
Resolve copyright compliance
BHoMBot Feb 29, 2024
55f5cb3
LadybugTools_Adapter: Added adapter execute methods that generate plo…
Feb 29, 2024
7261641
fixed save_path check to include empty string
Tom-Kingstone Mar 7, 2024
2ad6e16
Fixed heatplot method not returning base64 encoded image (#175)
jamesramsden-bh Mar 12, 2024
95c6737
fixed key error
Tom-Kingstone Mar 13, 2024
78c068e
Updated OpenMeteoVariable test script (#180)
Mar 13, 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
187 changes: 170 additions & 17 deletions LadybugTools_Adapter/AdapterActions/Execute.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 @@ -34,6 +34,11 @@
using System.IO;
using System.Linq;
using System.Text;
using BH.Engine.Base;
using System.Drawing;
using BH.Engine.Serialiser;
using BH.Engine.LadyBugTools;
using System.Reflection;

namespace BH.Adapter.LadybugTools
{
Expand Down Expand Up @@ -74,7 +79,6 @@ public List<object> IRunCommand(IExecuteCommand command)

private List<object> RunCommand(GetMaterialCommand command)
{
PythonEnvironment env = Engine.LadybugTools.Compute.InstallPythonEnv_LBT(true);
LadybugConfig config = new LadybugConfig()
{
JsonFile = new FileSettings()
Expand All @@ -88,7 +92,7 @@ private List<object> RunCommand(GetMaterialCommand command)
{
string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "get_material.py");

string cmdCommand = $"{env.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
string cmdCommand = $"{m_environment.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";

Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);
}
Expand All @@ -103,7 +107,6 @@ private List<object> RunCommand(GetMaterialCommand command)

private List<object> RunCommand(GetTypologyCommand command)
{
PythonEnvironment env = Engine.LadybugTools.Compute.InstallPythonEnv_LBT(true);
LadybugConfig config = new LadybugConfig()
{
JsonFile = new FileSettings()
Expand All @@ -117,7 +120,7 @@ private List<object> RunCommand(GetTypologyCommand command)
{
string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "get_typology.py");

string cmdCommand = $"{env.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
string cmdCommand = $"{m_environment.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";

Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);
}
Expand All @@ -133,15 +136,15 @@ private List<object> RunCommand(GetTypologyCommand command)
private List<object> RunCommand(RunSimulationCommand command)
{
// validation prior to passing to Python
if (command.EpwFile == null)
if (command.EPWFile == null)
{
BH.Engine.Base.Compute.RecordError($"{nameof(command.EpwFile)} input cannot be null.");
BH.Engine.Base.Compute.RecordError($"{nameof(command.EPWFile)} input cannot be null.");
return null;
}

if (!File.Exists(command.EpwFile.GetFullFileName()))
if (!File.Exists(command.EPWFile.GetFullFileName()))
{
BH.Engine.Base.Compute.RecordError($"{command.EpwFile.GetFullFileName()} does not exist.");
BH.Engine.Base.Compute.RecordError($"FIle '{command.EPWFile.GetFullFileName()}' does not exist.");
return null;
}

Expand Down Expand Up @@ -170,21 +173,20 @@ private List<object> RunCommand(RunSimulationCommand command)
// construct the base object and file to be passed to Python for simulation
SimulationResult simulationResult = new SimulationResult()
{
EpwFile = Path.GetFullPath(command.EpwFile.GetFullFileName()).Replace(@"\", "/"),
EpwFile = Path.GetFullPath(command.EPWFile.GetFullFileName()).Replace(@"\", "/"),
GroundMaterial = command.GroundMaterial,
ShadeMaterial = command.ShadeMaterial,
Name = Engine.LadybugTools.Compute.SimulationID(command.EpwFile.GetFullFileName(), command.GroundMaterial, command.ShadeMaterial)
Name = Engine.LadybugTools.Compute.SimulationID(command.EPWFile.GetFullFileName(), command.GroundMaterial, command.ShadeMaterial)
};

// push object to json file
Push(new List<SimulationResult>() { simulationResult }, actionConfig: config);

// locate the Python executable and file containing the simulation code
PythonEnvironment env = Engine.LadybugTools.Compute.InstallPythonEnv_LBT(true);
// locate the Python file containing the simulation code
string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "simulation_result.py");

// run the simulation
string cmdCommand = $"{env.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
string cmdCommand = $"{m_environment.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);

// reload from Python results
Expand Down Expand Up @@ -232,12 +234,11 @@ private List<object> RunCommand(RunExternalComfortCommand command)
// push objects to json file
Push(new List<ExternalComfort>() { externalComfort }, actionConfig: config);

// locate the Python executable and file containing the simulation code
PythonEnvironment env = Engine.LadybugTools.Compute.InstallPythonEnv_LBT(true);
// locate the Python file containing the simulation code
string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped", "external_comfort.py");

// run the calculation
string cmdCommand = $"{env.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
string cmdCommand = $"{m_environment.Executable} {script} -j \"{config.JsonFile.GetFullFileName()}\"";
Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);

// reload from Python results
Expand All @@ -250,6 +251,157 @@ private List<object> RunCommand(RunExternalComfortCommand command)
return externalComfortPopulated;
}

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

private List<object> RunCommand(HeatPlotCommand command)
{
if (command.EPWFile == null)
{
BH.Engine.Base.Compute.RecordError($"{nameof(command.EPWFile)} input cannot be null.");
return null;
}

if (!System.IO.File.Exists(command.EPWFile.GetFullFileName()))
{
BH.Engine.Base.Compute.RecordError($"File '{command.EPWFile}' does not exist.");
return null;
}

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

string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped\\plot", "heatmap.py");

//check if the colourmap is valid for user warning, but run with input anyway as the map could be defined separately.
string colourMap = command.ColourMap;
if (colourMap.ColourMapValidity())
colourMap = colourMap.ToColourMap().FromColourMap();

// run the process
string cmdCommand = $"{m_environment.Executable} {script} -e \"{epwFile}\" -dtk \"{command.EPWKey.ToText()}\" -cmap \"{colourMap}\" -p \"{command.OutputLocation}\"";
string result = Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);

m_executeSuccess = true;
return new List<object>() { result };
}

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

private List<object> RunCommand(WindroseCommand command)
{
if (command.EPWFile == null)
{
BH.Engine.Base.Compute.RecordError($"{nameof(command.EPWFile)} input cannot be null.");
return null;
}

if (!System.IO.File.Exists(command.EPWFile.GetFullFileName()))
{
BH.Engine.Base.Compute.RecordError($"File '{command.EPWFile.GetFullFileName()}' does not exist.");
return null;
}

if (command.AnalysisPeriod == null)
{
BH.Engine.Base.Compute.RecordError($"Please input a valid analysis period to run this command.");
return null;
}

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

string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped\\plot", "windrose.py");

//check if the colourmap is valid for user warning, but run with input anyway as the map could be defined separately.
string colourMap = command.ColourMap;
if (colourMap.ColourMapValidity())
colourMap = colourMap.ToColourMap().FromColourMap();

// run the process
string cmdCommand = $"{m_environment.Executable} {script} -e \"{epwFile}\" -ap \"{command.AnalysisPeriod.FromBHoM().Replace("\"", "\\\"")}\" -cmap \"{colourMap}\" -bins \"{command.NumberOfDirectionBins}\" -p \"{command.OutputLocation}\"";
string result = Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);

m_executeSuccess = true;
return new List<object> { result };
}

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

private List<object> RunCommand(UTCIHeatPlotCommand command)
{
if (command.EPWFile == null)
{
BH.Engine.Base.Compute.RecordError($"{nameof(command.EPWFile)} input cannot be null.");
return null;
}

if (!System.IO.File.Exists(command.EPWFile.GetFullFileName()))
{
BH.Engine.Base.Compute.RecordError($"File '{command.EPWFile.GetFullFileName()}' does not exist.");
return null;
}

if (command.GroundMaterial == null)
{
BH.Engine.Base.Compute.RecordError($"Please input a valid ground material to run this command.");
return null;
}

if (command.ShadeMaterial == null)
{
BH.Engine.Base.Compute.RecordError($"Please input a valid shade material to run this command.");
return null;
}

if (command.Typology == null)
{
BH.Engine.Base.Compute.RecordError($"Please input a valid Typology to run this command.");
}

if (!(command.BinColours.Count == 10 || command.BinColours.Count == 0))
{
BH.Engine.Base.Compute.RecordError($"When overriding bin colours 10 colours must be provided, but {command.BinColours.Count} colours were provided instead.");
return null;
}
List<string> colours = command.BinColours.Select(x => x.ToHexCode()).ToList();

string hexColours = $"[\"{string.Join("\",\"", colours)}\"]";
if (hexColours == "[\"\"]")
hexColours = "[]";

Dictionary<string, string> inputObjects = new Dictionary<string, string>()
{
{ "ground_material", command.GroundMaterial.FromBHoM() },
{ "shade_material", command.ShadeMaterial.FromBHoM() },
{ "typology", command.Typology.FromBHoM() },
{ "bin_colours", hexColours }
};

string argFile = Path.GetTempFileName();
File.WriteAllText(argFile, inputObjects.ToJson());

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

string script = Path.Combine(Engine.Python.Query.DirectoryCode(), "LadybugTools_Toolkit\\src\\ladybugtools_toolkit\\bhom\\wrapped\\plot", "utci_heatmap.py");

// run the process
string cmdCommand = $"{m_environment.Executable} \"{script}\" -e \"{epwFile}\" -in \"{argFile}\" -ws \"{command.WindSpeedMultiplier}\" -sp \"{command.OutputLocation}\"";
string result = "";

try
{
result = Engine.Python.Compute.RunCommandStdout(command: cmdCommand, hideWindows: true);
}
catch (Exception ex)
{
BH.Engine.Base.Compute.RecordError(ex, "An error occurred while running some python.");
}
finally
{
File.Delete(argFile);
}

return new List<object> { result.Split('\n').Last() };
}

/**************************************************/
/* Private methods - Fallback */
/**************************************************/
Expand All @@ -261,3 +413,4 @@ private List<object> RunCommand(IExecuteCommand command)
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/AdapterActions/Pull.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 @@ -70,3 +70,4 @@ public override IEnumerable<object> Pull(IRequest request, PullType pullType = P
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/AdapterActions/Push.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 @@ -68,3 +68,4 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/CRUD/CreateLadybug.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 @@ -51,3 +51,4 @@ public static void CreateLadybug(List<ILadybugTools> objects, LadybugConfig conf
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/CRUD/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 @@ -41,3 +41,4 @@ protected override IEnumerable<IBHoMObject> IRead(Type type, IList indices = nul
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/Convert/Collections/EPW.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 @@ -38,10 +38,10 @@
Location location = new Location();
Dictionary<string, object> metaData = new Dictionary<string, object>();

try
{
if (oldObject["location"].GetType() == typeof(CustomObject))
oldObject["location"] = (oldObject["location"] as CustomObject).CustomData;

Check warning on line 44 in LadybugTools_Adapter/Convert/Collections/EPW.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/EPW.cs#L43-L44

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData
location = ToLocation(oldObject["location"] as Dictionary<string, object>);
}
catch (Exception ex)
Expand All @@ -49,10 +49,10 @@
BH.Engine.Base.Compute.RecordError($"An error occurred when reading the Location of the EPW. returning a default Location.\n The error: {ex}");
}

Check warning on line 50 in LadybugTools_Adapter/Convert/Collections/EPW.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/EPW.cs#L41-L50

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData

try
{
if (oldObject["metadata"].GetType() == typeof(CustomObject))
oldObject["metadata"] = (oldObject["metadata"] as CustomObject).CustomData;

Check warning on line 55 in LadybugTools_Adapter/Convert/Collections/EPW.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/EPW.cs#L54-L55

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData
metaData = (Dictionary<string, object>)oldObject["metadata"];
}
catch (Exception ex)
Expand All @@ -62,14 +62,14 @@

List<BH.oM.LadybugTools.HourlyContinuousCollection> collections = new List<BH.oM.LadybugTools.HourlyContinuousCollection>();

if (oldObject.ContainsKey("data_collections"))
{
foreach (var collection in oldObject["data_collections"] as List<object>)
{
if (collection.GetType() == typeof(CustomObject))
collections.Add(ToHourlyContinuousCollection((collection as CustomObject).CustomData));
else
collections.Add(ToHourlyContinuousCollection(collection as Dictionary<string, object>));

Check warning on line 72 in LadybugTools_Adapter/Convert/Collections/EPW.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/EPW.cs#L69-L72

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData
}

Check warning on line 73 in LadybugTools_Adapter/Convert/Collections/EPW.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/EPW.cs#L67-L73

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData
}
else
Expand Down Expand Up @@ -102,3 +102,4 @@
}
}
}

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 @@ -37,10 +37,10 @@
{
Header header = new Header();
List<string> hourlyValues = new List<string>();
try
{
if (oldObject["header"].GetType() == typeof(CustomObject))
oldObject["header"] = (oldObject["header"] as CustomObject).CustomData;

Check warning on line 43 in LadybugTools_Adapter/Convert/Collections/HourlyContinuousCollection.cs

View check run for this annotation

BHoMBot-CI / beta-code-compliance

LadybugTools_Adapter/Convert/Collections/HourlyContinuousCollection.cs#L42-L43

The use of CustomData within the code is discouraged except in circumstances where volatile data is being used. - For more information see https://bhom.xyz/documentation/DevOps/Code%20Compliance%20and%20CI/Compliance%20Checks/IsUsingCustomData
header = ToHeader(oldObject["header"] as Dictionary<string, object>);
}
catch (Exception ex)
Expand Down Expand Up @@ -80,3 +80,4 @@
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/Convert/Constructions/EnergyMaterial.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 @@ -150,3 +150,4 @@ public static Dictionary<string, object> FromEnergyMaterial(BH.oM.LadybugTools.E
}
}
}

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 @@ -219,3 +219,4 @@ public static Dictionary<string, object> FromEnergyMaterialVegetation(BH.oM.Lady
}
}
}

3 changes: 2 additions & 1 deletion LadybugTools_Adapter/Convert/FromBHoM.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 @@ -109,3 +109,4 @@ private static Dictionary<string, object> Jsonify(this ILadybugTools obj)
}
}
}

Loading
Loading