Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4919b18
Add versioning for methods in Revit where int was changed to long
IsakNaslundBh Oct 29, 2026
c747cc3
Add versioning for HasValue
IsakNaslundBh Oct 29, 2026
e071661
Add Versioning for Descirption method for changing from QuantityAttri…
IsakNaslundBh Oct 29, 2026
4ab2734
Add versioning for various Facade methods changing from List to IEnum…
IsakNaslundBh Oct 29, 2026
98af7b7
Changing from BHoMObject to IBHoMObject
IsakNaslundBh Oct 29, 2026
04fab88
Explicitly re-point ConcreteSection geometry method to the IGeometric…
IsakNaslundBh Oct 29, 2026
4514370
IsValid to IsValidName
IsakNaslundBh Oct 29, 2026
c5c4807
Int32 to Int64 (int to long) for a couple of more methods related to …
IsakNaslundBh Oct 29, 2026
147604b
Some List to Ienumerable as well as concrete class to interface updates
IsakNaslundBh Oct 29, 2026
44da9e6
Change from namespace to explicit type versioning
IsakNaslundBh Nov 3, 2026
b0e5792
Adding versioning that for some reason was not collected with previou…
IsakNaslundBh Nov 3, 2026
203eaba
Fix verisoning for mering Security and ICT projects not fully captured
IsakNaslundBh Nov 3, 2026
08c5d6f
Add message for deleted for various FilterByParameter methods that wh…
IsakNaslundBh Nov 3, 2026
426f3aa
Message for deleted for method deleted with support for Revit2021 rem…
IsakNaslundBh Nov 3, 2026
f781c1c
Correct namespace for message for deleted
IsakNaslundBh Nov 3, 2026
4ed9b99
Add custom upgrader for ContextElements
IsakNaslundBh Nov 3, 2026
5355b5c
Correctly handle the IssueLabels migration from central Datasets
IsakNaslundBh Nov 3, 2026
12416d4
Add correct versioning for GSA adapter
IsakNaslundBh Nov 3, 2026
2291c4d
Change target runtime for testrunner from net8.0 to net8.0-windows an…
IsakNaslundBh Nov 3, 2026
cccafb1
Add overload for FromJsonDatasets to allow control over testfolder an…
IsakNaslundBh Nov 3, 2026
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
6 changes: 4 additions & 2 deletions .ci/code/TestRunner/TestRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<Description>https://github.com/BHoM/Versioning_Toolkit</Description>
<TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
<Description>https://github.com/BHoM/Versioning_Toolkit</Description>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
1 change: 1 addition & 0 deletions .ci/code/Versioning_Test/Datasets/8.3/Datasets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ LifeCycleAssessment\WasteRates\ASHRAE Standard Waste Rates
LifeCycleAssessment\WasteRates\RICS Standard Waste Rates
MEP\PlumbingFixtureFlow_LEED
MEP\PlumbingFixtureUsage_LEED
Planning\Labels\IssueLabels
Revit\FamilyMaps\BHoM Default FamilyMaps
Revit\ParameterMaps\BHoM Default ParameterMaps
Revit\ParameterMaps\BuroHappold Default ParameterMaps
Expand Down
29 changes: 20 additions & 9 deletions .ci/code/Versioning_Test/Verify/FromJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;

namespace BH.Test.Versioning
Expand All @@ -43,19 +44,29 @@ public static partial class Verify
public static TestResult FromJsonDatasets(bool testAll = false)
{
string testFolder = @"C:\ProgramData\BHoM\Datasets\TestSets\Versioning";
string failureDumpDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());

return FromJsonDatasets(testAll, testFolder, failureDumpDir);
}

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

