-
Notifications
You must be signed in to change notification settings - Fork 3
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
Provide a bespoke message for each items that cannot be upgraded automatically #134
Provide a bespoke message for each items that cannot be upgraded automatically #134
Conversation
All objects and types from 3.3 should now work correctly (or have a custom message explaining to the user what to do). Here's the list of objects that still need fixing and the corresponding issue raised:
|
Below is the list of methods from 3.3 that are still not deserialising correctly. Failing methods from 3.3
Ideally, those methods should be added directly to the Thankfully, this is decently simple to do. The part of the dictionary where you need to add that info is Please tick the methods in the list that you are working on so everyone else knows they don't have to fix those. |
Finally there are few items that I have already added to the two new categories but you will still need to add a custom message for the user. Here's the list: Deleted items:
Items without automatic update:
Please add a message for those and tick the box when done |
On some of the structures ones
They all had versioning applied, see: https://github.com/BHoM/BHoM_Engine/pull/2261/files#diff-42579e993975399d37e6a204d41643038c3b5e943eb36d690a268c094b0274f4 for example. But assume they showing up here means it did not work for one or another reason? Can find the records for these methods in the Upgrades.json file for 4.0. |
Congratulations @IsakNaslundBh ! |
Always good to be first! ... or is it..? 😄 |
All, I feel it might be useful to provide a bit more context on the purpose of the messages provided in The idea behind the message is to
To illustrate, here's a few messages that are not really helping the user:
-> Why ? How do I get the same functionality so my script can work again ?
-> What do I replace it with ? How do I match my old input with the new ones ? (remember it is complex enough that the upgrade couldn’t be automated) |
Message for the BarVaryingDistributedLoad: |
I have handled most of the failing methods myself. Here's the ones that you guys will still have to take care of: @pawelbaran : (plus missing messages)
@alelom :
@FraserGreenroyd : (plus missing messages)
|
Thank you @adecler for doing the majority of the job for us. Regarding the methods you mention:
|
Break down of the upgrades/deleted/notUpgradable done in 05bc217 for the Diffing methods:
|
All but one of mine in that latest list have been deleted, I'll get them sorted tomorrow hopefully. |
Thanks @alelom , I have fixed the null parameters in the method keys as discussed so all is good on your side 👍 |
Thanks @pawelbaran , I have added the messages you provided. A few things to note:
|
1379c33
to
ecb046b
Compare
@adecler I have now managed to do the ones mentioned in this comment - I'll now go back to the top and look at what else I can provide messages for from the other lists. |
I will get the others done with @michaelhoehn later this afternoon (when he's awake) as it looks like everything from me is done (at long last!) 😄 |
@adecler I took another round through the methods, please see the list below. "This method of applying ElementId to a BHoMObject is not valid any more. In order to extract the information about a given Revit element, please pull using FilterByElementIds request instead." "This method of applying ElementId to a BHoMObject is not valid any more. In order to extract the information about a given Revit element, please pull using FilterByUniqueIds request instead." "This method is not available any more. To reinstate the object, please use BH.Engine.Adapters.Revit.Create(string, string) instead." "This method was a duplicate of SetProperty method, please use the latter instead." "The information about adjacent space Id is not stored on this BHoM object any more, therefore the method became unusable." "This method was a duplicate of GetProperty method, please use the latter instead." "This method was a duplicate of RemoveIdentifiers method, please use the latter instead." "The information about family placement type is not stored on this BHoM object any more, therefore the method became unusable." "This method was a duplicate of BH.Engine.Base.Query.FilterByType method, please use the latter instead." "This method has been deleted as similar results can be achieved by using standard .NET Type.IsAssignableFrom query. Please use the latter instead." "This method has been removed as the object definition of ViewPlan has changed. In order to check if an object represents a template, check its TemplateName property using GetProperty - if it is not empty or null, the object represents a template." "This method has been deleted as it could yield wrong results in case of non-default settings. In order to check if the number is close enough to zero, simply check if its absolute value is smaller than the assumed tolerance (default for BHoM is 1e-6). "The information about space Id is not stored on this BHoM object any more, therefore the method became unusable. If the queried object is a space, query its Id using BH.Engine.Adapters.Revit.Query.ElementId method." "This method has been deleted from BHoM. In order to reproduce its behaviour, filter nulls manually if needed, and then run BH.Engine.Adapters.Revit.Query.UniqueId method." "This method has been deleted from BHoM. There is no replacement available for it at the moment, but it is meant to be provided soon." "The object has been redefined in such a way that automatic versioning is not possible. To reinstate the object, please use BH.Engine.Adapters.Revit.Create.RevitFilePreview method." It is hard for me to speak for |
Thanks everyone, this PR is now ready for merging in my opinion. I have created a slightly less cluttered version of the test script here if you are interested. Note that some items still don't version correctly but issues have been raised for them: BHoM/BHoM#1158 |
@BHoMBot check copyright |
@adecler to confirm, |
@BHoMBot check copyright |
@adecler to confirm, |
@BHoMBot check installer |
@adecler to confirm, |
@FraserGreenroyd , @enarhi , it seems that the recent change to @FraserGreenroyd ,Not sure how Azure was happy with the installer check at the time that PR was merged but not now. |
@BHoMBot check installer |
1 similar comment
@BHoMBot check installer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: Depends on
BHoM/BHoM_Engine#2273
Issues addressed by this PR
Closes #117
It is now possible to add a custom message for the objects, types, and methods that are impossible to update automatically. Here's the two possible categories provided (each corresponding to a new section of the
Versioning_X.json
files) :MessageForDeleted
: The item was deleted and has no replacement in the new version. Provide a message that explains how best the user can replicate the previous behaviour. If completely impossible, suggest the possibility to raise an issue on GitHub (provide a link)MessageForNoUpgrade
: An alternative to this item can be found in the new version but it is not possible to provide an automatic upgrade because the upgrade requires missing critical information or decisions from the user.I will add comments below for additional information about the items from version 3.3 that still need work in order to be versioned properly.
Test files
https://burohappold.sharepoint.com/:u:/r/sites/BHoM/02_Current/12_Scripts/02_Pull%20Request/BHoM/Versioning_Toolkit/%23133-Forward%20Versioning/VerifyVersioning%20-%2033.gh?csf=1&web=1&e=Rcn98E
Additional comments
Since we are already in version 4.1, I have manually added the upgrades in
Versioning_Toolkit\BHoMUpgrader40\Upgrades.json
. I will explain in a separate comment how to add the missing upgrades for methods (objects and types are already done).