From c575fe9a2d7311d6dd56896acd1caaa84909dc3b Mon Sep 17 00:00:00 2001 From: BHoMBot Date: Tue, 25 Jun 2024 13:54:00 +0200 Subject: [PATCH 1/3] Upgrade AssemblyFileVersion to 7.3.0.0 --- CarbonQueryDatabase_Adapter/Properties/AssemblyInfo.cs | 2 +- CarbonQueryDatabase_Engine/Properties/AssemblyInfo.cs | 2 +- CarbonQueryDatabase_oM/Properties/AssemblyInfo.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CarbonQueryDatabase_Adapter/Properties/AssemblyInfo.cs b/CarbonQueryDatabase_Adapter/Properties/AssemblyInfo.cs index 6a06846..83fe308 100644 --- a/CarbonQueryDatabase_Adapter/Properties/AssemblyInfo.cs +++ b/CarbonQueryDatabase_Adapter/Properties/AssemblyInfo.cs @@ -55,7 +55,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.2.0.0")] +[assembly: AssemblyFileVersion("7.3.0.0")] diff --git a/CarbonQueryDatabase_Engine/Properties/AssemblyInfo.cs b/CarbonQueryDatabase_Engine/Properties/AssemblyInfo.cs index 48f232a..9332e36 100644 --- a/CarbonQueryDatabase_Engine/Properties/AssemblyInfo.cs +++ b/CarbonQueryDatabase_Engine/Properties/AssemblyInfo.cs @@ -55,7 +55,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.2.0.0")] +[assembly: AssemblyFileVersion("7.3.0.0")] diff --git a/CarbonQueryDatabase_oM/Properties/AssemblyInfo.cs b/CarbonQueryDatabase_oM/Properties/AssemblyInfo.cs index ff8f440..e6525cf 100644 --- a/CarbonQueryDatabase_oM/Properties/AssemblyInfo.cs +++ b/CarbonQueryDatabase_oM/Properties/AssemblyInfo.cs @@ -55,7 +55,7 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("7.0.0.0")] -[assembly: AssemblyFileVersion("7.2.0.0")] +[assembly: AssemblyFileVersion("7.3.0.0")] From 6001fe55782a140e093bc0f425c0471a724cdda7 Mon Sep 17 00:00:00 2001 From: Michael Hoehn Date: Wed, 31 Jul 2024 17:23:36 +0100 Subject: [PATCH 2/3] lazy fix --- CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs b/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs index 31aa122..25bc45b 100644 --- a/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs +++ b/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs @@ -62,7 +62,7 @@ public static EnvironmentalProductDeclaration ToEnvironmentalProductDeclaration( double density = ConvertToSI(densityVal, densityUnits); string gwp = obj.PropertyValue("gwp")?.ToString() ?? ""; double gwpVal = (gwp == "") ? double.NaN : System.Convert.ToDouble(gwp.Substring(0, gwp.IndexOf(" "))) * epdUnitMult; - int lifespan = (int)(obj.PropertyValue("reference_service_life") ?? 0); + // lifespan = (int)(obj.PropertyValue("reference_service_life") ?? 0); int referenceYear = int.TryParse(obj.PropertyValue("date_of_issue")?.ToString() ?? "", out result) ? result : 0; string publisherNames = ""; @@ -98,7 +98,7 @@ public static EnvironmentalProductDeclaration ToEnvironmentalProductDeclaration( Id = obj.PropertyValue("id")?.ToString() ?? "", IndustryStandards = standards != null ? standards.ToList() : new List(), Jurisdiction = jurisdictionNames, - LifeSpan = lifespan, + //LifeSpan = lifespan, Manufacturer = obj.PropertyValue("manufacturer.name")?.ToString() ?? "", PlantName = obj.PropertyValue("plant.name")?.ToString() ?? "", PostalCode = int.TryParse(obj.PropertyValue("plant.postal_code")?.ToString() ?? "", out result) ? result : 0, From 9eb68e8dc86a46a66409dec708f475672db0f992 Mon Sep 17 00:00:00 2001 From: Michael Hoehn Date: Thu, 1 Aug 2024 09:32:48 +0100 Subject: [PATCH 3/3] trycatch EC3 API returns a string for this property and will break --- CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs b/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs index 25bc45b..197bfd0 100644 --- a/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs +++ b/CarbonQueryDatabase_Adapter/Convert/ToBHoM.cs @@ -62,7 +62,7 @@ public static EnvironmentalProductDeclaration ToEnvironmentalProductDeclaration( double density = ConvertToSI(densityVal, densityUnits); string gwp = obj.PropertyValue("gwp")?.ToString() ?? ""; double gwpVal = (gwp == "") ? double.NaN : System.Convert.ToDouble(gwp.Substring(0, gwp.IndexOf(" "))) * epdUnitMult; - // lifespan = (int)(obj.PropertyValue("reference_service_life") ?? 0); + int lifespan = int.TryParse(obj.PropertyValue("reference_service_life")?.ToString() ?? "", out result) ? result : 0; int referenceYear = int.TryParse(obj.PropertyValue("date_of_issue")?.ToString() ?? "", out result) ? result : 0; string publisherNames = ""; @@ -98,7 +98,7 @@ public static EnvironmentalProductDeclaration ToEnvironmentalProductDeclaration( Id = obj.PropertyValue("id")?.ToString() ?? "", IndustryStandards = standards != null ? standards.ToList() : new List(), Jurisdiction = jurisdictionNames, - //LifeSpan = lifespan, + LifeSpan = lifespan, Manufacturer = obj.PropertyValue("manufacturer.name")?.ToString() ?? "", PlantName = obj.PropertyValue("plant.name")?.ToString() ?? "", PostalCode = int.TryParse(obj.PropertyValue("plant.postal_code")?.ToString() ?? "", out result) ? result : 0,