public static TestResult FromJsonDatasets(bool testAll, string testFolder, string failureDumpDir)
{
List<string> versions = new List<string> { "9.3" };
if (testAll)
versions.AddRange(new List<string> { "9.2", "9.1", "9.0", "8.3", "8.2", "8.1", "8.0", "7.3", "7.2", "7.1", "7.0", "6.3", "6.2", "6.1", "6.0", "5.3", "5.2", "5.1", "5.0", "4.3", "4.2", "4.1", "4.0", "3.3" });

string exceptions = "Grasshopper|Rhinoceros";

string failureDumpDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
Directory.CreateDirectory(failureDumpDir);
if (versions.Count == 1)
Console.WriteLine($"Failures are dumped in {failureDumpDir} directory.");
else
Console.WriteLine($"Multiple versions are being tested, failures per each are dumped in a correspondent subfolder of {failureDumpDir} directory.");

if (!string.IsNullOrWhiteSpace(failureDumpDir))
{
Directory.CreateDirectory(failureDumpDir);
if (versions.Count == 1)
Console.WriteLine($"Failures are dumped in {failureDumpDir} directory.");
else
Console.WriteLine($"Multiple versions are being tested, failures per each are dumped in a correspondent subfolder of {failureDumpDir} directory.");
}
// Test all the BHoM versions available
List<TestResult> results = new List<TestResult>();
foreach (string version in versions)
Expand All @@ -64,7 +75,7 @@ public static TestResult FromJsonDatasets(bool testAll = false)
if (!string.IsNullOrWhiteSpace(dumpDir) && versions.Count > 1)
dumpDir = Path.Combine(dumpDir, version);

results.Add(FromJsonDataset(Path.Combine(testFolder, version), exceptions, failureDumpDir));
results.Add(FromJsonDataset(Path.Combine(testFolder, version), exceptions, dumpDir));
}

// Generate the result message
Expand Down Expand Up @@ -184,7 +195,7 @@ public static TestResult FromJsonDataset(string testFolder, string exceptions =
Directory.CreateDirectory(failureDumpDir);
foreach ((string, List<string>) failure in failures)
{
File.WriteAllLines(Path.Combine(failureDumpDir, $"{failure.Item1}.txt"), failure.Item2);
File.WriteAllLines(Path.Combine(failureDumpDir, $"{failure.Item1}.json"), failure.Item2);
}
}
catch (Exception ex)
Expand Down
20 changes: 20 additions & 0 deletions BHoMUpgrades/CustomUpgrades/v92.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,25 @@ public static Dictionary<string, object> UpgradeSearchSettings(Dictionary<string
}

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

[VersioningTarget("BH.oM.Tagging.AreaContextElement")]
[VersioningTarget("BH.oM.Tagging.CurveContextElement")]
[VersioningTarget("BH.oM.Tagging.OrthoContextElement")]
[VersioningTarget("BH.oM.Tagging.PointContextElement")]
public static Dictionary<string, object> UpgradeContextElement(Dictionary<string, object> oldVersion)
{
if (oldVersion == null)
return null;

Dictionary<string, object> newVersion = new Dictionary<string, object>(oldVersion);

// VisibleCutPolylines became a required constructor parameter once the context elements were made immutable
if (!newVersion.ContainsKey("VisibleCutPolylines"))
newVersion["VisibleCutPolylines"] = new List<object>();

return newVersion;
}

