BHoM / BHoM_UI

GNU Lesser General Public License v3.0
9 stars 5 forks source link

Promote IInitialisationSettings interface to BHoM #480

Closed FraserGreenroyd closed 6 months ago

FraserGreenroyd commented 6 months ago

NOTE: Depends on

https://github.com/BHoM/BHoM/pull/1598 https://github.com/BHoM/BHoM_UI/pull/480

Issues addressed by this PR

Fixes https://github.com/BHoM/BHoMAnalytics_Toolkit/issues/73

BHoM_UI has not been upgraded to NetStandard2.0 because many of the GUI components are not compatible. The BHoM_UI project is typically only depended upon by the other UIs (Grasshopper, Excel, etc.) which are also not NetStandard2.0 compliant. However, BHoMAnalytics_Toolkit, and others, depend on the UI_oM and UI_Engine, and particularly as @adecler continues prototyping up our zero code tools, they require NetStandard2.0 DLLs, and the issue as described in https://github.com/BHoM/BHoMAnalytics_Toolkit/issues/73 is basically the Analytics Toolkit is unhappy because the UI elements it depends on are in NetFramework rather than NetStandard.

Thus, UI_oM and UI_Engine have been upgraded to NetStandard2.0 while BHoM_UI has been left on NetFramework but given some tweaks to support it.

I have then added the alternative configuration for ZeroCodeTool which will be used when building the Nugets to exclude the BHoM_UI project when it builds for Nugets.

To test this, compile this PR and then compile a UI of your choice (Grasshopper, Excel, etc.) to ensure it is built on top of this PR, and then play around with the UI. Try and use the search menus and stuff which rely on the NetFramework elements more to ensure they aren't broken.

While all of the above is still true and valid, testing revealed too many issues owing to the need for the UIs to remain within the NetFramework era of the runtime frameworks. Therefore, upgrading the oM and Engine did not work as intended and caused issues when using the UIs.

So instead I went back to the original toolkit - BHoMAnalytics_Toolkit - and questioned why it was depending on BHoM_UI in the first place. It turns out, it's entirely for the interface IInitialisationSettings so that BHoMAnalytics could have their own settings object to be handled on initialisation. As great as that is, a dependency on UI_oM for just that seems overkill, especially as BHoMAnaltyics_Toolkit is not a UI itself, nor does it have a UI, and thus could arguably not depend on BHoM_UI for its work.

Thus, this solution - move the interface it needs from here up to the core BHoM repository within the base oM (BHoM). This makes sense from my perspective as while initialisation settings are nice to use from a UI, they are not only needed from a UI context, so having them in the core makes more sense to be more accessible for contexts outside the UI.

FraserGreenroyd commented 6 months ago

@BHoMBot check project-compliance

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `project-compliance`
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd fix requested for project compliance. The errors with the CSProject (`.csproj`) files have been recorded as annotations on the checks tab. I will apply the fixes to every case detailed on the checks tab with the exception of any references to the target framework. I am unable to provide fixes to the Target Framework automatically, these will need to be performed manually. If you want to perform the fixes in a different manner please resolve this manually and rerun the check. If you are happy for me to go ahead and perform this action, please reply with: > @BHoMBot fix project file ref. `21569055403`
FraserGreenroyd commented 6 months ago

@BHoMBot fix project file ref. 21569055403

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd I have queued up your request to fix the `csproj` file(s). There are 0 requests in the queue ahead of you.
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd I am now going to fix the project compliance in accordance with the annotations previously made.
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm I have now resolved the project compliance issues and pushed a commit to this Pull Request.
FraserGreenroyd commented 6 months ago

@BHoMBot check project-compliance

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `project-compliance`
FraserGreenroyd commented 6 months ago

@BHoMBot check versioning @BHoMBot check installer @BHoMBot check core @BHoMBot check copyright-compliance @BHoMBot check project-compliance

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `versioning` - check `installer` - check `core` - check `copyright-compliance` - check `project-compliance`
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-versioning` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-installer` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoM
FraserGreenroyd commented 6 months ago

@BHoMBot check compliance @BHoMBot check core

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `code-compliance` - check `documentation-compliance` - check `project-compliance` - check `branch-compliance` - check `dataset-compliance` - check `copyright-compliance` - check `core` There are 8 requests in the queue ahead of you.
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-installer` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoMAnalytics_Toolkit
FraserGreenroyd commented 6 months ago

@BHoMBot check copyright-compliance @BHoMBot check project-compliance

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `copyright-compliance` - check `project-compliance` There are 5 requests in the queue ahead of you.
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-versioning` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoMAnalytics_Toolkit
FraserGreenroyd commented 6 months ago

@BHoMBot check core

bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd to confirm, the following actions are now queued: - check `core` There are 5 requests in the queue ahead of you.
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-installer` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @FraserGreenroyd on BHoMAnalytics_Toolkit
Tom-Kingstone commented 6 months ago

@BHoMBot check ready-to-merge

bhombot-ci[bot] commented 6 months ago
@Tom-Kingstone to confirm, the following actions are now queued: - check `ready-to-merge`
bhombot-ci[bot] commented 6 months ago
@FraserGreenroyd just to let you know, I have provided a `check-ready-to-merge` result to this Pull Request as it was detected to be linked to other Pull Requests in a series. The comment which triggered this check came from @Tom-Kingstone on BHoM