-
Notifications
You must be signed in to change notification settings - Fork 13
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
Settings_Engine: Add central settings management #3131
Conversation
@BHoMBot check project-compliance |
@FraserGreenroyd to confirm, the following actions are now queued:
|
@FraserGreenroyd fix requested for project compliance. The errors with the CSProject ( 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. 15620170822 |
@FraserGreenroyd I have queued up your request to fix the |
@FraserGreenroyd I am now going to fix the project compliance in accordance with the annotations previously made. |
@FraserGreenroyd to confirm I have now resolved the project compliance issues and pushed a commit to this Pull Request. |
@BHoMBot check copyright-compliance |
@FraserGreenroyd to confirm, the following actions are now queued:
|
@FraserGreenroyd fix requested for copyright headers. The errors with the copyright headers on the CS ( I will apply the fixes to every case detailed on the checks tab. If you want to perform the fixes in a different manner please resolve this manually and rerun the check. Each CS ( If you are happy for me to go ahead and perform this action, please reply with:
|
@BHoMBot fix copyright headers ref. 15620213842 |
@FraserGreenroyd I have queued up your request to fix copyright headers. There are 0 requests in the queue ahead of you. |
@FraserGreenroyd I am now going to fix the copyright compliance in accordance with the annotations previously made. |
@FraserGreenroyd to confirm I have now resolved the copyright compliance and pushed a commit to this Pull Request. |
@BHoMBot check compliance |
@FraserGreenroyd to confirm, the following actions are now queued:
|
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.
Apart from the CreateInstance
comment below it all works as intended. It only seems to be initially, if I delete everything from the C:\ProgramData\BHoM\Settings
it works fine.
We just need to make sure it works straight away for users and they don't have to fiddle with file types.
Slightly annoying when loading settings from the non-default folder and then saving it to default, but I guess that's on the user to connect the wires as there's no easy way for the SaveSettings
to know of the inputs from LoadSettings
.
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.
Checked the changes made in relation to ToolkitSettings
that did not allow a parameterless construction and happy that the issue is resolved.
@FraserGreenroyd to confirm, the following actions are now queued:
|
The check |
The check |
FAO: @FraserGreenroyd The check they wish to have dispensation on is code-compliance. 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. 15717048464 |
@FraserGreenroyd I have now provided a passing check on reference |
@BHoMBot this is a DevOps instruction. I am requesting neutral checks on: versioning, unit-tests, ready-to-merge |
@FraserGreenroyd I have provided neutral checks to the checks requested. These checks will need to be run properly to obtain full results. |
Issues addressed by this PR
Fixes #2709
Test files
Available here - thanks @peterjamesnugent for the nudge!
Additional comments
Please see this comment for a brief overview of why a new project was added instead of utilising an existing project.
You may also be asking how does this link in with existing BHoM_UI methods on saving and loading settings. BHoM_UI is at a higher dependency level which may prohibit toolkits (such as Revit_Toolkit) from accessing them. Tools within the ZeroCodeTool Space along the BIM spectrum may also encounter issues. Thus, this is designed to be a central settings management system, accessible to any level of BHoM beneath it and not restricted just to the UI levels. What this means for the existing UI functionality is that, in separate issues of narrow scope, that functionality will be ported over from BHoM_UI into here, and BHoM_UI will call these methods to handle loading settings into UI elements. That's the plan at any rate.
The script in the folder for testing goes through the methods/workflows this PR adds and nothing more. There is also a test settings JSON file within the folder to use as well if you don't have one of your own. The test script does assume that you don't already have a
LibrarySettings
object serialised within the folder you're loading from - if you do you might find thereturn default object
test doesn't work in the script - but feel free to test with another object as appropriate. The test script is a guide after all and not a definitive.I don't think the methods added should be extension methods and thus do not agree with the code-compliance failure the bot is reporting, but happy to debate depending on what others think.