/***************************************************/
}
}
9 changes: 9 additions & 0 deletions BHoMUpgrades/Upgrades/v40.json
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,15 @@
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Diffing.Query, Diffing_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\" }",
"MethodName": "DifferentProperties",
"Parameters": [ "{ \"_t\" : \"System.Type\", \"Name\" : \"System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Diffing.DiffingConfig\" }" ]
},
"BH.Engine.Reflection.Query.Description(System.Type, BH.oM.Quantities.Attributes.QuantityAttribute)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Reflection.Query, Reflection_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\" }",
"MethodName": "Description",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Type, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Base.Attributes.ClassificationAttribute\" }"
]
}
},
"ToOld": {
Expand Down
76 changes: 72 additions & 4 deletions BHoMUpgrades/Upgrades/v43.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"Namespace": {
"ToNew": {
"BH.oM.Structure.SectionProperties.Reinforcement": "BH.oM.Structure.Reinforcement"

},
"ToOld": {

}
},
"Type": {
Expand All @@ -19,7 +19,11 @@
"BH.oM.Adapters.Revit.Parameters.ElementTypeParameterLink": "BH.oM.Adapters.Revit.Mapping.ElementTypeParameterLink",
"BH.oM.Adapters.Revit.Parameters.IParameterLink": "BH.oM.Adapters.Revit.Mapping.IParameterLink",
"BH.oM.Adapters.Revit.Parameters.ParameterMap": "BH.oM.Adapters.Revit.Mapping.ParameterMap",
"BH.oM.Revit.Parameters": "BH.oM.Adapters.Revit.Parameters"
"BH.oM.Revit.Parameters": "BH.oM.Adapters.Revit.Parameters",
"BH.oM.Structure.SectionProperties.Reinforcement.BarRebarIntent": "BH.oM.Structure.Reinforcement.BarRebarIntent",
"BH.oM.Structure.SectionProperties.Reinforcement.IBarReinforcement": "BH.oM.Structure.Reinforcement.IBarReinforcement",
"BH.oM.Structure.SectionProperties.Reinforcement.LongitudinalReinforcement": "BH.oM.Structure.Reinforcement.LongitudinalReinforcement",
"BH.oM.Structure.SectionProperties.Reinforcement.TransverseReinforcement": "BH.oM.Structure.Reinforcement.TransverseReinforcement"
},
"ToOld": {
"BH.oM.CFD.Harpoon.HarpoonRunMode": "BH.oM.CFD.Enums.HarpoonRunMode",
Expand All @@ -32,7 +36,11 @@
"BH.oM.Adapters.Revit.Mapping.ElementTypeParameterLink": "BH.oM.Adapters.Revit.Parameters.ElementTypeParameterLink",
"BH.oM.Adapters.Revit.Mapping.IParameterLink": "BH.oM.Adapters.Revit.Parameters.IParameterLink",
"BH.oM.Adapters.Revit.Mapping.ParameterMap": "BH.oM.Adapters.Revit.Parameters.ParameterMap",
"BH.oM.Adapters.Revit.Parameters": "BH.oM.Revit.Parameters"
"BH.oM.Adapters.Revit.Parameters": "BH.oM.Revit.Parameters",
"BH.oM.Structure.Reinforcement.BarRebarIntent": "BH.oM.Structure.SectionProperties.Reinforcement.BarRebarIntent",
"BH.oM.Structure.Reinforcement.IBarReinforcement": "BH.oM.Structure.SectionProperties.Reinforcement.IBarReinforcement",
"BH.oM.Structure.Reinforcement.LongitudinalReinforcement": "BH.oM.Structure.SectionProperties.Reinforcement.LongitudinalReinforcement",
"BH.oM.Structure.Reinforcement.TransverseReinforcement": "BH.oM.Structure.SectionProperties.Reinforcement.TransverseReinforcement"
}
},
"Method": {
Expand Down Expand Up @@ -669,6 +677,66 @@
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Structure.Reinforcement.BarRebarIntent\", \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.AdjacentElements(BH.oM.Dimensional.IElement1D, System.Collections.Generic.List<BH.oM.Dimensional.IElement2D>)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "AdjacentElements",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement1D\", \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement2D\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.AdjacentElements(BH.oM.Dimensional.IElement2D, System.Collections.Generic.List<BH.oM.Dimensional.IElement2D>)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "AdjacentElements",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement2D\", \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement2D\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.AdjacentElements(BH.oM.Dimensional.IElement1D, System.Collections.Generic.List<BH.oM.Dimensional.IElement1D>)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "AdjacentElements",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement1D\", \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement1D\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.EdgeAdjacencies(BH.oM.Dimensional.IElement1D, System.Collections.Generic.List<BH.oM.Dimensional.IElement2D>, System.Double)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "EdgeAdjacencies",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement1D\", \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement2D\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Double, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.FacadeAreasByConstruction(System.Collections.Generic.List<BH.oM.Facade.IFacadeObject>)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "FacadeAreasByConstruction",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Facade.IFacadeObject\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
},
"BH.Engine.Facade.Compute.UniqueAdjacencies(System.Collections.Generic.List<BH.oM.Dimensional.IElement2D>, System.Boolean)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Engine.Facade.Compute, Facade_Engine, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"4.3\" }",
"MethodName": "UniqueAdjacencies",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"GenericArguments\" : [{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Dimensional.IElement2D\", \"_bhomVersion\" : \"4.3\" }], \"_bhomVersion\" : \"4.3\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"4.3\" }"
],
"_bhomVersion": "4.3"
}
},
"ToOld": {
Expand Down
2 changes: 1 addition & 1 deletion BHoMUpgrades/Upgrades/v60.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"BH.Adapter.GSA.GSAAdapter(System.String, BH.oM.Adapters.GSA.GSAConfig, System.Boolean)": {
"_t": "System.Reflection.MethodBase",
"TypeName": "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Adapter.GSA.GSA87Adapter, GSA87_Adapter, Version=6.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"6.0\" }",
"MethodName": "GSA87Adapter",
"MethodName": ".ctor",
"Parameters": [
"{ \"_t\" : \"System.Type\", \"Name\" : \"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"6.0\" }",
"{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Adapters.GSA.GSAConfig\", \"_bhomVersion\" : \"6.0\" }",
Expand Down
Loading
Loading