BHoM / Mongo_Toolkit

GNU Lesser General Public License v3.0
2 stars 3 forks source link

Added upsert functionality and updated RecordNote #160

Closed jamesramsden-bh closed 2 years ago

jamesramsden-bh commented 2 years ago

Closes #159

Upsert functionality now added to Mongo TK. Will add a new document if the Tag does not exist, otherwise elements will be added to the document with matching Tag.

Can be tested by setting up as below, and verifying manually (e.g. with a Pull in GH or in MongoDB Compass). Copy-paste the following in a GH canvas:

```xml 0 2 2 1 0 7 340c5f90-a204-43e9-b21b-006c82bf1f44 Shaded 1 100;150;0;0 100;0;150;0 637962531453272114 0 40 38 0.85 0 0 1 BH.UI.Grasshopper, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null 5.0.0.0 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf BH.UI.Grasshopper 5.0.0.0 10 dd286cb5-2bc6-4c4a-aac5-542d1d0954b5 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf MongoAdapter { "SelectedItem" : { "_t" : "System.Reflection.MethodBase", "TypeName" : "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Adapter.Mongo.MongoAdapter, Mongo_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"5.3\" }", "MethodName" : ".ctor", "Parameters" : ["{ \"_t\" : \"System.Type\", \"Name\" : \"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }"], "_bhomVersion" : "5.3" }, "InputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "0c355b93-29f1-4887-a46a-e2f7c74ce279", "Name" : "connectionString", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "Text given to you to access the database. Will generally start with \"mongodb://\"\r\nThis is a String", "Kind" : "Input", "HasDefaultValue" : false, "DefaultValue" : { "_t" : "System.DBNull" }, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "0f3edeb9-a725-48c3-973f-f7c799fb4f70", "Name" : "databaseName", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "name of the database itself\r\nThis is a String", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : "project", "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "12f290e4-09b9-4a15-af8d-6f657e0c7a7e", "Name" : "collectionName", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "name of the collection you want to access inside that database\r\nThis is a String", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : "bhomObjects", "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "116eb16e-158f-4111-bd5a-e0251e246213", "Name" : "useHistory", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there\r\nThis is a Boolean", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : false, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "OutputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "eeef1466-62ed-45db-b842-33777a1ef599", "Name" : "adapter", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.Adapter.Mongo.MongoAdapter, Mongo_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "5.3" }, "Description" : "Adapter to Mongo Database\r\nThis is a BH.Adapter.Mongo.MongoAdapter", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }], "BHoM_Guid" : "55513e68-8978-4f1b-9266-3abb0887c4b8", "_bhomVersion" : "5.3" } Create an adapter to a Mongo database. Use this constructor if you have a single long string representing the location of your database (and potentially identification) aeb02ded-052a-4045-af10-5ed0ce06ba05 MongoAdapter MongoAdapter 384 176 171 113 491 233 true 4 3ede854e-c753-40eb-84cb-b48008f14fd4 3ede854e-c753-40eb-84cb-b48008f14fd4 3ede854e-c753-40eb-84cb-b48008f14fd4 cb95db89-6165-43b6-9c41-5702bc5bf137 1 72194041-4e06-4e8c-bbeb-36fd484907e0 Text given to you to access the database. Will generally start with "mongodb://" This is a String d36cb425-da4c-4d0c-a197-d7b487d2235d connectionString connectionString false 1f08c084-5d80-47ea-ac60-749904d35762 1 386 178 90 27 432.5 191.625 true name of the database itself This is a String 662054c4-2acf-4741-a9c8-589d89ebc790 databaseName databaseName true 004c57ba-c4e2-47b5-b128-31484443a64d 1 386 205 90 27 432.5 218.875 true 1 1 {0} false project name of the collection you want to access inside that database This is a String 1cde8a2a-ae25-473a-8d46-4b5f3405104c collectionName collectionName true bbc5234b-268f-41ab-bad7-85151ef41e49 1 386 232 90 27 432.5 246.125 true 1 1 {0} false bhomObjects If true, will store a copy of the data pushed to Mongo in a separate collection. Data from the last 5 pushes is available there This is a Boolean b49da316-bca5-45d5-8faa-a6f3cc7d3f2f useHistory useHistory true 0 386 259 90 28 432.5 273.375 true 1 1 {0} false Adapter to Mongo Database This is a BH.Adapter.Mongo.MongoAdapter 6f78a64c-a929-42ea-b8bd-a5dc4d423834 adapter adapter { "_t" : "System.Type", "Name" : "BH.Adapter.Mongo.MongoAdapter, Mongo_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "5.3" } false 0 false 10000 506 178 47 109 529.5 232.5 true 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel A panel for custom notes and text values 1f08c084-5d80-47ea-ac60-749904d35762 Panel false 0 0 mongodb://localhost:27017 155 167 183 28 0 0 0 true 255;255;250;90 true true true false false true 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel A panel for custom notes and text values 004c57ba-c4e2-47b5-b128-31484443a64d Panel false 0 0 test 208 208 49 20 0 0 0 208.5 208 true 255;255;250;90 true true true false false true 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel A panel for custom notes and text values bbc5234b-268f-41ab-bad7-85151ef41e49 Panel false 0 0 220812 upsert test 74 246 206 33 0 0 0 74.08244 246 true 255;255;250;90 true true true false false true eb7b72e5-b4d8-4ff6-bcbd-833cdec5d1a2 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf CreateCustom { "SelectedItem" : null, "InputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "0dbef229-927a-46fb-a3d8-f55dcee555d2", "Name" : "upserttest", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "", "Kind" : "Input", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "OutputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "31738b61-b75b-4d31-89d4-36297c01fd6f", "Name" : "object", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.oM.Base.IObject", "_bhomVersion" : "5.3" }, "Description" : "New Object with properties set as per the inputs.", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }], "BHoM_Guid" : "fb8018fd-ec00-43d0-9cdf-241311e9fe99", "_bhomVersion" : "5.3" } Creates an instance of a selected type of BHoM object by manually defining its properties (default type is CustomObject) f10a0fb6-796a-4859-abaa-a60d0831b3c3 CreateCustom CreateCustom 713 90 130 105 786 143 true 1 d67b6cf3-37ea-438e-a6b4-2cc76b572658 1 ffe324e7-1fc0-4818-9fcb-43a0202cc974 Represents a collection of generic object with type that can be defined by the user 164b29df-a411-4a97-b62d-3d8a914adf3d x upserttest { "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" } false 0 2a40afc2-1f95-4732-b7f8-171defeb0433 1 6a184b65-baa3-42d1-a548-3915b401de53 false 10000 715 92 56 101 744.5 142.5 true New Object with properties set as per the inputs. c3d91c3d-56d6-4082-aee3-7d45962447a6 object object { "_t" : "System.Type", "Name" : "BH.oM.Base.IObject", "_bhomVersion" : "5.3" } false 0 false 10000 801 92 40 101 821 142.5 true 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel A panel for custom notes and text values 2a40afc2-1f95-4732-b7f8-171defeb0433 Panel false 0 0 test yay 549 121 76 20 0 0 0 true 255;255;250;90 true true true false false true f27e94ad-6939-41aa-b680-094ba245f5c1 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf Push { "SelectedItem" : { "_t" : "System.Reflection.MethodBase", "TypeName" : "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.UI.Base.Components.PushCaller, BHoM_UI, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"5.3\" }", "MethodName" : "Push", "Parameters" : ["{ \"_t\" : \"System.Type\", \"Name\" : \"BH.Adapter.BHoMAdapter, BHoM_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null\", \"_bhomVersion\" : \"5.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\" : \"System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }], \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Adapter.PushType\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"BH.oM.Adapter.ActionConfig\", \"_bhomVersion\" : \"5.3\" }", "{ \"_t\" : \"System.Type\", \"Name\" : \"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\", \"_bhomVersion\" : \"5.3\" }"], "_bhomVersion" : "5.3" }, "InputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "09041b5d-03ed-40da-b37b-6a19b900c980", "Name" : "adapter", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.Adapter.BHoMAdapter, BHoM_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "5.3" }, "Description" : "Adapter to the external software\r\nThis is a BH.Adapter.BHoMAdapter", "Kind" : "Input", "HasDefaultValue" : false, "DefaultValue" : { "_t" : "System.DBNull" }, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "70063f49-7a78-41d8-992d-28d94e15f4f1", "Name" : "objects", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Collections.Generic.IEnumerable`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "GenericArguments" : [{ "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }], "_bhomVersion" : "5.3" }, "Description" : "Objects to push\r\nThis is a IEnumerable<Object>", "Kind" : "Input", "HasDefaultValue" : false, "DefaultValue" : { "_t" : "System.DBNull" }, "IsRequired" : true, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "4d8e572e-ba56-4a7f-9e2a-9c208d3d9ca2", "Name" : "tag", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "Tag to apply to the objects being pushed\r\nThis is a String", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : "", "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "f7cd88b9-d62d-4bdb-b012-2254d828a608", "Name" : "pushType", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.PushType", "_bhomVersion" : "5.3" }, "Description" : "Push type. Connect the enum PushType for all the alternatives.\r\nThis is a BH.oM.Adapter.PushType:\r\nControls which type of export should be done by the Adapter `Push` action.\r\nEnum values:\r\n-FullPush: Calls all CRUD methods as appropriate.\r\n-CreateOnly: Uses only the Create CRUD method to export the objects. This may create duplicates if the object already exists.\r\n-CreateNonExisting: Same as FullPush, but does not update pre-existing objects.\r\n-UpdateOnly: Uses only the Update CRUD method to update the objects in the external software. All other objects in the model are left untouched.\r\n-UpdateOrCreateOnly: Attempt to Update the objects if possible, otherwise Create them. Deletion is not included in this type.\r\n-DeleteThenCreate: For all objects being Pushed, identifies their type, calls Delete to remove all of those types, then it Creates them.\r\n-AdapterDefault: AdapterDefault - Picks the value hard-coded in the specific Adapter.", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : 6, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "1cb5b5d4-3a6b-49bd-b6c8-d8580c9de799", "Name" : "actionConfig", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.ActionConfig", "_bhomVersion" : "5.3" }, "Description" : "Configuration for this Action. You can input an ActionConfig (it contains the configs common to all Toolkits); \nconsider that Toolkits may have a custom ActionConfig (e.g. GSAConfig, SpeckleConfig).\r\nThis is a BH.oM.Adapter.ActionConfig:\r\nConfigurations specific for an Adapter Action (Push, Pull, etc).\nConsider that your tookit might have a more specific implementation available. Try to look for [your toolkit name]ActionConfig.", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "08a03c14-0b91-4da8-ab0b-7de5e853241b", "Name" : "active", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "Execute the push\r\nThis is a Boolean", "Kind" : "Input", "HasDefaultValue" : true, "DefaultValue" : false, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "OutputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "fd55cdd9-47a9-42ee-8117-fe3b300abc48", "Name" : "objects", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Collections.Generic.List`1, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "GenericArguments" : [{ "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }], "_bhomVersion" : "5.3" }, "Description" : "Objects that have been pushed.\nThese objects may be different from the input objects (e.g. their correspondent external software id may be stored in their CustomData).\r\nThis is a Object", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }, { "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "c08fa26c-9428-4214-bd6e-5597de2f7b98", "Name" : "success", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "Define if the push was sucessful\r\nThis is a Boolean", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "BHoM_Guid" : "28de97ca-c591-4a66-979d-a8c619b32f20", "_bhomVersion" : "5.3" } Adapter Action 'Push': exports objects to the external software. If the Toolkit supports it, this also performs the replace/update of the objects as appropriate. 64bf3a77-ee26-4f42-b647-88a824bb8b71 Push Push 1037 146 165 124 1139 208 true 6 72194041-4e06-4e8c-bbeb-36fd484907e0 d67b6cf3-37ea-438e-a6b4-2cc76b572658 3ede854e-c753-40eb-84cb-b48008f14fd4 c62f4bd6-9b7f-4a81-94dd-ca16b2d8d3ec ffe324e7-1fc0-4818-9fcb-43a0202cc974 cb95db89-6165-43b6-9c41-5702bc5bf137 2 d67b6cf3-37ea-438e-a6b4-2cc76b572658 cb95db89-6165-43b6-9c41-5702bc5bf137 Adapter to the external software This is a BH.Adapter.BHoMAdapter 644032b3-5ee3-449c-940c-de8ca62b76d4 adapter adapter { "_t" : "System.Type", "Name" : "BH.Adapter.BHoMAdapter, BHoM_Adapter, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null", "_bhomVersion" : "5.3" } false 6f78a64c-a929-42ea-b8bd-a5dc4d423834 1 false 10000 1039 148 85 20 1091 158 true 1 Objects to push This is a IEnumerable<Object> be201919-981b-44b2-99a5-c7dfec5727ef 1 objects objects { "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" } false 1 c3d91c3d-56d6-4082-aee3-7d45962447a6 1 6a184b65-baa3-42d1-a548-3915b401de53 false 10000 1039 168 85 20 1091 178 true Tag to apply to the objects being pushed This is a String f6f41e3f-cf58-4874-9f43-1b759cf98b6a tag tag true 1daa9ebd-d447-44bc-a187-2f518747b741 1 1039 188 85 20 1091 198 true 1 1 {0} false Push type. Connect the enum PushType for all the alternatives. This is a BH.oM.Adapter.PushType: Controls which type of export should be done by the Adapter `Push` action. Enum values: -FullPush: Calls all CRUD methods as appropriate. -CreateOnly: Uses only the Create CRUD method to export the objects. This may create duplicates if the object already exists. -CreateNonExisting: Same as FullPush, but does not update pre-existing objects. -UpdateOnly: Uses only the Update CRUD method to update the objects in the external software. All other objects in the model are left untouched. -UpdateOrCreateOnly: Attempt to Update the objects if possible, otherwise Create them. Deletion is not included in this type. -DeleteThenCreate: For all objects being Pushed, identifies their type, calls Delete to remove all of those types, then it Creates them. -AdapterDefault: AdapterDefault - Picks the value hard-coded in the specific Adapter. b0bae540-d59f-4fd7-942a-e81c03f20262 pushType pushType { "_t" : "System.Type", "Name" : "BH.oM.Adapter.PushType", "_bhomVersion" : "5.3" } true 404e3257-8cd0-427e-9db3-177ff840d5ef 1 false 10000 1039 208 85 20 1091 218 true 1 1 {0} { "_t" : "System.Enum", "TypeName" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.PushType", "_bhomVersion" : "5.3" }, "Value" : "AdapterDefault", "_bhomVersion" : "5.3" } Configuration for this Action. You can input an ActionConfig (it contains the configs common to all Toolkits); consider that Toolkits may have a custom ActionConfig (e.g. GSAConfig, SpeckleConfig). This is a BH.oM.Adapter.ActionConfig: Configurations specific for an Adapter Action (Push, Pull, etc). Consider that your tookit might have a more specific implementation available. Try to look for [your toolkit name]ActionConfig. ab336dba-9386-4c75-b051-6a8d32a0cf88 actionConfig actionConfig { "_t" : "System.Type", "Name" : "BH.oM.Adapter.ActionConfig", "_bhomVersion" : "5.3" } true 0 false 10000 1039 228 85 20 1091 238 true Execute the push This is a Boolean c4c20e94-a643-481b-a489-c0e53e4061ee active active true aa1d18a6-f56f-484c-8110-720a7957a15f 1 1039 248 85 20 1091 258 true 1 1 {0} false 1 Objects that have been pushed. These objects may be different from the input objects (e.g. their correspondent external software id may be stored in their CustomData). This is a Object b640f263-f034-44df-9986-0fdfed49d18f objects objects { "_t" : "System.Type", "Name" : "System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" } true 1 0 6a184b65-baa3-42d1-a548-3915b401de53 false 10000 1154 148 46 60 1177 178 true Define if the push was sucessful This is a Boolean 7af3472b-c588-4ce1-ac0a-a6c82e558cd3 success success true 0 1154 208 46 60 1177 238 true 59e0b89a-e487-49f8-bab8-b5bab16be14c Panel A panel for custom notes and text values 1daa9ebd-d447-44bc-a187-2f518747b741 Panel false 0 0 10 928 188 36 20 0 0 0 928.475 188.1525 true 255;255;250;90 true true true false false true f9c81693-ce16-456a-a1c4-aa109b6f56fe 8bbd9f31-e1cd-fb1a-4588-730892e8d0cf PushType { "SelectedItem" : { "_t" : "System.Type", "Name" : "BH.oM.Adapter.PushType", "_bhomVersion" : "5.3" }, "InputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "f363886e-ccff-42af-9b5a-3fa9344ac3f6", "Name" : "index", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "index of the enum value", "Kind" : "Input", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "OutputParams" : [{ "_t" : "BH.oM.UI.ParamInfo", "BHoM_Guid" : "a7da5e1c-d792-4b54-937c-a216a21be294", "Name" : "enum", "Fragments" : [], "Tags" : [], "CustomData" : { }, "DataType" : { "_t" : "System.Type", "Name" : "System.Enum, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "_bhomVersion" : "5.3" }, "Description" : "enum value", "Kind" : "Output", "HasDefaultValue" : false, "DefaultValue" : null, "IsRequired" : false, "IsSelected" : true, "DefaultValueWarning" : "" }], "BHoM_Guid" : "e579da22-adbf-4efd-9dcc-cec16c58b75d", "_bhomVersion" : "5.3" } This is a BH.oM.Adapter.PushType: Controls which type of export should be done by the Adapter `Push` action. Enum values: -FullPush: Calls all CRUD methods as appropriate. -CreateOnly: Uses only the Create CRUD method to export the objects. This may create duplicates if the object already exists. -CreateNonExisting: Same as FullPush, but does not update pre-existing objects. -UpdateOnly: Uses only the Update CRUD method to update the objects in the external software. All other objects in the model are left untouched. -UpdateOrCreateOnly: Attempt to Update the objects if possible, otherwise Create them. Deletion is not included in this type. -DeleteThenCreate: For all objects being Pushed, identifies their type, calls Delete to remove all of those types, then it Creates them. -AdapterDefault: AdapterDefault - Picks the value hard-coded in the specific Adapter. 404e3257-8cd0-427e-9db3-177ff840d5ef 7 1 PushType PushType false 4 0 0 FullPush false 1 CreateOnly false 2 CreateNonExisting false 3 UpdateOnly false 4 UpdateOrCreateOnly true 5 DeleteThenCreate false 6 AdapterDefault false 753 222 199 22 814 222 true 2e78987b-9dfb-42a2-8b76-3923ac8bd91a Boolean Toggle Boolean (true/false) toggle aa1d18a6-f56f-484c-8110-720a7957a15f Boolean Toggle Toggle false 0 true 809 280 104 22 true ```

image

jamesramsden-bh commented 2 years ago

@BHoMBot check required

bhombot-ci[bot] commented 2 years ago
@jamesramsden-bh to confirm, the following actions are now queued: - check `code-compliance` - check `documentation-compliance` - check `project-compliance` - check `core` - check `null-handling` - check `serialisation` - check `versioning` - check `installer`
jamesramsden-bh commented 2 years ago

@BHoMBot check copyright-compliance @BHoMBot check dataset-compliance @BHoMBot check ready-to-merge

bhombot-ci[bot] commented 2 years ago
@jamesramsden-bh to confirm, the following actions are now queued: - check `copyright-compliance` - check `dataset-compliance` - check `ready-to-merge` There are 6 requests in the queue ahead of you.
jamesramsden-bh commented 2 years ago

@BHoMBot check ready-to-merge

adecler commented 2 years ago

@BHoMBot check ready-to-merge

FraserGreenroyd commented 2 years ago

@BHoMBot check ready-to-merge

FraserGreenroyd commented 2 years ago

@BHoMBot check ready-to-merge

FraserGreenroyd commented 2 years ago

@BHoMBot check ready-to-merge

FraserGreenroyd commented 2 years ago

@BHoMBot check core

bhombot-ci[bot] commented 2 years ago
FAO: @FraserGreenroyd @FraserGreenroyd is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate. The check they wish to have dispensation on is ready-to-merge. If you are providing dispensation on this occasion, please reply with: > @BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. `7839600546`
bhombot-ci[bot] commented 2 years ago
FAO: @FraserGreenroyd @FraserGreenroyd is seeking dispensation on this Pull Request to skip a required check. Please can you provide authorisation for the check to be skipped, or provide assistance as appropriate. The check they wish to have dispensation on is ready-to-merge. If you are providing dispensation on this occasion, please reply with: > @BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. `7839600546`
FraserGreenroyd commented 2 years ago

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 7839600546

FraserGreenroyd commented 2 years ago

@BHoMBot why aren't you listening on this one PR?

FraserGreenroyd commented 2 years ago

@BHoMBot this is a DevOps instruction. I am authorising dispensation to be granted on check ref. 7839600546

FraserGreenroyd commented 2 years ago

For some reason this PR is broken in terms of reporting to BHoMBot - and only this PR which is very odd.

To resolve this merge issue, I have turned off the required check ready-to-merge so it can be merged now (by me), as the reason for the failure was due to the PR not having an approving review, which it does now have from @alelom .

I am then going to turn the check back on for future PRs.