-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added "Setup" methods to do the Actions input setup that was in BHoM_UI #264
Conversation
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.
Most of the code in here is aimed at handling null cases. So wondering if it wouldn't make more sense to have that directly into to core method instead of a separate one. Genuine question though as I haven't been involved with the adapters long enough that my question might have an obvious answer.
The main point of having the logic here is to allow overriding by Toolkits. This gives the flexibility of adding checking/verification/additional settings to the "SetUp" methods, or replacing entirely what we do at the base. This is useful in several scenarios. |
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.
Like the action config and request stuff, but think the adapter checking for Move as well as the object checking for push is one step to many. Those to me are clear parts of the push, not something that is simply cleaned up a bit before.
To expand a bit on alessios answer, it is more about defaults and converts than null checks, and making it possible for each adapter to handle that differently. For example, being able to convert a string, formatted in a specific way into a request that is friendly to that particular adapter, but non-sensical outside that scope. As for the ActionConfigs, could be used by RevitToolkit for example, that make use of that mechanism a lot, to directly instantiate the appropriate ActionConfig required by a particular action, such as Pull. |
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.
some small additional tweaks
Co-authored-by: Isak Näslund <isak.naslund@burohappold.com>
Co-authored-by: Isak Näslund <isak.naslund@burohappold.com>
…com/BHoM/BHoM_Adapter into BHoM_Adapter-#259-SetupBeforeAction
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.
now LGTM. Think this is a good balance!
/azp run BHoM_Adapter.CheckInstaller |
Azure Pipelines successfully started running 1 pipeline(s). |
NOTE: Depends on
BHoM/BHoM_UI#329
Issues addressed by this PR
Closes #259
Moves the logic related to the Adapter Actions setup from the BHoM_UI in the Adapter.
Advantages:
SetupThen[ActionName]
methods if they need to have different set-up.I need this quite urgently now because of some needed changes in other toolkits (File_Adapter).
Test files
Changelog
Additional comments