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

6.1 Deployment #214

Merged
merged 8 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 RAM_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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -66,3 +66,4 @@ public override IEnumerable<object> Pull(IRequest request, PullType pullType = P




30 changes: 8 additions & 22 deletions RAM_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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -39,22 +39,9 @@ public partial class RAMAdapter

public override List<object> Push(IEnumerable<object> objects, string tag = "", PushType pushType = PushType.AdapterDefault, ActionConfig actionConfig = null)
{
// ----------------------------------------//
// SET-UP //
// ----------------------------------------//

// If unset, set the pushType to AdapterSettings' value (base AdapterSettings default is FullCRUD).
if (pushType == PushType.AdapterDefault)
pushType = m_AdapterSettings.DefaultPushType;

//Filter out levels for others
IEnumerable<object> levels = objects.Where(x => x is Level);
IEnumerable<object> notLevels = objects.Where(x => !(x is Level));

//Add the levels to a new list. This is to ensure that they are first and thereby pushed before the other objects
List<object> sortedObjects = new List<object>();
sortedObjects.AddRange(levels);
sortedObjects.AddRange(notLevels);
//Push levels before all other objects.
List<object> sortedObjects = objects.Where(x => x is Level).ToList();
sortedObjects.AddRange(objects.Where(x => !(x is Level)));

List<object> result = new List<object>();

Expand All @@ -65,14 +52,12 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",
{
result = base.Push(sortedObjects, tag, pushType, actionConfig);
}
catch
finally
{
Engine.Base.Compute.RecordError("Could not complete Push.");
}
CloseDatabase();
}
}

CloseDatabase();

return result;
}

Expand All @@ -82,3 +67,4 @@ public override List<object> Push(IEnumerable<object> objects, string tag = "",




3 changes: 2 additions & 1 deletion RAM_Adapter/Convert/ToBHoM.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -999,3 +999,4 @@ public static oM.Geometry.Point PointFromRAM(this SCoordinate sc, double zOffset




3 changes: 2 additions & 1 deletion RAM_Adapter/Convert/ToRAM.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -186,3 +186,4 @@ public static IStory GetStory(this Panel panel, IStories ramStories)




3 changes: 2 additions & 1 deletion RAM_Adapter/Create/Bar.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -231,3 +231,4 @@ private bool CreateCollection(IEnumerable<Bar> bhomBars)
}
}


3 changes: 2 additions & 1 deletion RAM_Adapter/Create/ContourLoadSet.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -110,3 +110,4 @@ private bool CreateCollection(IEnumerable<ContourLoadSet> loads)
}
}


3 changes: 2 additions & 1 deletion RAM_Adapter/Create/Errors.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ -83,3 +83,4 @@ private void CreatePropertyEvent(string failedProperty, string elemType, string
}
}


3 changes: 2 additions & 1 deletion RAM_Adapter/Create/Grid.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 - 2022, the respective contributors. All rights reserved.
* Copyright (c) 2015 - 2023, 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 @@ private bool CreateCollection(IEnumerable<Grid> bhomGrid)
}
}


Loading